Thanks a lot for saving me from banging my head against the wall. --- Mike Kienenberger <[EMAIL PROTECTED]> wrote:
> Exactly. This is a known limitation of using > h:form. Submitting an > h:form will cause all submitted values to be lost in > the other forms > on the page. That's why the best practice is to > use the subForm > component. It is hoped that subform will become a > part of the JSF > 2.0 standard since every component set ends up > implementing it > separately to solve this problem. > > You will not be able to solve this problem > satisfactorarily without > using sandbox:subForm (or Tobago subform or Trinidad > subform). > > > On 5/30/07, Caroline Jen <[EMAIL PROTECTED]> > wrote: > > I am using JSF only; therefore, I cannot follow > the > > best practice. > > > > The two <h:form></h:form> approach give me some > > problem, which "does not" occur if JSF has only > one > > form -- > > > > My form B (not the form for QUERY on top of the > page) > > is for entering information about an "incident" > and an > > "incident" involves several people. In form B, I > > provide a button called "Add a New Person" for > > entering information about each person in the > > incident. > > > > The problem is the information that has been > entered > > about the "incident" gets lost (it does not get > lost > > in case that my JSF has only one form) each time > this > > "Add a New Person" button is clicked. > > > > I just do not know how to handle the situation. > > --- Mike Kienenberger <[EMAIL PROTECTED]> wrote: > > > > > Best practice is to use one <h:form> and then > put > > > form A and B into > > > separate <sandbox:subForm> elements. > > > > > > However, if you're not willing to use subforms, > > > there should be no > > > technical reason why you couldn't use multiple > > > <h:form> elements. > > > > > > On 5/30/07, Caroline Jen <[EMAIL PROTECTED]> > > > wrote: > > > > I am building a JSF page. There is a QUERY > > > > functionality on top of the page. Therefore, > I > > > > provide some input fields for users to enter > > > search > > > > criteria. Those input fields in this QUERY > form > > > (form > > > > A) need validation. > > > > > > > > Below the QUERY, I have another form (form B). > > > The > > > > form B has several buttons and they do not > care > > > about > > > > whether inpute fields in the form A left blank > or > > > not. > > > > > > > > But, I am having difficulty in having multiple > > > form > > > > within the <f:view>. How is it handled? > Please > > > > advise. > > > > > > > > > > > > > > > > > > > > > > ____________________________________________________________________________________ > > > > Don't get soaked. Take a quick peak at the > > > forecast > > > > with the Yahoo! Search weather shortcut. > > > > > > > > http://tools.search.yahoo.com/shortcuts/#loc_weather > > > > > > > > > > > > > > > > > > ____________________________________________________________________________________ > > We won't tell. Get more on shows you hate to love > > (and love to hate): Yahoo! TV's Guilty Pleasures > list. > > http://tv.yahoo.com/collections/265 > > > ____________________________________________________________________________________Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online. http://smallbusiness.yahoo.com/webhosting

