You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Cosmin Bucur <co...@gmail.com> on 2005/12/01 01:58:46 UTC
How to do inner loops ?
I want to do an inner loop with forEach with for . But I see that both
take the argment of a html element .
So if I were to have :
<div jwcid="@Foreach" source="ognl:parents" value="ognl:parent"
element="div" id="parent">
<span jwcid="DirectLink" listener="ognl:listeners.parentClick"
parameters="ognl:parent.id" />
<div jwcid="@Foreach" source="ognl:parent.children" value="ognl:child"
element="div" id="child">
<span jwcid="DirectLink" listener="ognl:listeners.childClick"
parameters="ognl:child.id" />
</div>
</div>
where in css a parent would have a white bkg , black border and child
would have red bkg and blue border ...
The list of children divs would list inside the white bkg and black
border , when I would like to have all elements in the list on their
own , of the same size but different color background depending if
child or parent ...
How can I do this kind of thing with tapestry ?
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: How to do inner loops ?
Posted by Leonardo Quijano Vincenzi <le...@dtqsoftware.com>.
1st... I think you should be using @For (Tapestry 4 - only, of course)
instead of @Foreach...
You can separate the @For from the real div. For example:
<span jwcid="@For" source="parents" value="ognl:parent">
<div jwcid="@Any" id="parent.id">
</div>
<span jwcid="@For" source="parent.children" value="ognl:child">
<div jwcid="@Any" id="child.id">
</div>
</span>
</span>
;)
Cosmin Bucur wrote:
> I want to do an inner loop with forEach with for . But I see that both
> take the argment of a html element .
>
> So if I were to have :
>
> <div jwcid="@Foreach" source="ognl:parents" value="ognl:parent"
> element="div" id="parent">
> <span jwcid="DirectLink" listener="ognl:listeners.parentClick"
> parameters="ognl:parent.id" />
>
> <div jwcid="@Foreach" source="ognl:parent.children" value="ognl:child"
> element="div" id="child">
> <span jwcid="DirectLink" listener="ognl:listeners.childClick"
> parameters="ognl:child.id" />
> </div>
>
> </div>
>
> where in css a parent would have a white bkg , black border and child
> would have red bkg and blue border ...
>
> The list of children divs would list inside the white bkg and black
> border , when I would like to have all elements in the list on their
> own , of the same size but different color background depending if
> child or parent ...
>
>
> How can I do this kind of thing with tapestry ?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
--
Ing. Leonardo Quijano Vincenzi
DTQ Software
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: How to do inner loops ?
Posted by Cosmin Bucur <co...@gmail.com>.
yes it did , i dunno why i was allwais under the impresion that
dynamic parameters would work on a normal html element
On 11/30/05, Patrick Casey <pa...@adelphia.net> wrote:
>
> Have you checked out:
>
>
> http://jakarta.apache.org/tapestry/3.0.3/doc/ComponentReference/index.html
>
> Might help you out.
>
> --- Pat
>
> > -----Original Message-----
> > From: Cosmin Bucur [mailto:coszminb@gmail.com]
> > Sent: Wednesday, November 30, 2005 5:42 PM
> > To: Tapestry users
> > Subject: Re: How to do inner loops ?
> >
> > thanks , good think i've asked , i would have had issues with the @Any
> > ... still not sure how it works , but i understand it works :)
> >
> > will try
> >
> > On 11/30/05, Patrick Casey <pa...@adelphia.net> wrote:
> > >
> > > <span jwcid="@Foreach" source="ognl:parents" value="ognl:parent"
> > > id="parent">
> > > <span jwcid="@Any" element="div" class="parent">
> > > Anything here is class DIV.parent
> > > <span jwcid="@Foreach" source="ognl:children"
> > > value="ognl:child" id="child">
> > > <span jwcid="@Any" element="div"
> > > class="child">
> > > Anythign here is class DIV.child
> > > </span>
> > > </span>
> > > </span>
> > > </span>
> > > > -----Original Message-----
> > > > From: Cosmin Bucur [mailto:coszminb@gmail.com]
> > > > Sent: Wednesday, November 30, 2005 4:59 PM
> > > > To: Tapestry users
> > > > Subject: How to do inner loops ?
> > > >
> > > > I want to do an inner loop with forEach with for . But I see that both
> > > > take the argment of a html element .
> > > >
> > > > So if I were to have :
> > > >
> > > > <div jwcid="@Foreach" source="ognl:parents" value="ognl:parent"
> > > > element="div" id="parent">
> > > > <span jwcid="DirectLink" listener="ognl:listeners.parentClick"
> > > > parameters="ognl:parent.id" />
> > > >
> > > > <div jwcid="@Foreach" source="ognl:parent.children" value="ognl:child"
> > > > element="div" id="child">
> > > > <span jwcid="DirectLink" listener="ognl:listeners.childClick"
> > > > parameters="ognl:child.id" />
> > > > </div>
> > > >
> > > > </div>
> > > >
> > > > where in css a parent would have a white bkg , black border and child
> > > > would have red bkg and blue border ...
> > > >
> > > > The list of children divs would list inside the white bkg and black
> > > > border , when I would like to have all elements in the list on their
> > > > own , of the same size but different color background depending if
> > > > child or parent ...
> > > >
> > > >
> > > > How can I do this kind of thing with tapestry ?
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: How to do inner loops ?
Posted by Patrick Casey <pa...@adelphia.net>.
Have you checked out:
http://jakarta.apache.org/tapestry/3.0.3/doc/ComponentReference/index.html
Might help you out.
--- Pat
> -----Original Message-----
> From: Cosmin Bucur [mailto:coszminb@gmail.com]
> Sent: Wednesday, November 30, 2005 5:42 PM
> To: Tapestry users
> Subject: Re: How to do inner loops ?
>
> thanks , good think i've asked , i would have had issues with the @Any
> ... still not sure how it works , but i understand it works :)
>
> will try
>
> On 11/30/05, Patrick Casey <pa...@adelphia.net> wrote:
> >
> > <span jwcid="@Foreach" source="ognl:parents" value="ognl:parent"
> > id="parent">
> > <span jwcid="@Any" element="div" class="parent">
> > Anything here is class DIV.parent
> > <span jwcid="@Foreach" source="ognl:children"
> > value="ognl:child" id="child">
> > <span jwcid="@Any" element="div"
> > class="child">
> > Anythign here is class DIV.child
> > </span>
> > </span>
> > </span>
> > </span>
> > > -----Original Message-----
> > > From: Cosmin Bucur [mailto:coszminb@gmail.com]
> > > Sent: Wednesday, November 30, 2005 4:59 PM
> > > To: Tapestry users
> > > Subject: How to do inner loops ?
> > >
> > > I want to do an inner loop with forEach with for . But I see that both
> > > take the argment of a html element .
> > >
> > > So if I were to have :
> > >
> > > <div jwcid="@Foreach" source="ognl:parents" value="ognl:parent"
> > > element="div" id="parent">
> > > <span jwcid="DirectLink" listener="ognl:listeners.parentClick"
> > > parameters="ognl:parent.id" />
> > >
> > > <div jwcid="@Foreach" source="ognl:parent.children" value="ognl:child"
> > > element="div" id="child">
> > > <span jwcid="DirectLink" listener="ognl:listeners.childClick"
> > > parameters="ognl:child.id" />
> > > </div>
> > >
> > > </div>
> > >
> > > where in css a parent would have a white bkg , black border and child
> > > would have red bkg and blue border ...
> > >
> > > The list of children divs would list inside the white bkg and black
> > > border , when I would like to have all elements in the list on their
> > > own , of the same size but different color background depending if
> > > child or parent ...
> > >
> > >
> > > How can I do this kind of thing with tapestry ?
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: How to do inner loops ?
Posted by Cosmin Bucur <co...@gmail.com>.
thanks , good think i've asked , i would have had issues with the @Any
... still not sure how it works , but i understand it works :)
will try
On 11/30/05, Patrick Casey <pa...@adelphia.net> wrote:
>
> <span jwcid="@Foreach" source="ognl:parents" value="ognl:parent"
> id="parent">
> <span jwcid="@Any" element="div" class="parent">
> Anything here is class DIV.parent
> <span jwcid="@Foreach" source="ognl:children"
> value="ognl:child" id="child">
> <span jwcid="@Any" element="div"
> class="child">
> Anythign here is class DIV.child
> </span>
> </span>
> </span>
> </span>
> > -----Original Message-----
> > From: Cosmin Bucur [mailto:coszminb@gmail.com]
> > Sent: Wednesday, November 30, 2005 4:59 PM
> > To: Tapestry users
> > Subject: How to do inner loops ?
> >
> > I want to do an inner loop with forEach with for . But I see that both
> > take the argment of a html element .
> >
> > So if I were to have :
> >
> > <div jwcid="@Foreach" source="ognl:parents" value="ognl:parent"
> > element="div" id="parent">
> > <span jwcid="DirectLink" listener="ognl:listeners.parentClick"
> > parameters="ognl:parent.id" />
> >
> > <div jwcid="@Foreach" source="ognl:parent.children" value="ognl:child"
> > element="div" id="child">
> > <span jwcid="DirectLink" listener="ognl:listeners.childClick"
> > parameters="ognl:child.id" />
> > </div>
> >
> > </div>
> >
> > where in css a parent would have a white bkg , black border and child
> > would have red bkg and blue border ...
> >
> > The list of children divs would list inside the white bkg and black
> > border , when I would like to have all elements in the list on their
> > own , of the same size but different color background depending if
> > child or parent ...
> >
> >
> > How can I do this kind of thing with tapestry ?
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: How to do inner loops ?
Posted by Patrick Casey <pa...@adelphia.net>.
<span jwcid="@Foreach" source="ognl:parents" value="ognl:parent"
id="parent">
<span jwcid="@Any" element="div" class="parent">
Anything here is class DIV.parent
<span jwcid="@Foreach" source="ognl:children"
value="ognl:child" id="child">
<span jwcid="@Any" element="div"
class="child">
Anythign here is class DIV.child
</span>
</span>
</span>
</span>
> -----Original Message-----
> From: Cosmin Bucur [mailto:coszminb@gmail.com]
> Sent: Wednesday, November 30, 2005 4:59 PM
> To: Tapestry users
> Subject: How to do inner loops ?
>
> I want to do an inner loop with forEach with for . But I see that both
> take the argment of a html element .
>
> So if I were to have :
>
> <div jwcid="@Foreach" source="ognl:parents" value="ognl:parent"
> element="div" id="parent">
> <span jwcid="DirectLink" listener="ognl:listeners.parentClick"
> parameters="ognl:parent.id" />
>
> <div jwcid="@Foreach" source="ognl:parent.children" value="ognl:child"
> element="div" id="child">
> <span jwcid="DirectLink" listener="ognl:listeners.childClick"
> parameters="ognl:child.id" />
> </div>
>
> </div>
>
> where in css a parent would have a white bkg , black border and child
> would have red bkg and blue border ...
>
> The list of children divs would list inside the white bkg and black
> border , when I would like to have all elements in the list on their
> own , of the same size but different color background depending if
> child or parent ...
>
>
> How can I do this kind of thing with tapestry ?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org