Data Binding problem
Hi All,
New to JSF and Portlets.
I am trying to create a portlet which has a input text field and a submit button.
<f:view>
<ui:form binding="#{Page1.form1}" id="form1">
<ui:textField binding="#{Page1.textField1}" id="textField1" text="#{RequestBean1.fullName}"/>
<ui:button action="#{Page1.button1_action}" binding="#{Page1.button1}" id="button1" text="Button"/>
</ui:form>
Once the form is submitted the text entered in the field is modified as:
//Method in Page1.java
public String button1_action(){
// TODO: Process the button click action. Return value is a navigation
// case name where null will return to the same page.
getRequestBean1().setFullName("Welcome "+getRequestBean1().getFullName());
return"success";
}
and is then displayed in page2.jsp
<ui:staticText binding="#{page2.staticText1}" id="staticText1" text="#{RequestBean1.fullName}"/>[
This code works absolutely fine while its a simple JSF web project.
But does not work if its a portlet.
The output in the page2.jsp,( after submitting the page1.jsp) Shows nothing.why so?
Works fine if I use session scoped bean , SessionBean1.java
It seems the Request bean is lost, but in simple JSF it works. why only in portal it is lost? Am I missing something?

