You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beehive.apache.org by "Julie Zhuo (JIRA)" <be...@incubator.apache.org> on 2005/05/13 22:00:12 UTC

[jira] Closed: (BEEHIVE-60) form input field not initialized when databinding to page flow scoped form

     [ http://issues.apache.org/jira/browse/BEEHIVE-60?page=all ]
     
Julie Zhuo closed BEEHIVE-60:
-----------------------------


Verified fixed at rev170027. The text box is correct initialized with value hello.

> form input field not initialized when databinding to page flow scoped form
> --------------------------------------------------------------------------
>
>          Key: BEEHIVE-60
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-60
>      Project: Beehive
>         Type: Bug
>   Components: NetUI
>     Versions: V1Beta
>     Reporter: Rich Feit
>     Assignee: Julie Zhuo
>      Fix For: V1Beta

>
> In a page flow, add the following code, which contains an action ('submit') that uses a page flow-scoped form bean:
> ---
>     private MyForm _form = new MyForm( "hello" );
>     public static class MyForm extends FormData
>     {
>         private String _message;
>         public MyForm() {}
>         public MyForm( String message ) { _message = message; }
>         public void setMessage( String message ) { _message = message; }
>         public String getMessage() { return _message; }
>     }
>     public MyForm getMyForm()
>     {
>         return _form;
>     }
>     
>     @Jpf.Action(
>         forwards={
>             @Jpf.Forward(name="inputPage", path="input.jsp")
>         }
>     )
>     public Forward goInput()
>     {
>         return new Forward( "inputPage" );
>     }
>     @Jpf.Action(
>         useFormBean="_form",
>         forwards={
>             @Jpf.Forward(name="inputPage", path="input.jsp")
>         }
>     )
>     public Forward submit( MyForm form )
>     {
>         return new Forward("inputPage");
>     }
> ---
> In input.jsp, put the following code:
>         <netui:form action="submit">
>             message: <netui:textBox dataSource="actionForm.message"/>
>             <netui:button value="submit"/>
>             <i><netui:span value="${pageFlow.myForm.message}"/></i>
>         </netui:form>
> Now hit the 'goInput' action.  In the resulting JSP, note that the text box is not correctly initialized with the value 'hello', even though it refers to a page flow-scoped form bean whose value was initialized.  Note also that the netui:span, which binds directly to the form bean through the 'pageFlow' binding context, displays the correct value.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira