After looking at the subForm, I'd recommend using it over my
suggestion. It will (hopefully) support state saving methods better
than two independant forms. I am using server state as it seems more
"friendly" although it does have some serious side effects (like
trying to have multiple view active for multiple windows for example).
Too bad it is sandbox and not tomahawk. Trying to build and update the
sandbox is a pain as there are no nightlies for it (there is an open
JIRA on this).

-Andrew

On 5/4/06, Catalin Kormos <[EMAIL PROTECTED]> wrote:
Hi Michael,

The component is stable and functional, you can use it with no problem. You
are right, only one html form is generated, and the components surrounded by
a subForm can update model values and/or be validated separately from other
components in the main form.

It works with both client side and server side state saving.

Regards,

Catalin

Michael Heinen <[EMAIL PROTECTED]> wrote:


Thanks Catalin.

subForm sounds promising.

I wait for the next version of MyFaces/Tomahawk/sandbox until I test it.

How stable is this sandbox component?
I assume that 1 html form is generated and not 1 for each subform.
Does subForm work with both state saving methods?

Michael


 ________________________________

From: Catalin Kormos [mailto:[EMAIL PROTECTED]
 Sent: Mittwoch, 3. Mai 2006 20:14
 To: MyFaces Discussion
 Subject: Re: 2 forms on one page?

Hi,

 Looks to me like you could use the subForm component from sandbox:
 http://myfaces.apache.org/sandbox/subForm.html

 HTH,
 Catalin

 Michael Heinen <[EMAIL PROTECTED]> wrote:

Hi all,



I have another question:



Is it possible to define 2 forms on one page and that only the submitted
form is validated?

e.g. buttonA submits formA and buttonB submits formB?



I have a datatable on my page with a detail pane.

The detail pane contains some fields in order to update the detail data of
the selected object (formA).

If the user selects multiple objects in the datatable, then I have to show
another form (formB) in order to update different fields at once for the
selected objects.

These fields have to be bound to different attributes of my backing bean of
course.

So if the user submits formB then the model of formA should not be updated.



I want to switch the visibility of the 2 forms via javascript without a
generating new server request.

Does JSF support the above scenario (e.g. with subviews)?

Or is this a requirement that should be better processed with ajax (which
would be more complex for me)?



Any help is highly appreciated again

Michael

 ________________________________

Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+
countries) for 2�/min or less.


 ________________________________
Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.


Reply via email to