Hi Volker!

I have investigated the misbehavior in relation to the attributes of the
selectOneRadios used, and I can report you the following:


- the selection is preserved in selectOneRadio using layout = pageDirection
and immediate = true/false
- the selection is preserved in selectOneRadio using layout = spread and
immediate = true
- the selection is NOT preserved in selectOneRadio using layout = spread and
immediate = false


The same goes for the one selectManyCheckbox with layout = spread I used:

- the selection is preserved in selectManyCheckbox using layout spread and
immediate = true
- the selection is NOT preserved in selectManyCheckbox using layout spread
and immediate = false


There are no errors in the logging output except of the following, but I
don't know if it has sth. to do with the problem:
ERROR [org.apache.myfaces.taglib.UIComponentTagUtils] Invalid expression


So I've got a notion that the "misbehavior" must have something to do with
using layout = spread! The value(s) of input components using layout =
spread is only stored in the component when using immediate = true.

I have to state that the commandLink I use to navigate to the subform page
also uses immediate = true, in order that there's no validation until the
user presses the save button at the end of his task.

At the moment, it seems that I have to use immediate = true for all input
components using layout = spread, in order that the values are preserved.
But that way, there will be the validations I didn't want to have.


Regards,
Matthias

> -----Ursprungliche Nachricht-----
> Von: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Auftrag
> von Volker Weber
> Gesendet: Donnerstag, 1. Dezember 2005 19:37
> An: MyFaces Discussion
> Betreff: Re: AW: AW: UI component behavior problem
>
>
> Hi,
>
> would you say that some selectOneRadio tags has a different behavior
> than other selectOneRadio tags? Did they differ in attribute values
> (exept value and component binding of cause).
>
> I have no idea whats going wrong. Maybe some exceptions in the log files?
>
> Regards
>   Volker
>
> Matthias Kahlau wrote:
> > Hi again, Volker!
> >
> >
> > I've added Component-Bindings to ALL of my UI components in the
> meantime,
> > and I regrettably discovered that Component-Binding doesn't
> work for ALL of
> > my components to preserve the selection.
> >
> > There are some selectOneRadio tags, and a selectManyCheckbox, where the
> > choices selected aren't preserved, but resetted. At first I thought, the
> > behavior could be caused by using layout spread, because all of them use
> > this layout, but there's also one selectOneRadio with layout
> spread where
> > the selection is preserved.
> >
> > Can you or somebody else imagine what the cause of this
> misbehaviour might
> > be?
> >
> >
> > Regards,
> > Matthias
> >
> >
> >
> >>-----Ursprungliche Nachricht-----
> >>Von: [EMAIL PROTECTED]
> >>[mailto:[EMAIL PROTECTED] Auftrag
> >>von Matthias Kahlau
> >>Gesendet: Donnerstag, 1. Dezember 2005 13:16
> >>An: MyFaces Discussion
> >>Betreff: AW: AW: UI component behavior problem
> >>
> >>
> >>Hi Volker!
> >>
> >>
> >>Many thanks, ComponentBinding works, my input values are preserved...
> >>
> >>
> >>Regards,
> >>Matthias
> >>
> >>
> >>
> >>>-----Ursprungliche Nachricht-----
> >>>Von: [EMAIL PROTECTED]
> >>>[mailto:[EMAIL PROTECTED] Auftrag
> >>>von Volker Weber
> >>>Gesendet: Donnerstag, 1. Dezember 2005 11:43
> >>>An: MyFaces Discussion
> >>>Betreff: Re: AW: UI component behavior problem
> >>>
> >>>
> >>>Hi Matthias,
> >>>
> >>>you can use component binding to preserve component instances over
> >>>different views.
> >>>
> >>>If you create a bean with getter/setter for all your input components,
> >>>jsf trys to get the component from there and if not found (at
> first time
> >>>accessing) creates them and store there. So you will get the same
> >>>component instances, and the submitted values, as log the bean exists.
> >>>
> >>>you can made it reqest scoped and take it with t:saveState over reqests
> >>>as long as you need it.
> >>>
> >>>Regards
> >>>  Volker
> >>>
> >>>Matthias Kahlau wrote:
> >>>
> >>>>Hi Fintan,
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>>One solution is to have a method in your backing bean which validates
> >>>>>the entire backing bean values (or have a separate
> >>>>>MyBackingBeanValidator class which does the same).  This method is
> >>>>>called just before the "save()" method is called on your
> >>
> >>bean.  This way
> >>
> >>>>>you are validating only when you need to save the data.
> >>>>
> >>>>
> >>>>thanks, but how do you show the user the messages of
> >>
> >>validation errors.
> >>
> >>>>Don't you have to generate the FacesMessages yourself, and
> >>
> >>add it to the
> >>
> >>>>specific component messages in the JSF page? That would
> >>>
> >>>necessarily require
> >>>
> >>>>more code to write and to maintain. Additionally work is
> >>>
> >>>introduced if you
> >>>
> >>>>want the messages to be localized.
> >>>>
> >>>>
> >>>>That's why I think it would be better to have a facility to *
> >>>
> >>>save view away
> >>>
> >>>>/ restore view again * as needed, independent of the navigation
> >>>
> >>>history, or
> >>>
> >>>>the JSF implementation behavior, respectively.
> >>>>
> >>>>
> >>>>Regards,
> >>>>Matthias
> >>>>
> >>>>
> >>>>
> >>>>>-----Ursprungliche Nachricht-----
> >>>>>Von: [EMAIL PROTECTED]
> >>>
> >>>>[mailto:[EMAIL PROTECTED]
> m Auftrag
> >>>>
> >>>>>von Conway. Fintan (IT Solutions)
> >>>>>Gesendet: Donnerstag, 1. Dezember 2005 10:43
> >>>>>An: MyFaces Discussion
> >>>>>Betreff: RE: UI component behavior problem
> >>>>>
> >>>>>
> >>>>>Hi Matthias,
> >>>>>
> >>>>>One solution is to have a method in your backing bean which validates
> >>>>>the entire backing bean values (or have a separate
> >>>>>MyBackingBeanValidator class which does the same).  This method is
> >>>>>called just before the "save()" method is called on your
> >>
> >>bean.  This way
> >>
> >>>>>you are validating only when you need to save the data.
> >>>>>
> >>>>>Just a thought,
> >>>>>
> >>>>>Fintan
> >>>>>
> >>>>>-----Original Message-----
> >>>>>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> >>>>>Sent: 01 December 2005 09:30
> >>>>>To: MyFaces Discussion
> >>>>>Subject: AW: UI component behavior problem
> >>>>>
> >>>>>
> >>>>>
> >>>>>I think that's some kind of problem with JSF. I want the
> validation to
> >>>>>be applied when the form is submitted to save, of cource, at
> >>
> >>the end of
> >>
> >>>>>the user task. But I do not want the page to be validated
> >>
> >>only when the
> >>
> >>>>>user navigates to an edit details page, which is part of the
> >>
> >>form of the
> >>
> >>>>>first page. I also do not want the page to be validated only when the
> >>>>>user changes a selection in a selectOneMenu. Both will break the user
> >>>>>work flow, because the selectOneMany or the edit details link comes
> >>>>>logically before some other input components, or worse, depend on the
> >>>>>selection of the selectOneMenu or selectOneRadio -> that would cause
> >>>>>that the user has to input mandatory info which is not relevant or
> >>>>>required after the selection, which may show a partly different form.
> >>>>>
> >>>>>
> >>>>>
> >>>>>* ** *** ** * ** *** ** * ** *** ** *
> >>>>>This email and any files transmitted with it are confidential and
> >>>>>intended solely for the use of the individual or entity to whom they
> >>>>>are addressed.
> >>>>>Any views or opinions presented are solely those of the author,
> >>>>>and do not necessarily
> >>>>>represent those of ESB.
> >>>>>If you have received this email in error please notify the sender.
> >>>>>
> >>>>>Although ESB scans e-mail and attachments for viruses, it does
> >>>>>not guarantee
> >>>>>that either are virus-free and accepts no liability for any
> >>>>>damage sustained
> >>>>>as a result of viruses.
> >>>>>
> >>>>>* ** *** ** * ** *** ** * ** *** ** *
> >>>>>
> >>>>
> >>>>
> >>>--
> >>>Don't answer to From: address!
> >>>Mail to this account are droped if not recieved via mailinglist.
> >>>To contact me direct create the mail address by
> >>>concatenating my forename to my senders domain.
> >>
> >
>
> --
> Don't answer to From: address!
> Mail to this account are droped if not recieved via mailinglist.
> To contact me direct create the mail address by
> concatenating my forename to my senders domain.

Reply via email to