Re: Validate without submit?

2010-04-30 Thread Ozu Natsu
Arg! Something else is going on. Maybe related to the parseError? I am assuming the callback should be on the success function, not the error/complete. I replaced the jquery $('update')[0] reference with document.forms[0] and I get the exact same thing. Moreover, it looks as if the errorsObect.

Re: Validate without submit?

2010-04-30 Thread Ozu Natsu
The problem looks as if it is in the DOM, I'm wondering if this isn't jquery's fault? All of the field names in the form.elements are somehow mangled. "artNumber" instead of "partNumber" On Fri, Apr 30, 2010 at 6:14 PM, Ozu Natsu wrote: > Dale, > > So close! I am now to the point where I am ge

Re: Validate without submit?

2010-04-30 Thread Ozu Natsu
Dale, So close! I am now to the point where I am getting the errors, but when I try to use the struts utilities to display them, I am getting an undefined object in the struts validation.js function addErrorXHTML(e, errorText) ; My code looks like this: complete : function(XMLHtt

Struts2 - Ajax submit not working: Please advise

2010-04-30 Thread Kartik Kumar
Hi All, I am experiencing some issues with ajax submit with Struts2. I am trying to do an asynchronous post to an action class that will make a crud call and return back the html page with the updated input value. I am able to get the result when posting to form action without using ajax. <%@ ta

Re: Validate without submit?

2010-04-30 Thread Dale Newfield
On 4/30/10 6:50 PM, Ozu Natsu wrote: Anyone have any ideas? Debugging from the client side: Firebug in Firefox. Debugging from the server side: log messages (log4j or other). -Dale - To unsubscribe, e-mail: user-unsubscr...

Re: Validate without submit?

2010-04-30 Thread Ozu Natsu
I've tried both json result type and what the docs use: http://struts.apache.org/2.0.14/docs/ajax-validation.html. No luck. I just added an onComplete event handler and I see that i am getting textStatus passed as parseError.??? So the success event handler is not being called because of some e

Re: Validate without submit?

2010-04-30 Thread Cimballi
I noticed that I am not using the json interceptor, only the result : What are you using ? Cimballi On Fri, Apr 30, 2010 at 5:16 PM, Ozu Natsu wrote: >        var url= "./checkValid.do"; >        var data= > $('#update').serialize()+'&struts.enableJSONValidation=true&struts.validateOnly=true

Re: Validate without submit?

2010-04-30 Thread Ozu Natsu
var url= "./checkValid.do"; var data= $('#update').serialize()+'&struts.enableJSONValidation=true&struts.validateOnly=true'; $.getJSON( url, data, function(data, textStatus) { // Do something alert(textStatus); }); The callback defin

Re: Validate without submit?

2010-04-30 Thread Cimballi
Did you try with the getJSON method of JQuery ? Cimballi On Fri, Apr 30, 2010 at 5:01 PM, Ozu Natsu wrote: > 1 step closer. I had missed the reference to the interceptor > in my struts > action. > > I am now getting a result back from the validator, but it doesn't seem > to be firing my callba

Re: Validate without submit?

2010-04-30 Thread Ozu Natsu
1 step closer. I had missed the reference to the interceptor in my struts action. I am now getting a result back from the validator, but it doesn't seem to be firing my callback method. Can anyone help with this problem? Thank you! On Fri, Apr 30, 2010 at 3:45 PM, Cimballi wrote: > Ozu, nut

Re: Validate without submit?

2010-04-30 Thread Cimballi
Ozu, nut sure to be able to help you more. I know how to call an action in Ajax, now it seems you want to reproduce Struts2 validation process using Ajax and this requires more analysis. What you can do at least is do the validation in you main action method. And even better, I think you could even

Re: Validate without submit?

2010-04-30 Thread Ozu Natsu
Closer, still not working... I had 2 problems (I think). #(this).serialize() was not serializing the form data. I put my form name in for the selector and now the form data is being passed to the get. I think the other problem is that the action method doesn't match my validator name. My validato

Re: Validate without submit?

2010-04-30 Thread Cimballi
I have something like that in the page : $.getJSON("...", function(json) { if (json.result == "OK") { ... } else { ... } }); And in the action I have this : public String getResult() { return this.result; } In my case it's a single String but I suppose

Re: Validate without submit?

2010-04-30 Thread Ozu Natsu
I am having some problems with the call, the ajax "get" returns no response, even though I know the form validation should be failing. My ajax call looks like this: var url= "./checkValid.do"; $.ajax({ type: "GET", cache : false,

Re: Validate without submit?

2010-04-30 Thread Cimballi
Of course it can be done with JQuery and I recommend using JSON too. You call the action via Ajax and you get the JSON result and display it. Cimballi On Fri, Apr 30, 2010 at 1:36 PM, Ozu Natsu wrote: > Is it possible to fire the struts 2 validation without performing a > submit?  I realize tha

Validate without submit?

2010-04-30 Thread Ozu Natsu
Is it possible to fire the struts 2 validation without performing a submit? I realize that this could be done via ajax, but I am already committed to use another JS framework (not dojo, dwr or prototype) . I'd like to fire the validation and get the form validation messages back if any to be displ

Re: ConcurrentModificationException error.

2010-04-30 Thread Kartik Kumar
Are you using Iterator#remove() when iterating through a collection? On Fri, Apr 30, 2010 at 10:23 AM, Lukasz Lenart < lukasz.len...@googlemail.com> wrote: > Do you have devMode set to true? > > > Regards > -- > Łukasz > http://www.lenart.org.pl/ > Kapituła Javarsovia 2010 > http://javarsovia.pl

Re: Where is the documentation for Struts tags ....

2010-04-30 Thread Kartik Kumar
http://struts.apache.org/2.0.14/docs/tag-reference.html On Fri, Apr 30, 2010 at 8:29 AM, Dale Newfield wrote: > On 4/30/10 10:43 AM, RogerV wrote: > >> Where is the latest documentation for using Struts 2 tags? I had a >> problem >> earlier in the week trying to use the optiontransferselect tag

Re: ConcurrentModificationException error.

2010-04-30 Thread Lukasz Lenart
Do you have devMode set to true? Regards -- Łukasz http://www.lenart.org.pl/ Kapituła Javarsovia 2010 http://javarsovia.pl - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@

Re: Error in running juit test case for struts2 action class

2010-04-30 Thread Wes Wannemacher
Short story, use StrutsSpringTestCase (from the junit plugin) instead of the StrutsTestCase. Long story - your unit tests aren't running inside of the web-app context. The web.xml listener configuration instantiates the applicationContext and puts it in the application scope where other spring com

Re: Where is the documentation for Struts tags ....

2010-04-30 Thread Dale Newfield
On 4/30/10 10:43 AM, RogerV wrote: Where is the latest documentation for using Struts 2 tags? I had a problem earlier in the week trying to use the optiontransferselect tag http://struts.apache.org/2.x/docs/optiontransferselect.html But there appears to be a bug with the snippets right now...

Re: Building Menu's in Struts Applications

2010-04-30 Thread Dale Newfield
On 4/30/10 6:31 AM, RogerV wrote: What tools/techniques are people using these days to build menus for their struts applications, particularly where menu/sub-menu contents are dynamic? Is the struts-menu project still active/relevant or is everyone rolling their own? How about Jquery and Json?

Re: Where is the documentation for Struts tags ....

2010-04-30 Thread Mario . HIDALGO
Could you post the Action code and JSP tanks! SALUDOS!! Mario HIDALGO Java EE Consultant | Risk IT ___ Phone 1. (722) 277 ext. 783042 Phone 2. (55) 5721 opción 3 , ext. 783042 Mobile. 0447223547727 Ema

Where is the documentation for Struts tags ....

2010-04-30 Thread RogerV
Where is the latest documentation for using Struts 2 tags? I had a problem earlier in the week trying to use the optiontransferselect tag which I still haven't been able to get working. Earlier today, I started trying to get the checkboxlist tag to work with a map and I'm still failing miserably.

Re: Struts2 annotations and superclass

2010-04-30 Thread Robert Taylor
Ok...i think I found the solution. The super class can provide annotations at the method level for multiple subclasses using the @Actions. If a subclass needs to add or diverge from common functionality provided by superclass method, they can override the method, however, the subclasses method

ConcurrentModificationException error.

2010-04-30 Thread Bhaarat Sharma
Hi We are struggling with this error in our application. We are on Struts 2.0.6 and Xworks version is 2.0.1. This issue is very intermittent but the best way we've been able to reproduce it is when we load the same page from two different browser windows or on two different machines. The stack

Building Menu's in Struts Applications

2010-04-30 Thread RogerV
What tools/techniques are people using these days to build menus for their struts applications, particularly where menu/sub-menu contents are dynamic? Is the struts-menu project still active/relevant or is everyone rolling their own? How about Jquery and Json? I'm about to start a new greenfield

Error in running juit test case for struts2 action class

2010-04-30 Thread rameshbabu
Hi, I am getting error when i am running my junit test case for struts2 action class. Here is the code. public class RoleMasterNewActionTest extends StrutsTestCase { public voi

Re: Struts 2 and dynamics web page

2010-04-30 Thread Alex Rodriguez Lopez
This example proved helpful to me: http://struts2inaction.com/SimpleAjax.html In the end I ended up doing the same with jQuery: You can get the selected option and pass as params to the called action. The action has a result that is a jsp with just the content that will get loaded into the

Struts & Spring Security

2010-04-30 Thread RogerV
I'm trying to get Spring Security 3.0 working with a Struts 2.0.18 web-app that uses the Convention plugin using a customised login form. So far I've got "login" and "startup" are Struts actions and work fine for the login-page, default-target-url and authentication-failur