You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by ch...@globus.ch on 2005/01/13 09:13:48 UTC

Antwort: [Maybe Spam] Re: updateActionListener Bug Or Feature

Unfortunatly I for myself run in this situation in every Webapplication 
I've done yet. I have forms with
several information on one screen. The Problem in this case is, that I 
can't find out which lens he has clicked.
The Action behind the scene is to get the item information from the db and 
insert them in the row....




If I use immediate = false, the Validator of "Menge" "VP" "EP" are 
refusing to execute the "get sku detail action". 

I made an other trick for now, that I make a condition with EL on the 
"required=" attribute.... But that's not the way I'd like to do it in 
future... I'm looking for a better solution
and my intension is to find something like immediate.

Thanks for your thoughts

 Chris







Adam Kruszewski <sp...@kruszewski.name>
12.01.2005 21:23
Bitte antworten an "MyFaces Development"
 
        An:     MyFaces Development <my...@incubator.apache.org>
        Kopie: 
        Thema:  [Maybe Spam] Re: updateActionListener Bug Or Feature


christian.rueedi@globus.ch wrote:
[...]
> The problem is the updateActionListener doesen't execute when
> immediate = true. but of course it does when immediate = false.
>
> Is this as designed?  It would be nice if the updateActionListener
> would execute, so I could pass by the validator ins this case....

AFAIK it is "by design", when immediate=true you can perform various
actions _before_ validating and commiting changes to backing model.
Changed values are still available and you can get them directly from UI
controls. (if you would like to do it then you'll likely end with two
backing beans -- model bean and presentation layer's immediate actions
bean).
Of course some other method to pass by validators would be nice ;-)
but specs doesn't cover this case. (personally I run rather seldom in
situation that I must ommit validators).


Regards,
a.

Re[3]: updateActionListener Bug Or Feature

Posted by Adam Kruszewski <sp...@kruszewski.name>.
christian.rueedi@globus.ch wrote:
[...]
> I made an other trick for now, that I make a condition with EL on the
>  "required=" attribute.... But that's not the way I'd like to do it 
> in future... I'm looking for a better solution and my intension is to
>  find something like immediate.

Probably you can use methods mentioned here:
http://forum.java.sun.com/thread.jspa?forumID=427&threadID=503802

to obtain all values you are interested with and update rest of your ui
controls within immediate=true action handler.
Hope it helps.


Cheers,
   a.