RE: Content DIV update strategy

2010-02-19 Thread Martin Gainty
i would suggest including handler attribute e.g. function handler(widget,node) { node.innerHtml="new content goes here"; } i would suggest reading and studying XMLHttpRequest for an understanding of Asynchronous Request Model as implemented by AJAX.. Saludos Cordiales, Martin Gainty ___

s1: and its selected option's label

2010-02-19 Thread farmer2008
Hi, The selected option's value can be retrieved via the property attribute in tag . Is there a way to retrieve the selected option's label via tag or tag? Thanks. -- View this message in context: http://old.nabble.com/s1%3A-%3Chtml%3Aselect...-%3E-and-its-selected-option%27s-label-tp276630

Content DIV update strategy

2010-02-19 Thread Jose A. Corbacho
Hi all, I would like your advise for a problem I'm facing with sx:div. I'm using JDK 1.5, Struts 2.1.6 and Firefox 3.0.18 under Ubuntu. In our application, we have a central sx:div in the Main action page where the content is displayed. It is declared as follows: Then,

Re: XSS vulnerability with

2010-02-19 Thread Wes Wannemacher
Go ahead and file a jira. Better yet, file one with a patch and unit test. I don't know if we would make escaping the default (it might break backward compatibility). But it is definitely worth putting in the next release. -Wes On 2/19/10, John Orr wrote: > Thanks for the cleaner code - that is

version conflict?

2010-02-19 Thread Bill Bohnenberger
Struts 2 documentaion at * http://struts.apache.org/2.x/docs/building-the-framework-from-source.html* implies (at the bottom of the page) that only java 1.5 is required. But when I deploy my app to a tomcat 5.5.27 server using jdk 1.5.0_20, I get the UnsupportedClassVersionError below. Am I right i

RE: Interceptor

2010-02-19 Thread CRANFORD, CHRIS
Have to use ac.getValueStack().set(key,value) instead. This fixed the issue. -Original Message- From: CRANFORD, CHRIS [mailto:chris.cranf...@setech.com] Sent: Friday, February 19, 2010 11:11 AM To: Struts Users Mailing List Subject: RE: Interceptor Correct it was a typo. I have modified

RE: Interceptor

2010-02-19 Thread CRANFORD, CHRIS
Correct it was a typo. I have modified my Interceptor with the following internal class: private class TimerPreResultListener implements PreResultListener { private long started; private Logger log = LogManager.getLogger(TimerInterceptor.class); public TimerPreResultListener() { starte

Re: Interceptor

2010-02-19 Thread Cimballi
Chris, Your algorithm with Calendars is realyl complicated, can't you simply use System.currentTimeMillis() ? Then, can you also add a log to the interceptor so that you can log the value before you put it in the value stack ? It will not solve your pb but it will make things more clear and will h

Re: Interceptor

2010-02-19 Thread John Orr
Yes, I think this is exactly the issue raised in my last post. Your result is being processed before the lines that follow the action invocation. Insert a PreResultListener and it can do the job of updating. (BTW, your method is called interceptor() but it should be Intercept() - I'm guessing that

RE: Interceptor

2010-02-19 Thread CRANFORD, CHRIS
My RequestTimerInterceptor is very basic and looks just like this below. What I find is that if I use a tag in my JSP, the action context parameter is being set to 0 but the update at the end of the interceptor isn't applied. What have I missed? public String interceptor(ActionInvocation ac

Re: Interceptor

2010-02-19 Thread John Orr
I think this case gets a little more complicated because you want the timer data to be available to your result. If you simply wait for your call to ActionInvocation.invoke() to return, then your result will already have been processed. So you need to use your interceptor to set a PreResultListener

Re: Interceptor

2010-02-19 Thread Cimballi
Look at ParameterRemoverInterceptor for example, you can access the action context like this : ActionContext ac = invocation.getInvocationContext(); And then you can set values in the value stack. Didn't test it but should work. Cimballi On Fri, Feb 19, 2010 at 11:10 AM, CRANFORD, CHRIS wrote:

Interceptor

2010-02-19 Thread CRANFORD, CHRIS
Is it possible to set a value in the request or valuestack from an interceptor that contains the total time it took for the action to be invoked and executed? I have a requirement to show this on the JSP page and didn't know if I could do this within the Interceptor or if I have to do this in my b

Re: how to eliminate time in

2010-02-19 Thread wild_oscar
Aaah, dates! Add an s:date and associate with the textfield, like: I'm not sure if both tags need the "name" or not - post your findings. fireapple wrote: > > Does that mean I have to create something like: > > public String getStartDateStr() > { > ... > } > > to do this? > > I

Re: XSS vulnerability with

2010-02-19 Thread John Orr
Thanks for the cleaner code - that is an improvement, and I'll use that idiom. I agree that generally is intended for displaying safe text. However the use case "Hello, {0}" has to be pretty common, when something like a user name is inserted. Also the ability to access OGNL inside resource bundl

Re: how to eliminate time in

2010-02-19 Thread fireapple
Does that mean I have to create something like: public String getStartDateStr() { ... } to do this? I don't want to use this because if I use this getter, I have to create a setter for this since user can edit the date. Any other options? Thanks Brian Thompson-5 wrote: > > Just add

Re: XSS vulnerability with

2010-02-19 Thread Greg Lindholm
A slightly cleaner way would be like this: I think in most cases is used for displaying "safe" text that the app either supplies or generates. Obviously if you do use it to echo user supplied data you need to be careful. It would be nice to have a flag like you suggest however it might be diffi