Re: [JSF] How to execute action directly from link (like struts action)
Hi Adrian, looks interesting - will give it a try also, thanks. 2009/4/21 Adrian Mitev > On Tue, Apr 21, 2009 at 11:53 AM, Anton Gavazuk > wrote: > > Hi Matthias, > > > > thank you for the answer, > > > >>>One option could be doing some sort of logic (e.g. extracting req > >>>param) in the constructor > > that was my point - I dont like this way: in case of an exception (no > object > > with Id found)/an alternative navigationc case I would need call from > > constructor (postCreate method) facesContext.. > > navigateMethod - its ugly. > > > > will look on this lib. > > http://jsf-comp.sourceforge.net/components/on-load/index.html > > > > > > You could also take a look at pretty faces - > http://ocpsoft.com/prettyfaces/ > > -- > Although nobody can come back and make a new start, anyone can start > now and make a new end >
Re: [JSF] How to execute action directly from link (like struts action)
On Tue, Apr 21, 2009 at 11:53 AM, Anton Gavazuk wrote: > Hi Matthias, > > thank you for the answer, > >>>One option could be doing some sort of logic (e.g. extracting req >>>param) in the constructor > that was my point - I dont like this way: in case of an exception (no object > with Id found)/an alternative navigationc caseĀ I would need call from > constructor (postCreate method) facesContext.. > navigateMethod - its ugly. > > will look on this lib. > http://jsf-comp.sourceforge.net/components/on-load/index.html > > You could also take a look at pretty faces - http://ocpsoft.com/prettyfaces/ -- Although nobody can come back and make a new start, anyone can start now and make a new end
Re: [JSF] How to execute action directly from link (like struts action)
On Tue, Apr 21, 2009 at 10:53 AM, Anton Gavazuk wrote: > Hi Matthias, > > thank you for the answer, > >>>One option could be doing some sort of logic (e.g. extracting req >>>param) in the constructor > that was my point - I dont like this way: in case of an exception (no object sure, nobody really likes it. ViewControllers, e.g. Shale or Orchestra jump in here Also, Seam's pageActions are similar -M > with Id found)/an alternative navigationc caseĀ I would need call from > constructor (postCreate method) facesContext.. > navigateMethod - its ugly. > > will look on this lib. > http://jsf-comp.sourceforge.net/components/on-load/index.html > > > Thanks, > Anton > > > > 2009/4/21 Matthias Wessendorf >> >> On Tue, Apr 21, 2009 at 10:24 AM, Anton Gavazuk >> wrote: >> > Hi all, >> > >> > I need advice/suggest for such situation: >> > >> > is there any way to execute an action in bean/(in listener) when user >> > requests certain jsf page? - for example: /customer/edit.jsf?id=172387 >> > >> > Why I need this: I want to make some preprocessing logic before showing >> > the >> > final page. >> > >> > I know there is possibility to make this by @PostCreate execution, but >> > maybe >> > there are other ways, more convenient? >> >> One option could be doing some sort of logic (e.g. extracting req >> param) in the constructor >> of a backing bean. >> >> Another option is using Orchestra's view controller >> >> Or, using this tool: >> >> http://jsf-comp.sourceforge.net/components/on-load/index.html >> >> > >> > Thanks, >> > Anton. >> > >> > >> > >> >> >> >> -- >> Matthias Wessendorf >> >> blog: http://matthiaswessendorf.wordpress.com/ >> sessions: http://www.slideshare.net/mwessendorf >> twitter: http://twitter.com/mwessendorf > > -- Matthias Wessendorf blog: http://matthiaswessendorf.wordpress.com/ sessions: http://www.slideshare.net/mwessendorf twitter: http://twitter.com/mwessendorf
Re: [JSF] How to execute action directly from link (like struts action)
Hi Matthias, thank you for the answer, >>One option could be doing some sort of logic (e.g. extracting req >>param) in the constructor that was my point - I dont like this way: in case of an exception (no object with Id found)/an alternative navigationc case I would need call from constructor (postCreate method) facesContext.. navigateMethod - its ugly. will look on this lib. http://jsf-comp.sourceforge.net/components/on-load/index.html Thanks, Anton 2009/4/21 Matthias Wessendorf > On Tue, Apr 21, 2009 at 10:24 AM, Anton Gavazuk > wrote: > > Hi all, > > > > I need advice/suggest for such situation: > > > > is there any way to execute an action in bean/(in listener) when user > > requests certain jsf page? - for example: /customer/edit.jsf?id=172387 > > > > Why I need this: I want to make some preprocessing logic before showing > the > > final page. > > > > I know there is possibility to make this by @PostCreate execution, but > maybe > > there are other ways, more convenient? > > One option could be doing some sort of logic (e.g. extracting req > param) in the constructor > of a backing bean. > > Another option is using Orchestra's view controller > > Or, using this tool: > > http://jsf-comp.sourceforge.net/components/on-load/index.html > > > > > Thanks, > > Anton. > > > > > > > > > > -- > Matthias Wessendorf > > blog: http://matthiaswessendorf.wordpress.com/ > sessions: http://www.slideshare.net/mwessendorf > twitter: http://twitter.com/mwessendorf >
Re: [JSF] How to execute action directly from link (like struts action)
On Tue, Apr 21, 2009 at 10:24 AM, Anton Gavazuk wrote: > Hi all, > > I need advice/suggest for such situation: > > is there any way to execute an action in bean/(in listener) when user > requests certain jsf page? - for example: /customer/edit.jsf?id=172387 > > Why I need this: I want to make some preprocessing logic before showing the > final page. > > I know there is possibility to make this by @PostCreate execution, but maybe > there are other ways, more convenient? One option could be doing some sort of logic (e.g. extracting req param) in the constructor of a backing bean. Another option is using Orchestra's view controller Or, using this tool: http://jsf-comp.sourceforge.net/components/on-load/index.html > > Thanks, > Anton. > > > -- Matthias Wessendorf blog: http://matthiaswessendorf.wordpress.com/ sessions: http://www.slideshare.net/mwessendorf twitter: http://twitter.com/mwessendorf
[JSF] How to execute action directly from link (like struts action)
Hi all, I need advice/suggest for such situation: is there any way to execute an action in bean/(in listener) when user requests certain jsf page? - for example: /customer/edit.jsf?id=172387 Why I need this: I want to make some preprocessing logic before showing the final page. I know there is possibility to make this by @PostCreate execution, but maybe there are other ways, more convenient? Thanks, Anton.