Your right, I will clarify that on the site as soon as possible. For the sake of answering the question though...

What you write below is correct... the ajaxRef of the form matches the ajaxRef of the <form> element in the config file, and the ajaxRef of the button matches the ajaxRef of the <element> element in the config file.

Each <form> element in the config file contains a collection of <element> elements, each corresponding to an element of that form on the page.

Just to confuse you further :) ...

There is no rule against sharing a <form> in the config file... in other words, if you have five different forms on five different pages of your app, you are allowed to assign them all the same ajaxRef. Of course, you have to be sure the forms have the same elements, at least those you want to Ajax-enable... in other words, if you share the <form> configuration, but one of the forms on one of the pages has an element that is not defined in that <form> configuration and you try and Ajax-enable that element, it won't work (it should fail gracefully with an error logged, but come to think of it I'm not sure I ever tested that case).

And of course, you can reuse the ajaxRef of an <element> if they are in different <form>s, but naturally not within the same <form>. That's actually the precise reason for having an ajaxRef on an <html:form> in the first place... if it wasn't, then you could only use an ajaxRef once throughout an entire site regardless of what form is belonged to. I didn't think that would go over too well :)

Hope that helps!

Frank

Rick Reumann wrote:
Frank W. Zammetti wrote the following on 5/13/2005 12:23 AM:

Finally got it all set up on http://struts.sf.net. The first "official" release is up!


Frank can you maybe provide example code that clarifies:

"For any form element you wish to Ajax-enable, add an ajaxRef attribute to it. In addition, add an ajaxRef to the containing form. This can be any value you wish, it is a reference value to a configuration file."

I think it would help to clarify that in relation to the ajax config file you've shown.

For example in the config, you have:

<form ajaxRef="example1">
  <element ajaxRef="button">

I'm confused what ajaxRef my form would have and what ajaxRef my button would have in the actual HTML? From the preceding example would it be..

<html:form ajaxRef="example1">

<html:submit ajaxRef="button" <-- ???

Thanks


-- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com


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



Reply via email to