> Date: Thu, 27 Jun 2013 13:21:35 +0200
> From: frich...@mtg.de
> To: user@struts.apache.org
> Subject: Re: if/elseif tag syntax
> 
> Am 27.06.2013 12:59, schrieb Antonios Gkogkakis:
> > But how would the framework know with what to populate it?
> >
> > You either do it manually in the body of the action that you execute to
> > reach the view ,e.g.,
> >
> > certificate = //logic to get the certificate
> >
> > or you can implement the ModelDriven interface which has a method (prepare
> > I think) that gets called prior to executing the action
> >
> 
> Thank you for that information, another gap closed :) I tested something 
> that had similar results but wasnt sure if I understood what was 
> happening correctly.
> 
> So I checked the jsp code further, and certificate is defined in the 
> surrounding forEach
> 
> <c:forEach var="certificate" items="${request.localCertificates}">
> 
> Which is a JSTL Core tag, how can I access these vars from struts tags? 
  <c:forEach items="${request.localCertificates}" var="name">
            <tr>
                <td><c:out value="${certificate}"/></td>
                <td><c:out 
value="${certificate[wrappedCert[issuerX500Principal[ [RFC2253] ] ] ]}"/></td>
            </tr>
        </c:forEach>MG>
> Or is nesting struts and JSTL tags a very bad idea?
MG>not if you reference by unique taglib declaratorsors  e.g.<%@ taglib 
uri="http://java.sun.com/jstl/core"; prefix="c" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
> 
> I thought that forEach line was pushing the certificate onto the 
> ValueStack but then I would be able to read it via certificate anywhere 
> within the forEach enclosing lines right?
MG>ValueStack is a Collection class only for struts collection classes
MG>ValueStack is accessed with OGNL (object graph notational language) when 
parser sees the # prefix e.g. <s:property value="#name"/>
http://www.tutorialspoint.com/struts_2/struts_value_stack_ognl.htm
> 
> Best
MG>*Gruss*
MG>Martin
> 
                                          

Reply via email to