struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Bliznak <bliz...@rogers.com>
Subject Re: Passing runtime exp into tag
Date Fri, 10 Jul 2009 18:45:08 GMT
Figured it out, forget it.




________________________________
From: Peter Bliznak <bliznak@rogers.com>
To: Struts Users Mailing List <user@struts.apache.org>
Sent: Friday, July 10, 2009 11:23:15 AM
Subject: Passing runtime exp into tag

Hi all,
translating portion of old code which was using S1 and Tiles and 
ran into problem.

There is one tile representing form which is being used on almost all screens.
One doesn't want to write same tile over and over again since only name
of the action differs.

Existing code used this:

// define name of the action to be a passed from parent tile
<tiles:useAttribute name="formAction" />

then it was used like this:

<html:form action="<%= formAction.toString() %>" ......


I've changed this to use S2 tags:

<s:form action="<%= formAction.toString() %>"  .........

and jsp compilers complains:


JSPG0227E: Exception caught while translating /layout/formLayout.jsp:  
/layout/formLayout.jsp(11,1) --> JSPG0124E: Custom tag attribute action 
cannot be runtime expression. value: "[%= formAction.toString() %]"

Any ideas how to solve it?

Thanks,

Peter.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message