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



















Ken McWilliams
A E Rose Information Service Ltd.
PO Box 3473


15A Alberta Avenue
Spruce Grove  AB
T7X 3A7
Phone:  780 948-0012
Fax:       780 948-0052
E-Mail:  ken.mcwilli...@aerose.com





                                          
_________________________________________________________________
The New Busy is not the old busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3

Reply via email to