Hi Yinghai,

On 15/12/2010 09:43, Yinghai Zhao wrote:
> Hello 
> I have some question with onGet and onRender method:
> 1.is onRender always called before onGet?

It's the other way around. See the doco here[1] to for a detailed view of the 
request flow.


> 2.is <http://2.is> a page refresh triggers onRender and onGet? or only one of 
> them

Both are called.

> i.e. I have a stateful edit student page list of courses(using table object) 
> through a many to many
> relationship.


> when I added or remove a course and updated the database in the submit 
> listener, i call onRender to

onRender is invoked by Click, you don't need to call it yourself. You could 
also implement a
DataProvider to make DB calls when the table renders. See the Click examples 
how this is done.

regards

Bob

[1]: http://click.apache.org/docs/user-guide/html/ch02s02.html

Reply via email to