Re: Struts 2 obtaining a property value with no corresponding getXX() method

2011-02-01 Thread RogerV
Chris Pratt wrote: > > You might try . I'm not sure if it will work, > but OGNL has the ability to call methods by their full name. > > Thanks Chris, works a treat. Regards -- View this message in context: http://old.nabble.com/Struts-2-obtaining-a-property-value-with-no-corresponding

Re: [OT?] standalone jsp

2011-02-01 Thread Dave Newton
I'd probably start here, although I'm not sure if it's really what you wanted--memory is still a little hazy on this one. http://struts.apache.org/2.x/docs/embedded-jsp-plugin.html Dave On Sat, Jan 29, 2011 at 7:26 PM, Dave Newton wrote: > I'd just search back through the list archives; I don't

Re: struts2 property tag, how to dynamically set property name

2011-02-01 Thread Ken McWilliams
Thank you Dave, I just managed to resolve the issue in a slightly earlier post. Here is the action that backs the JSP. Now In my table I have a column which prints out db.localhost.test.Groups[name=ADMIN] because the object is db.localhost.test.Groups and it has a single property called name. Anot

Re: struts2 property tag, how to dynamically set property name

2011-02-01 Thread Dave Newton
Sorry; that was a draft and missed tab keystrokes--you already found it out :) Dave On Tue, Feb 1, 2011 at 6:49 PM, Dave Newton wrote: > On Tue, 2011-02-01 at 15:35 -0700, Ken McWilliams wrote: >> >>     >> ... >> >> I want propertyNames to be evaluated and the result used >> as the value for

Re: struts2 property tag, how to dynamically set property name

2011-02-01 Thread Dave Newton
On Tue, 2011-02-01 at 15:35 -0700, Ken McWilliams wrote: > >     > ... > > I want propertyNames to be evaluated and the result used > as the value for the iterator, not simply interpreted as a > normal list. Evaluated in what context? As a list of named properties on the item being iterated over

Re: struts2 property tag, how to dynamically set property name

2011-02-01 Thread Ken McWilliams
Well I don't know if MapPropertyAccess would do what I want but found an answer: The following iterates over a list of POJO's and the properties are determined for the particular POJO at run time and put in the propertyValues list. The following is able to look up the property value dynamically wi

Re: struts2 property tag, how to dynamically set property name

2011-02-01 Thread Ken McWilliams
It looks like I need to use a PropertyAccessor and ognl.MapPropertyAccessor specifically. Are there any demos in how to use it, can one use it directly from the JSP? On Tue, 2011-02-01 at 15:35 -0700, Ken McWilliams wrote: > Hello I have a list of properties from a POJO as found using > introspe

struts2 property tag, how to dynamically set property name

2011-02-01 Thread Ken McWilliams
Hello I have a list of properties from a POJO as found using introspection. I want to iterate over a result set for each row, and iterate over a list of property names for each cell in a table. Something like: //I want propertyNames to be evaluated and the result used

Re: displaytag1.2 + struts2.2.1.1 + jfreechart. Graph did not update based on displaytag sortable column

2011-02-01 Thread Emi Lu
> wrote: displaytag1.2 + struts2.2.1.1 + jfreechart. Can display graph, but when using displaytag to order by a specific column , the graph does not refresh automatically. Some clues? > If the i

Re: displaytag1.2 + struts2.2.1.1 + jfreechart. Graph did not update based on displaytag sortable column

2011-02-01 Thread Dave Newton
On Tue, Feb 1, 2011 at 3:57 PM, Emi Lu wrote: >displaytag1.2 + struts2.2.1.1 + jfreechart. >> >> >>Can display graph, but when using displaytag to order by a >> >>specific column , the graph does not refresh automatically. >> >>Some clues? >> > > > If the image is on the page

Re: displaytag1.2 + struts2.2.1.1 + jfreechart. Graph did not update based on displaytag sortable column

2011-02-01 Thread Chris Pratt
It sounds like what you're trying to do is a displaytag feature. You may have more luck in their mailing list. (*Chris*) On Tue, Feb 1, 2011 at 12:57 PM, Emi Lu wrote: > Dave, > > displaytag1.2 + struts2.2.1.1 + jfreechart. >> >> >>Can display graph, but when using displaytag to o

Re: displaytag1.2 + struts2.2.1.1 + jfreechart. Graph did not update based on displaytag sortable column

2011-02-01 Thread Emi Lu
Dave, displaytag1.2 + struts2.2.1.1 + jfreechart. Can display graph, but when using displaytag to order by a specific column , the graph does not refresh automatically. Some clues? > If the image is on the page why would it refresh unless the page refreshes? By clicki

Re: displaytag1.2 + struts2.2.1.1 + jfreechart. Graph did not update based on displaytag sortable column

2011-02-01 Thread Dave Newton
On Tue, Feb 1, 2011 at 3:36 PM, Emi Lu wrote: > displaytag1.2 + struts2.2.1.1 + jfreechart. > > > > Can display the graph, but when using displaytag to order by a specific > column , the graph does not refresh automatically. > > Some clues? > Not much information to go on. If the image is on t

displaytag1.2 + struts2.2.1.1 + jfreechart. Graph did not update based on displaytag sortable column

2011-02-01 Thread Emi Lu
Good afternoon, displaytag1.2 + struts2.2.1.1 + jfreechart. Can display the graph, but when using displaytag to order by a specific column , the graph does not refresh automatically. Some clues? thanks a lot! -- Lu Ying GUI is like the following: col1

Re: Changing The Result Page

2011-02-01 Thread Richard Sayre
This looks like a good Idea. I will test it and Dave N's suggestion as well. Thank you All On Tue, Feb 1, 2011 at 3:14 PM, Chris Pratt wrote: > To extend on this idea, instead of requiring all your actions to add a > getBtype(), you could use an interceptor that determine's the Browser Type > a

Re: Changing The Result Page

2011-02-01 Thread Chris Pratt
To extend on this idea, instead of requiring all your actions to add a getBtype(), you could use an interceptor that determine's the Browser Type and sets a context attribute you could access using: /${#btype}/Profile.jsp (*Chris*) On Tue, Feb 1, 2011 at 10:36 AM, Greg Lindholm wrote: > You c

Re: Changing The Result Page

2011-02-01 Thread stanlick
Have you considered Sitemesh? On Tue, Feb 1, 2011 at 11:50 AM, Richard Sayre wrote: > I am making a mobile site for my current web application. I have a > huge number of actions that return to JSP pages. I have a mobile > detection class written. > > Is there a way that I can change the result

Re: Changing The Result Page

2011-02-01 Thread Greg Lindholm
You could also add a "btype" (browser type) macro to your jsp paths like this... /struts2/${btype}/Profile.jsp Your actions would have to have a getBtype() method that supplied that portion of the path. This assumes you keep the mobile jsp pages in a separate directory then the desktop. Another

Re: Changing The Result Page

2011-02-01 Thread Dave Newton
Interceptor w/ pre-result listener? Dave On Tue, Feb 1, 2011 at 12:50 PM, Richard Sayre wrote: > I am making a mobile site for my current web application. I have a > huge number of actions that return to JSP pages. I have a mobile > detection class written. > > Is there a way that I can change

Changing The Result Page

2011-02-01 Thread Richard Sayre
I am making a mobile site for my current web application. I have a huge number of actions that return to JSP pages. I have a mobile detection class written. Is there a way that I can change the result page if the user is on a mobile device? I want to avoid having to write this in all my actions

Re: Struts 2 obtaining a property value with no corresponding getXX() method

2011-02-01 Thread Chris Pratt
You might try . I'm not sure if it will work, but OGNL has the ability to call methods by their full name. Also, if you haven't overridden toString() you can just use which will automatically call Authority.toString() which by default returns .name(). (*Chris*) On Tue, Feb 1, 2011 at 5:03 AM,

Re: Struts 2 obtaining a property value with no corresponding getXX() method

2011-02-01 Thread Dave Newton
The first thing I'd try is calling the method on the object of iteration. Dave On Tue, Feb 1, 2011 at 8:03 AM, RogerV wrote: > > Hi > > I'm trying to iterate over a collection of Enums of type Authority using > > > >

Struts 2 obtaining a property value with no corresponding getXX() method

2011-02-01 Thread RogerV
Hi I'm trying to iterate over a collection of Enums of type Authority using , but I'm not getting any values displayed. Debugging shows that the call getUserDTO().getAuthorities()

RE: De-serialize JSON to Action

2011-02-01 Thread Jose Luis Martinez Avial
Well, Struts does it in the ParametersInterceptor, so it shouldn't be difficult to 'map' a map to a bean. I haven't had the time to dig on that, but maybe someone has and can propose some way to do it. JL -Original Message- From: Harsh C [mailto:hchau...@gmail.com] Sent: Monday, January

Re:

2011-02-01 Thread Agoston Bejo
Thanks Chris, the problem is that there are other s:submit buttons on the form the action attributes of which point to actions in the current namespace. Changing the namespace of the form would mess that up and I would end up with the same problem. I've tried it out, and there's really no "