Re: simple struts tag to eval OGNL

2008-06-18 Thread Musachy Barroso
If you have devMode set to "true", you can add debug=console to your URL and you will get an OGNL console. musachy On Wed, Jun 18, 2008 at 1:32 PM, Brad A Cupit <[EMAIL PROTECTED]> wrote: > Hi, is there a simple tag I can use to just evaluate some OGNL? For > example, if I have the following line

RE: simple struts tag to eval OGNL

2008-06-18 Thread Brad A Cupit
he page for creating the html. Brad Cupit Louisiana State University - UIS -Original Message- From: Musachy Barroso [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 18, 2008 1:08 PM To: Struts Users Mailing List Subject: Re: simple struts tag to eval OGNL If you have devMode set to &quo

Re: simple struts tag to eval OGNL

2008-06-18 Thread Lukasz Lenart
> I didn't know that. > but actually, I was kind of looking for something that would stay in the > page. It wouldn't be for debugging, but some simple logic in the page > for creating the html. ? Regards -- Lukasz http://www.lenart.org.pl/ -

RE: simple struts tag to eval OGNL

2008-06-18 Thread Brad A Cupit
Lukasz Lenart wrote: > what I’m really trying to do is have nice integration between s:select and enums. I want a select box with each of the enum choices in it. For this to work, I'd need the enum name as the key in a map, and a user-friendly-string-representation of the enum as the value. I

Re: simple struts tag to eval OGNL

2008-06-18 Thread Lukasz Lenart
Hi, I'm using something like this: in action I have public EmployeeType[] getEmployeeTypes() { return EmployeeType.values(); } and the enum public enum EmployeeType { DIRECT("D"), INDIRECT("I"), OFFICE("O"); private String shortcut; EmployeeType(String s

RE: simple struts tag to eval OGNL

2008-06-18 Thread Brad A Cupit
Lukasz Lenart wrote: > I'm using something like this: > > list="employeeTypes" listKey="shortcut" > listValue="name()" required="true"/> Oh wonderful! I didn't know that’s what listKey and listValue were for. I was able to take my four lines of JSP and convert them into just

Re: simple struts tag to eval OGNL

2008-06-18 Thread Lukasz Lenart
> p.s. to call the static values() method of the enum, > struts.ognl.allowStaticMethodAccess must be set to true in struts.properties > or struts.xml Thanks, I've also learned something new ;-) Regards -- Lukasz http://www.lenart.org.pl/ --