%{rules != null && rules.size() > 0} (I didn't test it, I'm just guessing)
-W On 10/10/07, Jake Robb <[EMAIL PROTECTED]> wrote: > Pardon me for being totally new to OGNL, but what would be the > equivalent of ${not empty rules}? > > -----Original Message----- > From: Wes Wannemacher [mailto:[EMAIL PROTECTED] > Sent: Wednesday, October 10, 2007 2:44 PM > To: Struts Users Mailing List > Subject: Re: [S2] s:if test attribute not a runtime expression? > > I noticed something broken in showcase on trunk once and brought it up - > > https://issues.apache.org/struts/browse/WW-2206 > > In discussion, I realized that the dev team is moving away from other > expression languages in favor of OGNL only (or whatever is plugged-in > in struts 2.1.x). > > -W > > On 10/10/07, Jake Robb <[EMAIL PROTECTED]> wrote: > > Okay, this might be a question for the dev list, but bear with me for > a > > minute. > > > > My application is currently using Struts 2.0.8. I read about some > > security and bug fixes in 2.0.9 and 2.0.10. According to the Struts > > JIRA server, 2.0.10 has been complete since September 9th, so I > figured > > I'd wait for that to get promoted to GA rather than upgrading to 2.0.9 > > and then to 2.0.10 shortly thereafter. I then noticed that 2.0.11 is > > also complete in JIRA, and has been since September 21st. > > > > My application is in early development, so I can afford to be an early > > adopter. To that end, I just downloaded Struts 2.0.11 from here: > > http://people.apache.org/builds/struts/2.0.11/ > > > > I upgraded the JAR files in my application and rebuilt. A quick > sanity > > check revealed a JSP compile error: > > > > ConfigureRules.jsp:9:7: Static attribute must be a String literal, its > > illegal to specify an expression. > > <s:if test="${not empty rules}"> > > ^--^ > > > > I dug around for a minute and found something weird. The following is > > an excerpt from struts-tags.tld, which is in struts2-core-2.0.11.jar: > > > > <tag> > > <name>if</name> > > <tag-class>org.apache.struts2.views.jsp.IfTag</tag-class> > > <body-content>JSP</body-content> > > <description><![CDATA[If tag]]></description> > > <attribute> > > <name>id</name> > > <required>false</required> > > <rtexprvalue>false</rtexprvalue> > > <description><![CDATA[id for referencing element. For UI and > form > > tags it will be used as HTML id attribute]]></description> > > </attribute> > > <attribute> > > <name>test</name> > > <required>true</required> > > <rtexprvalue>false</rtexprvalue> > > <description><![CDATA[Expression to determine if body of tag is > to > > be displayed]]></description> > > </attribute> > > </tag> > > > > As you can see, the attribute "test" is configured not to allow > runtime > > expressions. I went back and checked in 2.0.8, and rtexprvalue was > true > > in that version. I downloaded 2.0.9, and it was true there too. I > > haven't downloaded 2.0.10. > > > > So, here's my question: > > > > Is that a deliberate change? If so, why, and what is the new way to > > accomplish what I was doing before? > > > > And a side question: once a version is "complete" in JIRA, what else > has > > to happen before that version becomes GA? > > > > Thanks, > > Jake Robb > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > Wesley Wannemacher > President, Head Engineer/Consultant > WanTii, Inc. > http://www.wantii.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Wesley Wannemacher President, Head Engineer/Consultant WanTii, Inc. http://www.wantii.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]