I had been using the Struts 2.0.14(GA) documentation found at
http://struts.apache.org/2.0.14/docs/tag-reference.html
I see there is a difference in the usage in Struts 2.1.8.1 (GA), this is
my fault as I did not state the version however as an 
improvement you'll see that the usage example at the bottom of the page
for http://struts.apache.org/2.1.8.1/docs/a.html
still clearly shows use of the id attribute in the example (same example
as 2.0.14) although http://struts.apache.org/2.1.8.1/docs/url.html
clearly
does state deprecation.  

I'll upgrade to the current release to avoid future confusion.

On Fri, 2010-05-28 at 14:59 -0400, Martin Gainty wrote:

> Hi Ken-
> 
>  
> 
> org.apache.struts2.views.jsp.URLTag
> 
> ..no entries for 'id' attribute..accessor or mutator..
> 
>  
> 
> org.apache.struts2.views.jsp.ContextBeanTag.java
> 
>     /**
>      * To keep backward compatibility 
>      * TODO remove after 2.1
>      */
>     public void setId(String id) {
>         setVar(id);
>     }
> 
>  
> 
> could you point out to greg or myself which doc says id or setId is valid?
> 
>  
> 
> thanks,
> Martin Gainty 
> ______________________________________________ 
> Note de déni et de confidentialité
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
> destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
> l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci 
> est interdite. Ce message sert à l'information seulement et n'aura pas 
> n'importe quel effet légalement obligatoire. Étant donné que les email 
> peuvent facilement être sujets à la manipulation, nous ne pouvons accepter 
> aucune responsabilité pour le contenu fourni.
> 
> 
> 
>  
> 
> 
> 
> Subject: Re: Struts url, a, and iterator tag behaviour
> From: ken.mcwilli...@aerose.com
> To: user@struts.apache.org
> Date: Fri, 28 May 2010 11:58:44 -0600
> 
> I still don't know what caused the issue.  Using just the <a> tag revealed 
> that  ${companyId} was null, producting <a href=""> tags.
> So I removed the id from the <s:url> tag... and then embedded the the whole 
> <s:url> tag into the <a> tag, and it works as expected...
> 
> <a href='<s:url action="companyDetails.action" namespace="/secure"><s:param 
> name="group" value="log.id.mlgroup"/><s:param name="id" 
> value="log.id.mlid"/></s:url>'>
>    <s:property value="cur.mco"/>
> </a>
> 
> My issue is it isn't pretty. Okay just out of interest I added  
> id="something" to <s:url> and the html is back to <a href=''>... So the id 
> attribute causes the tag not to return a value and pushes the url onto the 
> value stack as the name of the id attribute?  
> 
> The usage example here suggests this too: 
> http://struts.apache.org/2.0.14/docs/a.html 
> 
> On Fri, 2010-05-28 at 08:34 -0400, Greg Lindholm wrote: 
> Use the "href" not the "value" attribute to specify the URL.
> 
> Unless you are use the tag ajax support there is no reason to use the
> <s:a> tag just use the plain html <a> tag
> 
> like <a href="${companyId}">
> 
> On Thu, May 27, 2010 at 8:38 PM, Ken <ken.mcwilli...@aerose.com> wrote:
> > I am trying to dynamically construct a url inside an iterator tag and
> > use that result in an anchor.
> >
> >        <s:iterator value="next">
> >            <s:url  id="companyId" action="companyDetails.action"
> > namespace="/secure">
> >                <s:param name="group" value="log.id.mlgroup"/>
> >                <s:param name="id" value="log.id.mlid"/>
> >            </s:url>
> >            <tr>
> >                <td><s:property value="log.id.mlgroup"/></td>
> >                <td><s:property value="log.id.mlid"/></td>
> >                <td><s:property value="log.mlco"/></td>
> >                <td><s:a value="%{companyId}"><s:property
> > value="cur.mco"/></s:a></td>
> >            </tr>
> >        </s:iterator>
> >
> > This is producing the following html:
> > (Showing two iterations only)
> >
> > <tr>
> >
> >                <td>01  </td>
> >                <td>24737</td>
> >                <td>****  TEST ** FOCUS INDUSTRIAL ****                      
> >                   </td>
> >                <td><a>****  TEST ** FOCUS INDUSTRIAL ****     </a></td>
> >            </tr>
> >
> >
> >
> >
> >            <tr>
> >                <td>01  </td>
> >                <td>07777</td>
> >                <td>==================+** THE TEST COMPANY  
> > **+================================</td>
> >                <td><a>CASH ** THE TEST COMPANY  **            </a></td>
> >            </tr>
> >
> > Any Ideas?
> >
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org




Reply via email to