Nitish
Nitish

Reputation: 14123

Undefined screen - Rhosync

Rhosync works fine for the demo application(employee application). I am able to login and then perform CRUD operations.

However, when I create my own project, add source adapters and add few screens, and then run the application, I find undefined screen when I go from first to second screen.

  # GET /Categories
  def index
    @categorieses = Categories.find(:all)
    render 
  end 

On debugging I find that after render, undefined screen comes out.
Has someone experienced such problem?

Upvotes: 0

Views: 387

Answers (3)

gaqzi
gaqzi

Reputation: 3807

Another possible reason for this might also be that you don't have the necessary <div>s in your view code.

Remember that you're supposed to always have:

<div data-role="page">
    <div data-role="content"> your own content </div>
</div>

I just spent too much time figuring this out and this is the first hit on Google for "RhoMobile undefined" at the moment, so I'm adding in case someone else finds this question. :)

Upvotes: 1

marimaf
marimaf

Reputation: 5410

You can try

render :action => :index

Also, sometimes the undefined screen can be fixed by using redirect instead of render.

redirect 'index'

Upvotes: 1

Geoffrey
Geoffrey

Reputation: 562

Calling render with no other arguments will look for a view file called index.erb (as defined by RhoMobile convention, derived from the name of the controller method) for the model Categories. Ensure you have an index.erb file in the /app/Categories/ folder.

Here is a link to the RhoMobile documentation on the usage of render.

Upvotes: 1

Related Questions