File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Submits all the tabs. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Submits all the tabs." Watch "Submits all the tabs." New topic
Author

Submits all the tabs.

RamyaR Ramakrishna
Greenhorn

Joined: Apr 09, 2008
Posts: 4
I have a 5 tabs in a tabbed pane which is a custom component, each of which is placed in a different form. Each of the tab contains datatables with some command buttons. When i need to do any add, edit operations for each of the datatable record, it calls the getter method which fires a database query. How do i stop submitting all the tabbed panes i.e calling all the other tabs. This problem is not solved even after putting the bean in session scope..

Please reply soon if any information is available..
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15662
    
  15

Your question is a little unclear, but the JSF form tag renders on the user's browser as an HTML FORM tag, and thus obeys the same rules as plain HTML. Which is that ONLY the data defined within that form will be sent when you submit the form. So if each tab has a JSF form on it, each tab should submit its data and only its data, not the data from outside the control or on any other tab. To submit all tabs from a single submit operation, you'd have to move the form tag to include the entire set of tabs.

There are ways to alter this behavior, but they're basically relying on you providing Javascript to dynamically add form fields as part of the submit process. Neither HTML nor the core JSF tagset have any options for that - you'd have to write your own.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Submits all the tabs.
 
Similar Threads
Struts Menu Question
Problem with tabbed panes
Tabbed Pane
Mnemonics and focusable components
Max no of Tabs inTabbed Pane