You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Alex Shneyderman <a....@gmail.com> on 2006/10/09 15:16:19 UTC
tiles question
I have a definition that goes something like this:
<definition name="commonext.def"
extends="common"
path="/WEB-INF/jsp/main.jsp">
<put name="ext" type="page" value="/SingularExt.do" />
</definition>
<definition name="SingularExt.def"
path="/WEB-INF/jsp/SingExt.jsp" />
where SingularExt.do is an action that manipulates data in a session
form and forwards to SingularExt.def
The action that actually spawns the sequences is yet another action
and on its success it forwards to commonext.def.
The SingularExt.do action gets called and I can confirm that my data
is getting set correctly. But when inside the JSP
/WEB-INF/jsp/SingExt.jsp I can not see my data.
Anyone knows what is happening?
--
Thanks,
Alex.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: tiles question
Posted by Antonio Petrelli <ap...@apache.org>.
Alex Shneyderman ha scritto:
> well, thanks for your help.
>
> I gues it has soemthing to do with the fact that i include a tile that
> refers to the page
> that is an action. Might it be that Struts does not handle this case?
I don't think so, since your ActionForm is in session you should not
have any problem referencing that bean....
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: tiles question
Posted by Alex Shneyderman <a....@gmail.com>.
well, thanks for your help.
I gues it has soemthing to do with the fact that i include a tile that
refers to the page
that is an action. Might it be that Struts does not handle this case?
Alex.
On 10/9/06, Antonio Petrelli <ap...@apache.org> wrote:
> Alex Shneyderman ha scritto:
> > and relevant JSP from /WEB-INF/jsp/SingExt.jsp (SingularExt.def):
> >
> > <c:set var="simple"
> > scope="page"
> > value="${sessionScope.SimpleForm.simpleView}" />
> >
> > <ul>
> > <li>Person Typy: '<c:out value="${pageScope.simple.personenTypCd}" />'
> > </li>
> > </ul>
>
> That's really strange, I don't see *really* anything wrong! What I can
> say is to check your log for exception (probably a NullPointerException)
> or check if the "reset" method of the ActionForm gets called...
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: tiles question
Posted by Antonio Petrelli <ap...@apache.org>.
Alex Shneyderman ha scritto:
> and relevant JSP from /WEB-INF/jsp/SingExt.jsp (SingularExt.def):
>
> <c:set var="simple"
> scope="page"
> value="${sessionScope.SimpleForm.simpleView}" />
>
> <ul>
> <li>Person Typy: '<c:out value="${pageScope.simple.personenTypCd}" />'
> </li>
> </ul>
That's really strange, I don't see *really* anything wrong! What I can
say is to check your log for exception (probably a NullPointerException)
or check if the "reset" method of the ActionForm gets called...
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: tiles question
Posted by Alex Shneyderman <a....@gmail.com>.
public ActionForward execute(
ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
SimpleForm simpleForm = (SimpleForm) form;
String forwardName = "success";
SearchService searchService = getServiceLocator().getSearchService();
SimpleView simpleView = searchService.doSearch();
simpleForm.setSimpleView(simpleView);
return mapping.findForward(forwardName);
}
}
the relevant JSP code from /WEB-INF/jsp/main.jsp (commonext.def):
<html:html>
<head>
<title><bean:message key="application.title"/></title>
</head>
<body>
<tiles:insert attribute="ext" />
</body>
</html:html>
and relevant JSP from /WEB-INF/jsp/SingExt.jsp (SingularExt.def):
<c:set var="simple"
scope="page"
value="${sessionScope.SimpleForm.simpleView}" />
<ul>
<li>Person Typy: '<c:out value="${pageScope.simple.personenTypCd}" />'
</li>
</ul>
Thanks for your help.
On 10/9/06, Antonio Petrelli <ap...@apache.org> wrote:
> Alex Shneyderman ha scritto:
> > The SingularExt.do action gets called and I can confirm that my data
> > is getting set correctly. But when inside the JSP
> > /WEB-INF/jsp/SingExt.jsp I can not see my data.
> >
>
> Ok now that I've seen that it seems that there is nothing wrong with
> your action mappings, I have another question: how do you set your data
> and do you get them?
> If you can, post Action's code and JSP code.
>
> Ciao
> Antonio
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: tiles question
Posted by Antonio Petrelli <ap...@apache.org>.
Alex Shneyderman ha scritto:
> The SingularExt.do action gets called and I can confirm that my data
> is getting set correctly. But when inside the JSP
> /WEB-INF/jsp/SingExt.jsp I can not see my data.
>
Ok now that I've seen that it seems that there is nothing wrong with
your action mappings, I have another question: how do you set your data
and do you get them?
If you can, post Action's code and JSP code.
Ciao
Antonio
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [tiles] Re: tiles question
Posted by Alex Shneyderman <a....@gmail.com>.
I do believe those are forwards.
> Are you sure that "forwards" and not "redirects" to the destination
> definition? Please post your action mapping.
anyway here are the action defs:
<action
path="/EntryAction"
type="simple.EntryAction"
name="SimpleForm"
scope="session"
unknown="false"
validate="false"
>
<forward
name="success"
path="commonext.def"
redirect="false"
/>
</action>
and the other action is :
<action
path="/SingularExt"
type="simple.SingularExtAction"
name="SimpleForm"
scope="session"
unknown="false"
validate="false"
>
<forward
name="success"
path="SingularExt.def"
redirect="false"
/>
</action>
--
Thanks,
Alex.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
[tiles] Re: tiles question
Posted by Antonio Petrelli <ap...@apache.org>.
Alex Shneyderman ha scritto:
> The action that actually spawns the sequences is yet another action
> and on its success it forwards to commonext.def.
Are you sure that "forwards" and not "redirects" to the destination
definition? Please post your action mapping.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org