In Tap 3 you can do this:
Body body = Body.get(cycle);
String uniqueId = body.getUniqueString("foo");
and know that uniqueId is unique for the whole the page render.
dunno about Tap4 though.
Geoff
On 12/13/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> From Leonardo Quijano Vincenzi <[EMAIL PROTECTED]>:
>
> > I just need to guarantee (mostly for Tacos) that this:
> >
> > updateComponents="ognl:{components.someComponent.id}"
> >
> > Renders the same id as this:
> >
> > <span
> > id="ognl:components.someComponent.id"
> > jwcid="[EMAIL PROTECTED]">
> >
> > *And*
> >
> > that several instances of this "someComponent" on a page will render
> > unique Tapestry IDs for every one.
> >
> > (Now... you say - "you can't put 2 components with the same name on a
> > page!!". But what if "someComponent" is contained in another component,
> > and *that* one is used twice in a page?)
>
> That's the problem. I'ld have to see tapestry's source, but if i remember
> correctly,
> component 1 (contained in page A) and component 2 (contained in component 3 of
> page A)
> have different namespaces, and so they get different IdAllocators, which means
> they can
> generate the same id.
> Perhaps if we make all tacos components use the same IdAllocator (i.e. take
> the
> one of the
> current page, or have one injected into them - which will be the same for each
> page request)
> then this would be solved.
> But again, you'ld have to take a look at the source, cause I don't have it
> handy
> where i am right now :)
>
>
> >
> > --
> > Ing. Leonardo Quijano Vincenzi
> > DTQ Software
> >
> > [EMAIL PROTECTED] wrote:
> > > org.apache.tapestry.util.IdAllocator
> > >
> > > I think it's also used in tacos somewhere.
> > >
> > > It can generate unique ids for a given namespace.
> > > I think that every page has an instance of this class,
> > > but I don't remember if a component embedded in a page gets the
> > > same idallocator.
> > >
> > >
> > > From Leonardo Quijano Vincenzi <[EMAIL PROTECTED]>:
> > >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
The Spindle guy. http://spindle.sf.net
Get help with Spindle:
http://lists.sourceforge.net/mailman/listinfo/spindle-user
Announcement Feed:
http://www.jroller.com/rss/glongman?catname=/Announcements
Feature Updates: http://spindle.sf.net/updates
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]