You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beehive.apache.org by "Rich Feit (JIRA)" <be...@incubator.apache.org> on 2004/11/10 01:06:26 UTC

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

     [ http://nagoya.apache.org/jira/browse/BEEHIVE-60?page=history ]
     
Rich Feit resolved BEEHIVE-60:
------------------------------

      Assign To: Steve Tocco  (was: Rich Feit)
     Resolution: Fixed
    Fix Version: V1Beta

Fixed in svn revision 57113.  Steve/Julie, let me know if you want to discuss this one.

> form input field not initialized when databinding to page flow scoped form
> --------------------------------------------------------------------------
>
>          Key: BEEHIVE-60
>          URL: http://nagoya.apache.org/jira/browse/BEEHIVE-60
>      Project: Beehive
>         Type: Bug
>   Components: NetUI
>     Versions: V1Beta
>     Reporter: Rich Feit
>     Assignee: Steve Tocco
>      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://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira