permaculture playing cards*
The moose likes JSF and the fly likes How can i call an action method from a sub-view Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "How can i call an action method from a sub-view" Watch "How can i call an action method from a sub-view" New topic
Author

How can i call an action method from a sub-view

Shasi Mitra
Ranch Hand

Joined: Nov 27, 2008
Posts: 101

My requirement is as follows:
I have one header.jsp which has many command links and this jsp is a subview which i've included using tiles.
And the body (this is the view)can be any of the pages rendered on clicking of any link in the header.
The body page has many command buttons onclick of which i'll call respective pages.
How will i write navigation rules for this scenario? Because i can have only one view per page and header has commandlinks and body also has links/buttons?
Darryl Nortje
Ranch Hand

Joined: Jun 11, 2002
Posts: 140
Hi Shasi,

What happens when you put commandAction in both views? Does it break?

It really is best to try these things out and show your output.

cheers
Darryl
srinivas bodapati
Greenhorn

Joined: Jul 09, 2008
Posts: 14
hi sashi,

For your problem, I think you can have a different form in each of your <f:subview> and thus a command button submits only that form.


Perception Matters.
S R I
 
Consider Paul's rocket mass heater.
 
subject: How can i call an action method from a sub-view
 
Similar Threads
user authentication
accessing clicked hyperlink value of jsp page in servlet
javascript rendering properly with jsf
Tags/Tag Libs help
Tiles: how to refresh just one tile?