Java

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • tiles question

    7 answers - 788 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    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?
  • No.1 | | 437 bytes | |

    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 (AT) struts (DOT) apache.org
    For additional commands, e-mail: user-help (AT) struts (DOT) apache.org
  • No.2 | | 832 bytes | |

    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>
  • No.3 | | 621 bytes | |

    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.

    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 (AT) struts (DOT) apache.org
    For additional commands, e-mail: user-help (AT) struts (DOT) apache.org
  • No.4 | | 1816 bytes | |

    public ActionForward execute(
    ActionMapping mapping, ActionForm form,
    HttpServletRequest request, HttpServletResponse response)
    throws IException, 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="${}" />

    <ul>
    <li>Person Typy: '<c:out value="${pageScope.simple.personenTypCd}" />'
    </li>
    </ul>

    Thanks for your help.

    10/9/06, Antonio Petrelli <apetrelli (AT) apache (DOT) orgwrote:
    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.
    --
    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 (AT) struts (DOT) apache.org
    For additional commands, e-mail: user-help (AT) struts (DOT) apache.org
  • No.5 | | 699 bytes | |

    Alex Shneyderman ha scritto:
    and relevant JSP from /WEB-INF/jsp/SingExt.jsp (SingularExt.def):

    <c:set var="simple"
    scope="page"
    value="${}" />

    <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 (AT) struts (DOT) apache.org
    For additional commands, e-mail: user-help (AT) struts (DOT) apache.org
  • No.6 | | 992 bytes | |

    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.

    10/9/06, Antonio Petrelli <apetrelli (AT) apache (DOT) orgwrote:
    Alex Shneyderman ha scritto:
    and relevant JSP from /WEB-INF/jsp/SingExt.jsp (SingularExt.def):

    <c:set var="simple"
    scope="page"
    value="${}" />

    <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 (AT) struts (DOT) apache.org
    For additional commands, e-mail: user-help (AT) struts (DOT) apache.org
  • No.7 | | 518 bytes | |

    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 (AT) struts (DOT) apache.org
    For additional commands, e-mail: user-help (AT) struts (DOT) apache.org

Re: tiles question


max 4000 letters.
Your nickname that display:
In order to stop the spam: 0 + 9 =
QUESTION ON "Java"

EMSDN.COM