Hi, 
I'm using Struts 2.0.1 and IE 6.0.2800


Ian Roughley wrote:
> 
> What release of Struts2 are you using and which browsers?
> 
> /Ian
> 
> 
> walidito wrote:
>> thanks, but I get an error with the code you gave me :
>> SEVERE: Error setting expr 'dojo.transport' with value
>> '[Ljava.lang.String;@179567c'
>> ognl.OgnlException: target is null for setProperty(null, "transport",
>> [Ljava.lang.String;@179567c)
>>
>> thanks
>>
>>
>> Musachy Barroso-2 wrote:
>>   
>>> I think you should take a look at the Struts2/Webwork tutorials 
>>> http://www.opensymphony.com/webwork/wikidocs/Tutorial.html and 
>>> http://struts.apache.org/2.x/docs/tutorials.html
>>>
>>> If you look at the showcase code you will see this for the AjaxTest
>>> action:
>>>
>>> in struts-ajax.xml:
>>>
>>> <action name="AjaxTest" 
>>> class="org.apache.struts2.showcase.ajax.AjaxTestAction">
>>>     <result>/ajax/AjaxResult.jsp</result>
>>>  </action>
>>>
>>> in AjaxTestAction.java:
>>>
>>> public class AjaxTestAction implements Action, Serializable {
>>>
>>>     private static int counter = 0;
>>>     private String data;
>>>
>>>     public long getServerTime() {
>>>         return System.currentTimeMillis();
>>>     }
>>>
>>>     public int getCount() {
>>>         return ++counter;
>>>     }
>>>
>>>     public String getData() {
>>>         return data;
>>>     }
>>>
>>>     public void setData(String data) {
>>>         this.data = data;
>>>     }
>>>
>>>     public String execute() throws Exception {
>>>         return SUCCESS;
>>>     }
>>> }
>>>
>>> and AjaxResult.jsp:
>>>
>>> <%@ taglib prefix="s" uri="/struts-tags" %>
>>>
>>> <%
>>>     request.setAttribute("decorator", "none");
>>>     response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
>>>     response.setHeader("Pragma","no-cache"); //HTTP 1.0
>>>     response.setDateHeader ("Expires", 0); //prevents caching at the 
>>> proxy server
>>> %>
>>>
>>> Result: <s:property value="count"/> @ <s:property value="serverTime"/>
>>> <br/>
>>> <s:property value="data"/>
>>>
>>> musachy
>>>
>>> walidito wrote:
>>>     
>>>> I,
>>>> I wanna run this type of example app :
>>>> http://www.planetstruts.org/struts2-showcase/viewSource.action?page=/ajax/remotediv/example1.jsp
>>>>  
>>>> :
>>>> <s:div
>>>> 13:         id="once"
>>>> 14:         theme="ajax"
>>>> 15:         cssStyle="border: 1px solid yellow;"
>>>> 16:         href="/AjaxTest.action"
>>>> 17:         delay="5000"
>>>> 18:         loadingText="loading...">
>>>> 19:     Initial Content
>>>> </s:div>
>>>>
>>>> In other word, a basic ajax component that allows a refreshment of only
>>>> a
>>>> part of my page.
>>>>
>>>> But I didn't get how to write the corresonding action and action
>>>> mapping. 
>>>> For the moment I've tried to put a "success" return in my action ( is
>>>> it
>>>> enough ?), but I don't see what to put in my action mapping (i mean
>>>> inside
>>>> the <action name="blablabla" ...> tag. If I put nothing, of course it's
>>>> wrong.
>>>> If I only put a success-type result, It creates an infinite loop
>>>> (always
>>>> displays "loading").
>>>> Can sobdy help please?
>>>>   
>>>>       
>>> ---------------------------------------------------------------------
>>> 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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Still-Ajax-and-Struts-2-tf2776835.html#a7758605
Sent from the Struts - User mailing list archive at Nabble.com.


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

Reply via email to