Re: question: indexed textfields and maps

2008-09-17 Thread tREXX -
Hi Dave, Ok, i've tried that one and it works like it should. So that getter method works as kind of a type hint to the framework so that struts knows it has to convert the parameter amount to the given MapIntger, Float - Is that correct? Up to now I've only added getter methods to

Struts2 doubleselect complete example

2008-09-17 Thread Sikandar123456
Hi, I have found a good article on doubleselect tag http://struts2-java.blogspot.com/2008/09/doubleselect-with-full-functionality.html here -- View this message in context: http://www.nabble.com/Struts2-doubleselect-complete-example-tp19526373p19526373.html Sent from the Struts - User

Re: (Struts2) howto access the user.fname on the jsp page (user's object in http session)

2008-09-17 Thread Dave Newton
\--- On Wed, 9/17/08, mctdeveloper wrote: Click the following link http://intricatetips.blogspot.com Or read the documentation: http://struts.apache.org/2.x/docs/how-do-we-get-access-to-the-session.html Dave - To

Re: Prepare method being invoked twice

2008-09-17 Thread Jayeshpowar
Finally i figured out the issue.The problem was that i had mistakenly incorporated struts defaultStack prior to paramsPrepareParamsStack in the large set of interceptors that i had used . The prepare interceptor in the default stack and again in paramsPrepareParamsStack was causing invocation

Re: URL Mapper Best Pracitices Question

2008-09-17 Thread Jeromy Evans
Frans Thamura wrote: http://www.jroller.com/fthamura - my login fthamura There's several ways to do this in struts 2. The best approach depends on what else your application does. Option 1. Low effort Implement a custom ActionMapper. It'll contain the logic to detect that the URI

Re: session based pojo as form variables

2008-09-17 Thread 928572663
Here are some examples of how I am accessing the session pojo fields on my form: s:form action=Sample!submit method=post s:checkbox name=#session.formBean.requeryInfo label=Requery Info? / s:textfield name=#session.formBean.firstName value=%{#session.formBean.firstName} label=First Name

Re: [S2] Velocity Integration

2008-09-17 Thread Jeromy Evans
Christopher Schultz wrote: I'm an S1 user and a member of the Velocity team. I recently posted a message to the velocity-dev list regarding the ugly syntax required by the S2 tag Velocity implementation. Hi Chris, It's probably worth posting to the struts-dev list with a more specific

Re: URL Mapper Best Pracitices Question

2008-09-17 Thread Frans Thamura
There's several ways to do this in struts 2. The best approach depends on what else your application does. Option 1. Low effort Implement a custom ActionMapper. It'll contain the logic to detect that the URI references a user and select the appropriate action with the username as a

Re: question: indexed textfields and maps

2008-09-17 Thread stanlick
Your get/set method signatures provide a *huge* hint to the conversion magic logic. If you are curious to see how this actually works, take a look at Ognl, OgnlUtil amd OgnlRuntime. If you can make it through the reflection code, it is quite amazing. Scott tREXX - wrote: Hi Dave,

Re: session based pojo as form variables

2008-09-17 Thread Gabriel Belingueres
I've never used a form field name like #session.formBean.firstName before, but if you refactor your code a little: Make your action implement SessionAware interface and put a formBean getter/setter in your actions (or some superclass of your wizard actions), which takes it from the session:

[S2] Action chaining and validation problem

2008-09-17 Thread Becky . L . O'Sullivan
Without going into a lot of detail, suffice to say our application benefits from action chaning, and we are using it in the documented way. We've begun to go through and add the validation to some actions, but we have run into a snag with validation and action chaining. Whenever one action in

RE: [S2] Action chaining and validation problem

2008-09-17 Thread Martin Gainty
check your validators.xml to see if your short-circuit attribute is set to true The invokemethod grants the Interceptor the power to short-circuiting the Action Invocation. Instead of calling invoke, the Interceptor can return a result String and bypass any remaining Interceptors on the

Re: Struts 2 + AjaxTags + DisplayTag

2008-09-17 Thread dynamicd
After some long hours I got pagination and export working with ajaxtags and displaytag THis is how you do ajax pagination. AjaxTags 1.3 rc7 Struts2.0.12 DisplayTag 1.1.1 I had to make small change in the ajaxtags.js for it to work Comment out the line that calls the prefunction in the

RE: [S2] Action chaining and validation problem

2008-09-17 Thread Dave Newton
--- On Wed, 9/17/08, Martin Gainty wrote: check your validators.xml to see if your short-circuit attribute is set to true My understanding is that validation short-circuiting means that additional validations for the same field won't be run as soon as the first validation error is

autowiring in html tag

2008-09-17 Thread MyAshok
Hi all, Is it possible to use html tag instead struts 2 tag which should implement the autowiring. I tried with input type=text name=username instead of s:textfield name=username . I can pass value form jsp to action but not from action to jsp. Where i did wrong. Please give me the solution

Re: Struts 2 + AjaxTags + DisplayTag

2008-09-17 Thread MyAshok
hi, Are you using struts 2.1.2 Beta for your project? With Regards, Ashok dynamicd wrote: After some long hours I got pagination and export working with ajaxtags and displaytag THis is how you do ajax pagination. AjaxTags 1.3 rc7 Struts2.0.12 DisplayTag 1.1.1 I had to make

Re: autowiring in html tag

2008-09-17 Thread Jim Kiley
How would the HTML input tag receive information from your Struts action? The s:textfield tag is designed to receive that data. HTML's basic input tag is not. On Wed, Sep 17, 2008 at 3:22 PM, MyAshok [EMAIL PROTECTED] wrote: Hi all, Is it possible to use html tag instead struts 2 tag which

Re: autowiring in html tag

2008-09-17 Thread Dave Newton
--- On Wed, 9/17/08, MyAshok wrote: Is it possible to use html tag instead struts 2 tag which should implement the autowiring. Well no, that's what the tag *does* (amongst other things). Where i did wrong. You didn't provide the value anywhere. Please give me the solution ASAP. ASAP, huh?

Re: autowiring in html tag

2008-09-17 Thread Dave Newton
--- On Wed, 9/17/08, Jim Kiley wrote: How would the HTML input tag receive information from your Struts action? Magic, yo. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: autowiring in html tag

2008-09-17 Thread MyAshok
Dave, Thank You very much for the timely reply. I need to do the submit in ajax theme, so if i change the theme to render table tag - the requirement will collapse. I thought to say values from jsp to action is passing, but not the viceversa, there was misspelled as form instead of from in

action method not called by s:if

2008-09-17 Thread Gabriel Belingueres
Hi, I came across which I believe is a weird OGNL behavior: I have an action B which extends from action A which extends from ActionSupport (executing using the defaultStack) In my struts.xml file I have an action defined this way: action name=listing class=B result

Re: action method not called by s:if

2008-09-17 Thread Dave Newton
--- On Wed, 9/17/08, Gabriel Belingueres wrote: The surprising thing is it is NEVER called (which I believe OGNL can not resolve it) I don't see how that's possible; it would be called on whatever is on the stack and normal inheritance mechanics would apply. I am also unable to reproduce

Re: action method not called by s:if

2008-09-17 Thread Gabriel Belingueres
Yes something else was happening...me! I've mistakenly been written this method in some other subclass C of A (which was not the executing action.) what a waste of time...sorry... 2008/9/17 Dave Newton [EMAIL PROTECTED]: --- On Wed, 9/17/08, Gabriel Belingueres wrote: The surprising thing is

Re: session based pojo as form variables

2008-09-17 Thread 928572663
I tried both suggestions and neither worked. The first thing I tried was to implement the getter/setters and change the JSP as you suggested. When I did this I got the following: Caused by: ognl.OgnlException: formBean [java.lang.NullPointerException] at

Re: action method not called by s:if

2008-09-17 Thread Dave Newton
--- On Wed, 9/17/08, Gabriel Belingueres wrote: Yes something else was happening...me! I've mistakenly been written this method in some other subclass C of A (which was not the executing action.) *whew* Dave - To

RE: [S2] Action chaining and validation problem

2008-09-17 Thread Becky . L . O'Sullivan
We actually have no validation XML files (we're setting error fields manually). We're not performing validation using that approach, but we want to remain open to doing so in the future. The validation interceptor is in the struts-default stack, which is what our packages extend from. From

RE: [S2] Action chaining and validation problem

2008-09-17 Thread Martin Gainty
1 down ..more to go..have you have declared any methods in excludeMethods ? http://struts.apache.org/2.0.6/struts2-core/apidocs/com/opensymphony/xwork2/validator/ValidationInterceptor.html Martin __ Disclaimer and confidentiality note Everything

[S2] Avoiding usage of struts-tags

2008-09-17 Thread Andreas Mähler
Hello Everyone, do you know if the communication between the S2 Action and the struts-tags is standardised? Or am I opening a black box if I replace sth. like s:textarea id=description name=object.description cols=40 rows=6/ with a VanillaHTML+JSTL version like textarea id=description

Re: [S2] Avoiding usage of struts-tags

2008-09-17 Thread Jeromy Evans
Andreas Mähler wrote: Hello Everyone, do you know if the communication between the S2 Action and the struts-tags is standardised? Or am I opening a black box if I replace sth. like s:textarea id=description name=object.description cols=40 rows=6/ with a VanillaHTML+JSTL version like

Re: [S2] Avoiding usage of struts-tags

2008-09-17 Thread Andreas Mähler
Thank you for your quick answer, Jeromy! Jeromy Evans schrieb: do you know if the communication between the S2 Action and the struts-tags is standardised? Or am I opening a black box if I replace sth. like s:textarea id=description name=object.description cols=40 rows=6/ with a

Re: session based pojo as form variables

2008-09-17 Thread Gabriel Belingueres
You need to instantiate your formBean before the interceptor stack tries to set the parameters. Common points in your code where you can accomplish that are: instantiating the object when declared as an instance variable, inside a constructor of your action, or implement the Preparable interface

Re: [S2] Avoiding usage of struts-tags

2008-09-17 Thread Jeromy Evans
Andreas Mähler wrote: I've already tried that, but I don't know Freemaker yet and I don't even like the code that is generated by the simple theme. (e.g: it was my intention to write a 100% JavaScript-free webinterface) I also think that the interface is quirky and not as straightforward as

Re: [S2] Avoiding usage of struts-tags

2008-09-17 Thread Andreas Mähler
Hello! Jeromy Evans schrieb: I didn't even know s:colgroup existed. Whoops ;-) s:optgroup is what I meant It's 3 in the morning here in GER and I am still working at my diploma thesis... should go to sleep now :-) Thanx for the hints, ~Andreas

RE: [S2] Action chaining and validation problem

2008-09-17 Thread Becky . L . O'Sullivan
I'm referencing defaultStack. Can I simply pass that parameter to the default stack and the validator interceptor will pick it up? We don't actually use xml-based validation. We set action errors on our own. Do you think it'll still work even though that interceptor is specifically for xml

Re: Struts 2 + AjaxTags + DisplayTag

2008-09-17 Thread dynamicd
I am using Struts 2.0.11.2 MyAshok wrote: hi, Are you using struts 2.1.2 Beta for your project? With Regards, Ashok dynamicd wrote: After some long hours I got pagination and export working with ajaxtags and displaytag THis is how you do ajax pagination. AjaxTags 1.3