You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by niels <ni...@gmail.com> on 2008/01/29 11:15:37 UTC
Where did the target attribute go in the a-tag?
There is no target attribute in de a-tag:
http://struts.apache.org/2.x/docs/a.html
I am a newbie, and want to open de link in another (specified) browser
window..
How to overcome this?
Niels
Re: Where did the target attribute go in the a-tag?
Posted by niels <ni...@gmail.com>.
Thanks,
This works form me:
<s:url id="url" action="getCRUD" />
<a href="<s:property value='#url'/>" target="_blank">...</a>
niels
On Jan 29, 2008, at 5:36 PM, Laurie Harper wrote:
> niels wrote:
>> There is no target attribute in de a-tag:
>> http://struts.apache.org/2.x/docs/a.html
>
> Correct, there isn't such an attribute. The Struts 2.0.9
> documentation for that tag lists a 'targets' attribute, but that's
> related to the Ajax theme and doesn't do what you're looking for.
>
>> I am a newbie, and want to open de link in another (specified)
>> browser window..
>> How to overcome this?
>
> Dave's solution (using a vanilla <a> tag) is the correct way to do
> this.
>
> L.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
Re: Where did the target attribute go in the a-tag?
Posted by Laurie Harper <la...@holoweb.net>.
niels wrote:
> There is no target attribute in de a-tag:
> http://struts.apache.org/2.x/docs/a.html
Correct, there isn't such an attribute. The Struts 2.0.9 documentation
for that tag lists a 'targets' attribute, but that's related to the Ajax
theme and doesn't do what you're looking for.
> I am a newbie, and want to open de link in another (specified) browser
> window..
>
> How to overcome this?
Dave's solution (using a vanilla <a> tag) is the correct way to do this.
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Where did the target attribute go in the a-tag?
Posted by niels <ni...@gmail.com>.
David,
I don't understand what you mean by "anchor"
imagine the next situation.
<s:url id="url" action="getCRUD">
<s:param name="id" value="%{user.id}" />
</s:url>
<s:a href="%{url}">edit</s:a>
Niels
On Jan 29, 2008, at 1:33 PM, David Tercero wrote:
>
> target belongs to the anchor, not to the s:url tag.
>
>
>
>
> niels-15 wrote:
>>
>> Thanks David,
>>
>> but according to the TLD target is not a valid attribute for tag url
>>
>> Niels
>>
>>
>> On Jan 29, 2008, at 12:44 PM, David Tercero wrote:
>>
>>>
>>> Hi niels,
>>>
>>> you can generate a html anchor, using the s:url tag to generate
>>> the href
>>> url,
>>>
>>> "<s:url ... " target="...">some text
>>>
>>> hope this helps.
>>>
>>>
>>>
>>>
>>> niels-15 wrote:
>>>>
>>>> There is no target attribute in de a-tag:
>>>> http://struts.apache.org/2.x/docs/a.html
>>>>
>>>> I am a newbie, and want to open de link in another (specified)
>>>> browser
>>>> window..
>>>>
>>>> How to overcome this?
>>>>
>>>> Niels
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Where-did-the-target-attribute-go-in-the-a-tag--tp15156349p15157668.html
>>> 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
>>>
>>
>>
>> ---------------------------------------------------------------------
>> 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/Where-did-the-target-attribute-go-in-the-a-tag--tp15156349p15158312.html
> 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: Where did the target attribute go in the a-tag?
Posted by David Tercero <dt...@gmail.com>.
target belong to the anchor, not to the s:url tag.
niels-15 wrote:
>
> Thanks David,
>
> but according to the TLD target is not a valid attribute for tag url
>
> Niels
>
>
> On Jan 29, 2008, at 12:44 PM, David Tercero wrote:
>
>>
>> Hi niels,
>>
>> you can generate a html anchor, using the s:url tag to generate
>> the href
>> url,
>>
>> "<s:url ... " target="...">some text
>>
>> hope this helps.
>>
>>
>>
>>
>> niels-15 wrote:
>>>
>>> There is no target attribute in de a-tag:
>>> http://struts.apache.org/2.x/docs/a.html
>>>
>>> I am a newbie, and want to open de link in another (specified)
>>> browser
>>> window..
>>>
>>> How to overcome this?
>>>
>>> Niels
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Where-did-the-target-attribute-go-in-the-a-tag--tp15156349p15157668.html
>> 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
>>
>
>
> ---------------------------------------------------------------------
> 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/Where-did-the-target-attribute-go-in-the-a-tag--tp15156349p15158312.html
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: Where did the target attribute go in the a-tag?
Posted by niels <ni...@gmail.com>.
Thanks David,
but according to the TLD target is not a valid attribute for tag url
Niels
On Jan 29, 2008, at 12:44 PM, David Tercero wrote:
>
> Hi niels,
>
> you can generate a html anchor, using the s:url tag to generate
> the href
> url,
>
> "<s:url ... " target="...">some text
>
> hope this helps.
>
>
>
>
> niels-15 wrote:
>>
>> There is no target attribute in de a-tag:
>> http://struts.apache.org/2.x/docs/a.html
>>
>> I am a newbie, and want to open de link in another (specified)
>> browser
>> window..
>>
>> How to overcome this?
>>
>> Niels
>>
>
> --
> View this message in context: http://www.nabble.com/Where-did-the-target-attribute-go-in-the-a-tag--tp15156349p15157668.html
> 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
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Where did the target attribute go in the a-tag?
Posted by David Tercero <dt...@gmail.com>.
Hi niels,
you can generate a html anchor, using the s:url tag to generate the href
url,
"<s:url ... " target="...">some text
hope this helps.
niels-15 wrote:
>
> There is no target attribute in de a-tag:
> http://struts.apache.org/2.x/docs/a.html
>
> I am a newbie, and want to open de link in another (specified) browser
> window..
>
> How to overcome this?
>
> Niels
>
--
View this message in context: http://www.nabble.com/Where-did-the-target-attribute-go-in-the-a-tag--tp15156349p15157668.html
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: Where did the target attribute go in the a-tag?
Posted by David Tercero <dt...@gmail.com>.
If you do that, the url will be printed on the html page. You can put it all
together:
<s:url action= " target="_blank">...
You can use a html anchor ( .... ), and use the s:url tag to provide the
url. This is the way I usually code the links in my web applications.
Regards.
newton.dave wrote:
>
> ----- Original Message ----
>> From: niels <ni...@gmail.com>
>> To: Struts Users Mailing List <us...@struts.apache.org>
>> Sent: Tuesday, January 29, 2008 8:00:16 AM
>> Subject: Re: Where did the target attribute go in the a-tag?
>>
>> David,
>>
>> I don't understand what you mean by "anchor"
>> imagine the next situation.
>
>
> <s:url action="foo" id="fooUrl"/>
> "<s:property value='#fooUrl' " target="_blank">...
>
>
> Dave
>
>
>
>
> ---------------------------------------------------------------------
> 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/Where-did-the-target-attribute-go-in-the-a-tag--tp15156349p15160405.html
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