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 paginatio

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 based

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] 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: 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 an

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 rows="6"/> with a VanillaHTML+JSTL version like rows="6">${object.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 rows="6"/> with a VanillaHTML+JSTL version like rows="6">${object.description} ? This approach is okay

[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 with a VanillaHTML+JSTL version like rows="6">${object.description} ? It is currently working; but can I rely on it? Do you k

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 in

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 what

Re: action method not called by

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 unsubscri

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 ognl.OgnlRuntime.getMethodVal

Re: action method not called by

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

Re: action method not called by

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 t

action method not called by

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: listing.jsp my listing.jsp: ... ... Now, hasPanding

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"

Re: autowiring in html tag

2008-09-17 Thread Dave Newton
--- On Wed, 9/17/08, Jim Kiley wrote: > How would the HTML 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 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, h

Re: autowiring in html tag

2008-09-17 Thread Jim Kiley
How would the HTML tag receive information from your Struts action? The tag is designed to receive that data. HTML's basic 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 should implemen

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

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 instead of . I can pass value form jsp to action but not from action to jsp. Where i did wrong. Please give me the solution ASAP. With Regards, Ashok, -- View this message in context

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 encounter

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 ajaxtags.

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 stack

[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 th

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: publ

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: 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 > userna

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 s

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: and then in my action class (SampleAction): public String showForm() throws Exception { MyFormBean formBean = new MyFormBean(); Map session = (Map)ActionContext.getContext().get("session");

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 r

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: (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 unsubs