[
http://issues.apache.org/jira/browse/BEEHIVE-568?page=comments#action_63992 ]
Carlin Rogers commented on BEEHIVE-568:
---------------------------------------
You can definitely use a file include to construct the page
as desired from the multiple JSP files. Use something like...
<[EMAIL PROTECTED] file="/nae/nae011/tips.jsp"%>
<[EMAIL PROTECTED] file="navigator.jsp"%>
Wrapping each of the individual form components in a
<netui:form> tag does not work because the tag libs will
create HTML Form tags for each one. They will all go to
the same action and they will all have the same ID.
You might not be seeing the exception about "actionForm"
being null but you are not constructing the correct HTML.
Depending on how you write your file, you may even have
forms within a form.
Try using <[EMAIL PROTECTED] file="filename"%>. I tested this
on a page configuration like you example and it worked
for me.
As a side issue, I tested forms within tiles (where the
complete form is in a file being inserted via tiles. Seems
to work correctly. I am closing this as "not a bug".
> 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
> Attachments: jspinc.zip
>
> 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