You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ian Hunter <ih...@hunterweb.net> on 2003/05/02 19:26:21 UTC

Re: building a custom tag: "Unable to find setter method for attribute"

You DO have a public setRow method in your tag class, right?
----- Original Message -----
From: "miguel angel rojas aquino" <mr...@mail.flashmail.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Friday, May 02, 2003 2:09 PM
Subject: building a custom tag: "Unable to find setter method for attribute"


> hi, i'm trying to implement a custom tag library for my app, but i'm
> getting an "Unable to find setter method for attribute: row" each time i
> try to use the tag.
>
> my tag descriptor is like this:
>
>    <tag>
>      <name>linkPolizaDia</name>
>      <tagclass>com.expert.xpt.util.LinkPolizaDiaTag</tagclass>
>      <info>
>        Genera un enlace URL a una accion especifica construida a partir
>        de un URL base, mas algunos paramaetros de un objeto poliza
>        especifico
>
>        name     - Nombre del atributo que contiene la Poliza
>                   especifica [POLIZA]
>
>        page     - El URL relativo al contecto del la liga generada
>
>        row      - El renglon con el que estamos operando
>
>      </info>
>
>      <attribute>
>        <name>name</name>
>        <required>true</required>
>      </attribute>
>
>      <attribute>
>        <name>page</name>
>        <required>true</required>
>      </attribute>
>
>      <attribute>
>        <name>row</name>
>        <required>false</required>
>      </attribute>
>
>    </tag>
>
> and in the LinkPolizaDiaTag.java file i have the same 3 attributes
> (name, page and row).
>
> in the jsp i'm invoking the tag like this
>
> ...
>
> <%@ taglib uri="/WEB-INF/xpt.tld"          prefix="xpt" %>
>
> ...
>
> <xpt:linkPolizaDia name="POLIZA"
>    page="/editaPoliza.do?accion=borrar" row="1">
>   Borrar
> </xpt:linkPolizaDia>
>
> ...
>
> if row is not included in the tag, the error vanishes
> (<xpt:linkPolizaDia name=... page=... >...
>
> but i need this attribute (i've declared required=false only for testing
> reasons in the tag descriptor).
>
> i'm looking at various samples, but i didn't find the source for this
error.
>
> so, any help would be greatly appreciated as i'm in real despair by now :(
>
> thanks in advance, greetings
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


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


Re: building a custom tag: "Unable to find setter method for attribute"

Posted by miguel angel rojas aquino <mr...@mail.flashmail.com>.
Ian Hunter wrote:
> You DO have a public setRow method in your tag class, right?
> 
>>hi, i'm trying to implement a custom tag library for my app, but i'm
>>getting an "Unable to find setter method for attribute: row" each time i
>>try to use the tag.


ahh, the method access modifiers in all its glory... if it is not 
specified, it would not take effect,right? :)

thanks for the e-slap on the head, i'm going to get a triple coke dosis 
to wake up a little more ;)


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