Sunday 15 March 2015

jsf 2 - Handling a callback URL in JSF2 -


I have JSF2 web application that I want to get some criteria from some other web application.

  Another application to redirect the user to my JSF 2 application to use the URL: http://something.com/myjsf2app/getCallback.jsf?item=apple&color=green   

I like that I know what I have to do to get the following two values ​​(item, color) in my backing bean, I should know that deposited on getCallback.jsf Please.

you can see @ViewScoped@ManagedBean

  & lt; H: body & gt; You can use the footage to set the parameters in. & Lt; F: metadata & gt; & Lt; F: Visitor Param Id = "item" name = "item" value = "# {myBean.item}" /> & Lt; F: Event Type = "Prerender View" listener = "# {myBean.init}" /> & lt; / F: Metadata & gt; & Lt; / H: Body & gt;   

The view is ultimate set after your beans apply the @ PostConstruct method. So if you want to do some stuff based on price, then use the event preRenderView

No comments:

Post a Comment