You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by walidito <wa...@sgcib.com> on 2007/01/19 18:11:39 UTC

[s2]Targeting a link to open in a
Hi everybody,
My new dilema is :
I have created my "own" ajax widgets by putting <s:div theme="ajax" in a
struts 2 tabbedPanel. This allows to refresh its content and works fine.
I want to put links inside this widget (a button for exemple or a "<a href"
...) that are linked to an Action class, but that targets the same widgets.
If its not clear, let me illustrate. I display a list of objects in my
widget, I display a link to delete/modify one row of my list. When clicking
on it, it calls an action that performs the change (modify the row) . And
now I don't know what to do in order to refresh the display of the list ONLY
IN MY AJAX WIDGET, without refreshing all the page.

thanks a lot
-- 
View this message in context: http://www.nabble.com/-s2-Targeting-a-link-to-open-in-a-%3Cs%3Adiv-theme%3D%22ajax%22-box---tf3040935.html#a8452631
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [s2]Targeting a link to open in a Posted by walidito <wa...@sgcib.com>.
As I said, I tried both targets and target. both does not work.
moreover, the thing i'm worried about is that I looked into struts-tag.tld
in struts2-core-2.0.1.jar in the META-INF package, and I did not find any
"targets" attribute declaration...
How come ?


Musachy Barroso-2 wrote:
> 
> It is "targets" instead of "target"(can be more than one)
> 
> musachy
> 
> walidito wrote:
>> thank you very much,
>> when I try the following code, or the equivalent without the s:url stuff,
>> I
>> get this error :
>>
>> Attribute target invalid for tag a according to TLD at
>> org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
>> at
>> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
>> at
>> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
>> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at 
>>
>> my code :
>> <s:url id="reloadBooks" action="BookAction" namespace="/" />
>>       			<s:a theme="ajax" href="%{reloadBooks}" target="bookdiv">
>>       			mylink
>> 			</s:a>
>>
>> that should refer to :
>> <s:tabbedPanel id="third_tabbed_Panel" >
>>                     <s:panel id="tab_one_of_third_Panel" tabName="My
>> books">
>>       						<s:div id="bookdiv" theme="ajax" href="/BookAction.do"
>> delay="1000" updateFreq="60000" loadingText="loading...">
>>
>> strange no ?!
>>
>>
>> Hi everybody,
>> My new dilema is :
>> I have created my "own" ajax widgets by putting <s:div theme="ajax" in a
>> struts 2 tabbedPanel. This allows to refresh its content and works fine.
>> I want to put links inside this widget (a button for exemple or a " 
>>
>>   
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-s2-Targeting-a-link-to-open-in-a-%3Cs%3Adiv-theme%3D%22ajax%22-box---tf3040935.html#a8456411
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [s2]Targeting a link to open in a Posted by Musachy Barroso <mb...@wfscorp.com>.
It is "targets" instead of "target"(can be more than one)

musachy

walidito wrote:
> thank you very much,
> when I try the following code, or the equivalent without the s:url stuff, I
> get this error :
>
> Attribute target invalid for tag a according to TLD at
> org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
> at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
> at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at 
>
> my code :
> <s:url id="reloadBooks" action="BookAction" namespace="/" />
>       			<s:a theme="ajax" href="%{reloadBooks}" target="bookdiv">
>       			mylink
> 			</s:a>
>
> that should refer to :
> <s:tabbedPanel id="third_tabbed_Panel" >
>                     <s:panel id="tab_one_of_third_Panel" tabName="My books">
>       						<s:div id="bookdiv" theme="ajax" href="/BookAction.do"
> delay="1000" updateFreq="60000" loadingText="loading...">
>
> strange no ?!
>
>
> Hi everybody,
> My new dilema is :
> I have created my "own" ajax widgets by putting <s:div theme="ajax" in a
> struts 2 tabbedPanel. This allows to refresh its content and works fine.
> I want to put links inside this widget (a button for exemple or a " 
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [s2]Targeting a link to open in a Posted by walidito <wa...@sgcib.com>.
thank you very much,
when I try the following code, or the equivalent without the s:url stuff, I
get this error :

Attribute target invalid for tag a according to TLD at
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at 

my code :
<s:url id="reloadBooks" action="BookAction" namespace="/" />
      			<s:a theme="ajax" href="%{reloadBooks}" target="bookdiv">
      			mylink
			</s:a>

that should refer to :
<s:tabbedPanel id="third_tabbed_Panel" >
                    <s:panel id="tab_one_of_third_Panel" tabName="My books">
      						<s:div id="bookdiv" theme="ajax" href="/BookAction.do"
delay="1000" updateFreq="60000" loadingText="loading...">

strange no ?!


Hi everybody,
My new dilema is :
I have created my "own" ajax widgets by putting <s:div theme="ajax" in a
struts 2 tabbedPanel. This allows to refresh its content and works fine.
I want to put links inside this widget (a button for exemple or a " 

-- 
View this message in context: http://www.nabble.com/-s2-Targeting-a-link-to-open-in-a-%3Cs%3Adiv-theme%3D%22ajax%22-box---tf3040935.html#a8455843
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [s2]Targeting a link to open in a Posted by Musachy Barroso <mb...@wfscorp.com>.
2.0.3 is around the corner (a few days maybe)

musachy

walidito wrote:
> when will it be available because a very important feature of struts 2 in
> general, and of my application.
> ?
> thanks
>
>
> Musachy Barroso-2 wrote:
>   
>> My bad, that's new on 2.0.2.
>>
>> musachy
>>
>> walidito wrote:
>>     
>>> yes with the same error,
>>> and let me rewrite what i wrote on my post :
>>> moreover, the thing i'm worried about is that I looked into
>>> struts-tag.tld
>>> in struts2-core-2.0.1.jar in the META-INF package, and I did not find any
>>> "targets" attribute declaration...
>>>
>>> any idea?
>>>
>>>
>>> Musachy Barroso-2 wrote:
>>>   
>>>       
>>>> With the same error?
>>>>
>>>> musachy
>>>>
>>>> walidito wrote:
>>>>     
>>>>         
>>>>> sorry i posted the wrong code,
>>>>> but i tried both target and targets.
>>>>> both doesnt work
>>>>>
>>>>> Musachy Barroso-2 wrote:
>>>>>   
>>>>>       
>>>>>           
>>>>>> The anchor  and the submit tags have a "targets" attribute that does 
>>>>>> that. In "targets" you can specify a comma-delimited list of ids,
>>>>>> whose 
>>>>>> content will be updated with html returned from from your action:
>>>>>>
>>>>>> <s:div id="div1" ...>
>>>>>>     <s:submit theme="ajax" targets="div1" .../>
>>>>>> </s:div>
>>>>>>
>>>>>> Showcase has several examples of this. More info here:
>>>>>>
>>>>>> http://cwiki.apache.org/confluence/display/WW/Ajax+Tags
>>>>>>
>>>>>> regards
>>>>>> musachy
>>>>>>
>>>>>> walidito wrote:
>>>>>>     
>>>>>>         
>>>>>>             
>>>>>>> Hi everybody,
>>>>>>> My new dilema is :
>>>>>>> I have created my "own" ajax widgets by putting <s:div theme="ajax"
>>>>>>> in
>>>>>>> a
>>>>>>> struts 2 tabbedPanel. This allows to refresh its content and works
>>>>>>> fine.
>>>>>>> I want to put links inside this widget (a button for exemple or a " 
>>>>>>> ...)
>>>>>>> that are linked to an Action class, but that targets the same
>>>>>>> widgets.
>>>>>>> If its not clear, let me illustrate. I display a list of objects in
>>>>>>> my
>>>>>>> widget, I display a link to delete/modify one row of my list. When
>>>>>>> clicking
>>>>>>> on it, it calls an action that performs the change (modify the row) .
>>>>>>> And
>>>>>>> now I don't know what to do in order to refresh the display of the
>>>>>>> list
>>>>>>> ONLY
>>>>>>> IN MY AJAX WIDGET, without refreshing all the page.
>>>>>>>
>>>>>>> thanks a lot
>>>>>>>   
>>>>>>>       
>>>>>>>           
>>>>>>>               
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>>>> For additional commands, e-mail: user-help@struts.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>     
>>>>>>         
>>>>>>             
>>>>>   
>>>>>       
>>>>>           
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>> For additional commands, e-mail: user-help@struts.apache.org
>>>>
>>>>
>>>>
>>>>     
>>>>         
>>>   
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>
>>     
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [s2]Targeting a link to open in a Posted by walidito <wa...@sgcib.com>.
when will it be available because a very important feature of struts 2 in
general, and of my application.
?
thanks


Musachy Barroso-2 wrote:
> 
> My bad, that's new on 2.0.2.
> 
> musachy
> 
> walidito wrote:
>> yes with the same error,
>> and let me rewrite what i wrote on my post :
>> moreover, the thing i'm worried about is that I looked into
>> struts-tag.tld
>> in struts2-core-2.0.1.jar in the META-INF package, and I did not find any
>> "targets" attribute declaration...
>>
>> any idea?
>>
>>
>> Musachy Barroso-2 wrote:
>>   
>>> With the same error?
>>>
>>> musachy
>>>
>>> walidito wrote:
>>>     
>>>> sorry i posted the wrong code,
>>>> but i tried both target and targets.
>>>> both doesnt work
>>>>
>>>> Musachy Barroso-2 wrote:
>>>>   
>>>>       
>>>>> The anchor  and the submit tags have a "targets" attribute that does 
>>>>> that. In "targets" you can specify a comma-delimited list of ids,
>>>>> whose 
>>>>> content will be updated with html returned from from your action:
>>>>>
>>>>> <s:div id="div1" ...>
>>>>>     <s:submit theme="ajax" targets="div1" .../>
>>>>> </s:div>
>>>>>
>>>>> Showcase has several examples of this. More info here:
>>>>>
>>>>> http://cwiki.apache.org/confluence/display/WW/Ajax+Tags
>>>>>
>>>>> regards
>>>>> musachy
>>>>>
>>>>> walidito wrote:
>>>>>     
>>>>>         
>>>>>> Hi everybody,
>>>>>> My new dilema is :
>>>>>> I have created my "own" ajax widgets by putting <s:div theme="ajax"
>>>>>> in
>>>>>> a
>>>>>> struts 2 tabbedPanel. This allows to refresh its content and works
>>>>>> fine.
>>>>>> I want to put links inside this widget (a button for exemple or a " 
>>>>>> ...)
>>>>>> that are linked to an Action class, but that targets the same
>>>>>> widgets.
>>>>>> If its not clear, let me illustrate. I display a list of objects in
>>>>>> my
>>>>>> widget, I display a link to delete/modify one row of my list. When
>>>>>> clicking
>>>>>> on it, it calls an action that performs the change (modify the row) .
>>>>>> And
>>>>>> now I don't know what to do in order to refresh the display of the
>>>>>> list
>>>>>> ONLY
>>>>>> IN MY AJAX WIDGET, without refreshing all the page.
>>>>>>
>>>>>> thanks a lot
>>>>>>   
>>>>>>       
>>>>>>           
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>>> For additional commands, e-mail: user-help@struts.apache.org
>>>>>
>>>>>
>>>>>
>>>>>     
>>>>>         
>>>>   
>>>>       
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>>
>>>     
>>
>>   
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-s2-Targeting-a-link-to-open-in-a-%3Cs%3Adiv-theme%3D%22ajax%22-box---tf3040935.html#a8457552
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [s2]Targeting a link to open in a Posted by Musachy Barroso <mb...@wfscorp.com>.
My bad, that's new on 2.0.2.

musachy

walidito wrote:
> yes with the same error,
> and let me rewrite what i wrote on my post :
> moreover, the thing i'm worried about is that I looked into struts-tag.tld
> in struts2-core-2.0.1.jar in the META-INF package, and I did not find any
> "targets" attribute declaration...
>
> any idea?
>
>
> Musachy Barroso-2 wrote:
>   
>> With the same error?
>>
>> musachy
>>
>> walidito wrote:
>>     
>>> sorry i posted the wrong code,
>>> but i tried both target and targets.
>>> both doesnt work
>>>
>>> Musachy Barroso-2 wrote:
>>>   
>>>       
>>>> The anchor  and the submit tags have a "targets" attribute that does 
>>>> that. In "targets" you can specify a comma-delimited list of ids, whose 
>>>> content will be updated with html returned from from your action:
>>>>
>>>> <s:div id="div1" ...>
>>>>     <s:submit theme="ajax" targets="div1" .../>
>>>> </s:div>
>>>>
>>>> Showcase has several examples of this. More info here:
>>>>
>>>> http://cwiki.apache.org/confluence/display/WW/Ajax+Tags
>>>>
>>>> regards
>>>> musachy
>>>>
>>>> walidito wrote:
>>>>     
>>>>         
>>>>> Hi everybody,
>>>>> My new dilema is :
>>>>> I have created my "own" ajax widgets by putting <s:div theme="ajax" in
>>>>> a
>>>>> struts 2 tabbedPanel. This allows to refresh its content and works
>>>>> fine.
>>>>> I want to put links inside this widget (a button for exemple or a " 
>>>>> ...)
>>>>> that are linked to an Action class, but that targets the same widgets.
>>>>> If its not clear, let me illustrate. I display a list of objects in my
>>>>> widget, I display a link to delete/modify one row of my list. When
>>>>> clicking
>>>>> on it, it calls an action that performs the change (modify the row) .
>>>>> And
>>>>> now I don't know what to do in order to refresh the display of the list
>>>>> ONLY
>>>>> IN MY AJAX WIDGET, without refreshing all the page.
>>>>>
>>>>> thanks a lot
>>>>>   
>>>>>       
>>>>>           
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>> For additional commands, e-mail: user-help@struts.apache.org
>>>>
>>>>
>>>>
>>>>     
>>>>         
>>>   
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>
>>     
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [s2]Targeting a link to open in a Posted by walidito <wa...@sgcib.com>.
yes with the same error,
and let me rewrite what i wrote on my post :
moreover, the thing i'm worried about is that I looked into struts-tag.tld
in struts2-core-2.0.1.jar in the META-INF package, and I did not find any
"targets" attribute declaration...

any idea?


Musachy Barroso-2 wrote:
> 
> With the same error?
> 
> musachy
> 
> walidito wrote:
>> sorry i posted the wrong code,
>> but i tried both target and targets.
>> both doesnt work
>>
>> Musachy Barroso-2 wrote:
>>   
>>> The anchor  and the submit tags have a "targets" attribute that does 
>>> that. In "targets" you can specify a comma-delimited list of ids, whose 
>>> content will be updated with html returned from from your action:
>>>
>>> <s:div id="div1" ...>
>>>     <s:submit theme="ajax" targets="div1" .../>
>>> </s:div>
>>>
>>> Showcase has several examples of this. More info here:
>>>
>>> http://cwiki.apache.org/confluence/display/WW/Ajax+Tags
>>>
>>> regards
>>> musachy
>>>
>>> walidito wrote:
>>>     
>>>> Hi everybody,
>>>> My new dilema is :
>>>> I have created my "own" ajax widgets by putting <s:div theme="ajax" in
>>>> a
>>>> struts 2 tabbedPanel. This allows to refresh its content and works
>>>> fine.
>>>> I want to put links inside this widget (a button for exemple or a " 
>>>> ...)
>>>> that are linked to an Action class, but that targets the same widgets.
>>>> If its not clear, let me illustrate. I display a list of objects in my
>>>> widget, I display a link to delete/modify one row of my list. When
>>>> clicking
>>>> on it, it calls an action that performs the change (modify the row) .
>>>> And
>>>> now I don't know what to do in order to refresh the display of the list
>>>> ONLY
>>>> IN MY AJAX WIDGET, without refreshing all the page.
>>>>
>>>> thanks a lot
>>>>   
>>>>       
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>>
>>>     
>>
>>   
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-s2-Targeting-a-link-to-open-in-a-%3Cs%3Adiv-theme%3D%22ajax%22-box---tf3040935.html#a8456615
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [s2]Targeting a link to open in a Posted by Musachy Barroso <mb...@wfscorp.com>.
With the same error?

musachy

walidito wrote:
> sorry i posted the wrong code,
> but i tried both target and targets.
> both doesnt work
>
> Musachy Barroso-2 wrote:
>   
>> The anchor  and the submit tags have a "targets" attribute that does 
>> that. In "targets" you can specify a comma-delimited list of ids, whose 
>> content will be updated with html returned from from your action:
>>
>> <s:div id="div1" ...>
>>     <s:submit theme="ajax" targets="div1" .../>
>> </s:div>
>>
>> Showcase has several examples of this. More info here:
>>
>> http://cwiki.apache.org/confluence/display/WW/Ajax+Tags
>>
>> regards
>> musachy
>>
>> walidito wrote:
>>     
>>> Hi everybody,
>>> My new dilema is :
>>> I have created my "own" ajax widgets by putting <s:div theme="ajax" in a
>>> struts 2 tabbedPanel. This allows to refresh its content and works fine.
>>> I want to put links inside this widget (a button for exemple or a "  ...)
>>> that are linked to an Action class, but that targets the same widgets.
>>> If its not clear, let me illustrate. I display a list of objects in my
>>> widget, I display a link to delete/modify one row of my list. When
>>> clicking
>>> on it, it calls an action that performs the change (modify the row) . And
>>> now I don't know what to do in order to refresh the display of the list
>>> ONLY
>>> IN MY AJAX WIDGET, without refreshing all the page.
>>>
>>> thanks a lot
>>>   
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>
>>     
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [s2]Targeting a link to open in a Posted by walidito <wa...@sgcib.com>.
sorry i posted the wrong code,
but i tried both target and targets.
both doesnt work

Musachy Barroso-2 wrote:
> 
> The anchor  and the submit tags have a "targets" attribute that does 
> that. In "targets" you can specify a comma-delimited list of ids, whose 
> content will be updated with html returned from from your action:
> 
> <s:div id="div1" ...>
>     <s:submit theme="ajax" targets="div1" .../>
> </s:div>
> 
> Showcase has several examples of this. More info here:
> 
> http://cwiki.apache.org/confluence/display/WW/Ajax+Tags
> 
> regards
> musachy
> 
> walidito wrote:
>> Hi everybody,
>> My new dilema is :
>> I have created my "own" ajax widgets by putting <s:div theme="ajax" in a
>> struts 2 tabbedPanel. This allows to refresh its content and works fine.
>> I want to put links inside this widget (a button for exemple or a "  ...)
>> that are linked to an Action class, but that targets the same widgets.
>> If its not clear, let me illustrate. I display a list of objects in my
>> widget, I display a link to delete/modify one row of my list. When
>> clicking
>> on it, it calls an action that performs the change (modify the row) . And
>> now I don't know what to do in order to refresh the display of the list
>> ONLY
>> IN MY AJAX WIDGET, without refreshing all the page.
>>
>> thanks a lot
>>   
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-s2-Targeting-a-link-to-open-in-a-%3Cs%3Adiv-theme%3D%22ajax%22-box---tf3040935.html#a8456085
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [s2]Targeting a link to open in a Posted by Musachy Barroso <mb...@wfscorp.com>.
The anchor  and the submit tags have a "targets" attribute that does 
that. In "targets" you can specify a comma-delimited list of ids, whose 
content will be updated with html returned from from your action:

<s:div id="div1" ...>
    <s:submit theme="ajax" targets="div1" .../>
</s:div>

Showcase has several examples of this. More info here:

http://cwiki.apache.org/confluence/display/WW/Ajax+Tags

regards
musachy

walidito wrote:
> Hi everybody,
> My new dilema is :
> I have created my "own" ajax widgets by putting <s:div theme="ajax" in a
> struts 2 tabbedPanel. This allows to refresh its content and works fine.
> I want to put links inside this widget (a button for exemple or a "<a href"
> ...) that are linked to an Action class, but that targets the same widgets.
> If its not clear, let me illustrate. I display a list of objects in my
> widget, I display a link to delete/modify one row of my list. When clicking
> on it, it calls an action that performs the change (modify the row) . And
> now I don't know what to do in order to refresh the display of the list ONLY
> IN MY AJAX WIDGET, without refreshing all the page.
>
> thanks a lot
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org