First try putting the full url for your action on your browser , and make sure you are getting the expected page, just to get any ajax problem out of the way. After you get that working, try the div, which should work.

regards
musachy
walidito wrote:
Hi,
I hava followed one of the "showcase" example (
http://www.planetstruts.org/struts2-showcase/viewSource.action?page=/ajax/remotediv/example1.jsp
) tu run a first an independently-refreshed zone of my webpage.
As the example doen't provide with the corresponding Action Class, i didn't
succeed in making interact any action with my new ajax element (div tag).
For information, I had put this  <s:head theme="ajax" debug="true"/> in the
header of my jsp.
and this code in my <body>
<s:div
                     id="twoseconds"
                cssStyle="border: 1px solid yellow;"
                href="/dashboard/actions/AjaxTest.action"
                    theme="ajax"
                updateFreq="2000"
                errorText="There was an error"
                loadingText="loading..."><s:property value="message"/>
</s:div>

And the sample action is :
public class AjaxTestAction  {
        
        String message;
        
        public String execute() throws Exception
        {
                 setMessage("hello !!!");
                return SUCCESS; 
        }
        
        public void setMessage(String message){
                this.message = message;
            }

}


So, as a result, I see well the refreshment, but always  the "there was an
error message".

Can anyone help please ?


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

Reply via email to