You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Baubak Gandomi <ba...@gandomi.com> on 2012/11/12 10:35:49 UTC

Struts2
Hi There,
 
For AAT reasons I would like to set identities on my links
in my JSP files.
 
<table>
<s:iterator value="workSheet.entries"
var="currentEntry" status="serverPointer">
<tr>
                <td>
                                <s:a
action="EditWorkSheetEntry" name="editLink%{#serverPointer.count}" >
                                                Edit
                                                <s:param
name="selectedEntryId" value="entryId" />
                                                <s:param
name="workSheet_Id" value="workSheet.ws_Id" />
                                </s:a>                                                                   
                </td>
</tr>
</table>
 
But no matter what I do I never get the “name” attribute for
my link.
 
The result of the above turns into:
<table>
<tr>
                <td>
                                <aid="editLink1" href="/DBEXEL/EditWorkSheetEntry.action?selectedEntryId=1&amp;workSheet_Id=1">Edit</a>
                </td>
</tr>
</table>

Problem: 

I expect: 
<a name="editLink1".....

But I get:
<a Id="editLink1"......


 
Baubak Gandomi
68 rue des Prairies
75020 Paris - France
Home: +33-1-46366790
Mobile: +33-60-9596805

Visit the wonderful : 
http://www.uglycityguide.com

Re: Struts2 Posted by Dave Newton <da...@gmail.com>.
Use plain html links with urls generated with the url tag.

Dave

(pardon brevity, typos, and top-quoting; on cell)
On Nov 12, 2012 6:03 AM, "Baubak Gandomi" <ba...@gandomi.com> wrote:

> Hi There,
>
> For AAT reasons I would like to set identities on my links
> in my JSP files.
>
> <table>
> <s:iterator value="workSheet.entries"
> var="currentEntry" status="serverPointer">
> <tr>
>                 <td>
>                                 <s:a
> action="EditWorkSheetEntry" name="editLink%{#serverPointer.count}" >
>                                                 Edit
>                                                 <s:param
> name="selectedEntryId" value="entryId" />
>                                                 <s:param
> name="workSheet_Id" value="workSheet.ws_Id" />
>
> </s:a>
>                 </td>
> </tr>
> </table>
>
> But no matter what I do I never get the “name” attribute for
> my link.
>
> The result of the above turns into:
> <table>
> <tr>
>                 <td>
>                                 <aid="editLink1"
> href="/DBEXEL/EditWorkSheetEntry.action?selectedEntryId=1&amp;workSheet_Id=1">Edit</a>
>                 </td>
> </tr>
> </table>
>
> Problem:
>
> I expect:
> <a name="editLink1".....
>
> But I get:
> <a Id="editLink1"......
>
>
>
> Baubak Gandomi
> 68 rue des Prairies
> 75020 Paris - France
> Home: +33-1-46366790
> Mobile: +33-60-9596805
>
> Visit the wonderful :
> http://www.uglycityguide.com