Re: Multiple AJAX submit buttons in STRUTS 2

2007-11-07 Thread Jeromy Evans
ahh, sorry, you're right Steve. I just searched through all my code and 
I've used href="actionUrl" for every ajax submit button that isn't using 
the form's default action.


I've only used action="actionAlias" for non-ajax submit buttons.

I think the work-around you've found is the way forward.

kingysball wrote:

Thanks for your repsonse, I've double checked and I have included the  tag.   Including a default Action in the form is probably a
good idea, but doesn't seem to be impacting my AJAX buttons. 


I'm still not getting the previous code to work, I have a work around using
the href attribute as below - 


 
 
 

 	formId="form1"  />

 
 

Should the Action parameter be working in an AJAX button or is this
workaround the way forward? 

Thanks, 

Steve 




Jeromy Evans - Blue Sky Minds wrote:
  
Yes it possible and your attempt at specifying a different action for 
each submit button is correct.


However:
Did you include ?  If not, it's just doing a normal 
submit, not XHR and that may explain the problem.
I think you should give your form a default action even though you won't 
use it. 
The two submit tags are correct

Don't forget to use s:url to define the URL for your div
Finally, use Firebug or Fiddler to see what each post actually contains.

Hope that helps,
Jeromy Evans

kingysball wrote:


As part of my STRUTS 2 application i'm trying to use the AJAX theme to
give
me 2 submit buttons within a Form that I can use to submit data to either
different Actions or different Methods in the same Action.  Initially i
tried the following -










but this code only ever submits to the same Action.  Is this posisble?? 
Can

I use the AJAX theme to submit data to different functions from within
the
same Form???

Any help much appreciated. 
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Multiple AJAX submit buttons in STRUTS 2

2007-11-07 Thread kingysball

Thanks for your repsonse, I've double checked and I have included the  tag.   Including a default Action in the form is probably a
good idea, but doesn't seem to be impacting my AJAX buttons. 

I'm still not getting the previous code to work, I have a work around using
the href attribute as below - 

 
 
 


 
 

Should the Action parameter be working in an AJAX button or is this
workaround the way forward? 

Thanks, 

Steve 



Jeromy Evans - Blue Sky Minds wrote:
> 
> Yes it possible and your attempt at specifying a different action for 
> each submit button is correct.
> 
> However:
> Did you include ?  If not, it's just doing a normal 
> submit, not XHR and that may explain the problem.
> I think you should give your form a default action even though you won't 
> use it. 
> The two submit tags are correct
> Don't forget to use s:url to define the URL for your div
> Finally, use Firebug or Fiddler to see what each post actually contains.
> 
> Hope that helps,
> Jeromy Evans
> 
> kingysball wrote:
>> As part of my STRUTS 2 application i'm trying to use the AJAX theme to
>> give
>> me 2 submit buttons within a Form that I can use to submit data to either
>> different Actions or different Methods in the same Action.  Initially i
>> tried the following -
>>
>> 
>> 
>>
>>  
>>  
>>  
>> 
>> 
>>
>> but this code only ever submits to the same Action.  Is this posisble?? 
>> Can
>> I use the AJAX theme to submit data to different functions from within
>> the
>> same Form???
>>
>> Any help much appreciated. 
>>   
> 
> 
> -----------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Multiple-AJAX-submit-buttons-in-STRUTS-2-tf4764170.html#a13627509
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Multiple AJAX submit buttons in STRUTS 2

2007-11-07 Thread Jeromy Evans
Yes it possible and your attempt at specifying a different action for 
each submit button is correct.


However:
Did you include ?  If not, it's just doing a normal 
submit, not XHR and that may explain the problem.
I think you should give your form a default action even though you won't 
use it. 
The two submit tags are correct

Don't forget to use s:url to define the URL for your div
Finally, use Firebug or Fiddler to see what each post actually contains.

Hope that helps,
Jeromy Evans

kingysball wrote:

As part of my STRUTS 2 application i'm trying to use the AJAX theme to give
me 2 submit buttons within a Form that I can use to submit data to either
different Actions or different Methods in the same Action.  Initially i
tried the following -










but this code only ever submits to the same Action.  Is this posisble??  Can
I use the AJAX theme to submit data to different functions from within the
same Form???

Any help much appreciated. 
  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Multiple AJAX submit buttons in STRUTS 2

2007-11-07 Thread kingysball

As part of my STRUTS 2 application i'm trying to use the AJAX theme to give
me 2 submit buttons within a Form that I can use to submit data to either
different Actions or different Methods in the same Action.  Initially i
tried the following -



  






but this code only ever submits to the same Action.  Is this posisble??  Can
I use the AJAX theme to submit data to different functions from within the
same Form???

Any help much appreciated. 
-- 
View this message in context: 
http://www.nabble.com/Multiple-AJAX-submit-buttons-in-STRUTS-2-tf4764170.html#a13625589
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]