You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Boris Brinza <bo...@pxpgroup.com> on 2003/05/31 09:57:39 UTC

tag within tag

hi
in my application i have defined custom tag in this form :

<repro:security roles="aa,bb">
  <a href="...">edit record</a>
</repro:security>

this tag checks if curent user is in required role to perform edit and
if so, link is displayed...nothing
hard to understand :-))
but now i need to allow to edit record for user who created it.
so i added parameter "ownerof" and i want to pass ID of record being
rendered and in security tag i want to check if user is creator of
record.
and now i have this problem
how can i pass parameter to custom tag by another struts tag? 
i tried to call tag within tag like this:

<repro:security roles="aa,bb" ownerof='<bean:write property="recId"/>'>
  <a href="...">edit record</a>
</repro:security>

but it doesn't work
is it possible dynamically set some parameters to tag by other tag?

thanks in advance




PXP Slovakia s.r.o.
Boris Brinza
IT Developer
Kukuricna 1, 831 03 Bratislava, Slovakia
phone:  + 421 2 492 65 302
mail :  boris.brinza@pxpgroup.com
web  :  http://www.pxpgroup.com
icq# : 99700104


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


Re: tag within tag

Posted by Mark Lowe <ma...@talk21.com>.
what happens is with any jsp tags are munched my the server which spits 
out java, the java is then complied and run etc. This means that you've 
2 levels : tags libs are an additional layer on top of jsp scriptlets. 
Im not so convinced this is a limitation as someone just said... I 
would find it hard to read tags nested in the way suggested.

> <repro:security roles="aa,bb" ownerof="<%= recId  %>">
>   <a href="...">edit record</a>
> </repro:security>

or something along those lines.



On Saturday, May 31, 2003, at 08:57 Europe/London, Boris Brinza wrote:

> hi
> in my application i have defined custom tag in this form :
>
> <repro:security roles="aa,bb">
>   <a href="...">edit record</a>
> </repro:security>
>
> this tag checks if curent user is in required role to perform edit and
> if so, link is displayed...nothing
> hard to understand :-))
> but now i need to allow to edit record for user who created it.
> so i added parameter "ownerof" and i want to pass ID of record being
> rendered and in security tag i want to check if user is creator of
> record.
> and now i have this problem
> how can i pass parameter to custom tag by another struts tag?
> i tried to call tag within tag like this:
>
> <repro:security roles="aa,bb" ownerof='<bean:write property="recId"/>'>
>   <a href="...">edit record</a>
> </repro:security>
>
> but it doesn't work
> is it possible dynamically set some parameters to tag by other tag?
>
> thanks in advance
>
>
>
>
> PXP Slovakia s.r.o.
> Boris Brinza
> IT Developer
> Kukuricna 1, 831 03 Bratislava, Slovakia
> phone:  + 421 2 492 65 302
> mail :  boris.brinza@pxpgroup.com
> web  :  http://www.pxpgroup.com
> icq# : 99700104
>
>
> ---------------------------------------------------------------------
> 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