[ http://issues.apache.org/jira/browse/BEEHIVE-568?page=all ]

Eddie O'Neil reassigned BEEHIVE-568:
------------------------------------

    Assign To: Carlin Rogers

Carlin, can you take a look at this to make sure we're not doing something 
weird with Tiles and the NetUI form tag?

Just a note; in order to use the "actionForm" implicit object, there *must* be 
a <netui:form> tag present.  This tag is responsible for inferring the form 
bean type that is created and added to the attribute map.  In the absence of 
the form tag, the "actionForm" implicit object will be null.  When using the 
NetUI tags for HTML forms (textBox, checkBox, etc), the implicit object must 
exist in order for the tag to function correctly; that's why the error is 
showing up with these lines:

<%-- netui:form action is NOT defined here --%>
<netui:textbox dataSource="actionForm.something2"/>

NetUI is just more strict with null implicit objects than the JSP 2.0 EL.

The pageFlow implicit object is available throughout any JSP that is associated 
with a live JPF.  So, it is available as ${pageFlow} regardless of the JSP tags 
in the page.

Hope that helps...

> Accesing actionForm in TILES
> ----------------------------
>
>          Key: BEEHIVE-568
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-568
>      Project: Beehive
>         Type: Test
>   Components: NetUI
>     Versions: V1Beta
>  Environment: Windows XP, Tomcat 5.0.28, JDK 1.5
>     Reporter: V.Gnanasegaran
>     Assignee: Carlin Rogers

>
> Pleace look into the sample code.
> Page A (some.jsp)
> <tiles:insert flush="true" page="/resources/jsp/mal/layout.jsp">
>       <tiles:put name="sometips" value="/nae/nae011/tips.jsp"/>
> </tiles:insert>
> Layout page B (layout.jsp)
> <%@ page language="java" contentType="text/html;charset=UTF-8"%>
> <%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles"; prefix="tiles"%>
> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
> <%@ taglib uri="bjeff.tld" prefix="bjeff"%>
> <html>
>   <body>
>   
>       <netui:form action="goForward" tagId="htmlForm">
>   
>     <table cellspacing = "0" cellpadding = "0" border = "0">
>       <tr>
>         <td class = "layoutLeft" rowspan = "1">
>           <jsp:include page="navigator.jsp" />
>         </td>
>       
>         <td class="layoutContent content">
>             <tiles:insert attribute="sometips" />
>         </td>
>         <td class = "layoutRight" rowspan = "2">
>           <netui:content value = "${actionForm.something1}"/>
>         </td>
>       </netui:form>
>   </body>
> </html>   
> Inserted page C (tips.jsp)
> <%-- netui:form action is NOT defined here --%>
> <netui:textbox dataSource="actionForm.something2"/>
> As you see in the code sample when I run the code I have got two problems.
> 1) Occures an exception "Caught exception when evaluating expression 
> "{actionForm.something2}" .Can not evaluate 
>       the identifier "something2" on a null value object". This means when 
> the page C is executed the actionForm
>       is null. If I define a netui:form then it desplays. As this page is 
> inserted in the layout page actionForm
>       must be available to page C. 
> 2) When the form is submitted to the Controller, the controller does not get 
> the updated form attribute values.
> I would like to know why actionForm is null when executing tips.jsp. But 
> pageFlow is a valid instanse when 
>       executing tips.jsp. The second question is depend on the answer of the 
> first one.

-- 
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

Reply via email to