I'm going to write a user documentation page for the id "situation" as it currently exists, but here is a very basic summary of what people should be doing.
-) If your component is not going to be in a loop, and is also not nested within a form (Ie is a IFormComponent), then you can safely use the jwcid="<my unique id>@<component type" method for specifying an id.
your updateComponents would then look like updateComponetns="{'<my unique id>'}".
-) If your component IS in a loop, or is an IFormComponent, it's not safe to use the jwcid="<id>@<type>" method because tapestry then takes these id's and makes them different on render..The Looping makes them id_N where N is the iteration number. Form components do the same thing....
The safest thing to do for these is use
jwcid="@<comp type" id="ognl:my own unique id assignment/generation"
I will double-check the form name semantics before writing the user documentation to go with it as there may be more catches..
Of course the "Easiest" way to do this is to use the method names on the components themselves, like getId() or getClientId() for form components.
This will be fixed in the 4.1 version of tapestry.....I actually think I've managed to confuse myself somehow :) I'm sure tacos can do a better job than this somehow.
On 12/6/05, Michael Waluk <[EMAIL PROTECTED]> wrote:
Hi,I do have it working with things like...<
div jwcid="[EMAIL PROTECTED]" id ="ognl:components.myDiv.extendedId"> I was mainly just wondering if that is the best way to do it. I don't use the direct="true" setting so it works fine. I was also wondering if the Tapestry ID and the HTML ID have to match if you are using direct="true". I guess I can always dig into the Ajax Direct Service if I am really curious.Thanks so much for your responses,Michael
On 12/6/05, Cosmin Bucur <[EMAIL PROTECTED] > wrote:But then again , I don;t know , this is the best sugestion i could
come up with , if you guys know a better way of dooing what he needs
done , i'm sure he'll gladly listen :) And be sure i'd also be taking
notes
On 12/6/05, Cosmin Bucur < [EMAIL PROTECTED]> wrote:
> I guess if one needs to do such a thing , one should make sure that
> all requirements for this to work are met .
>
> Other than that ... the only thing left that's wierd , is this
> restriction that tapestry imposes of not calling the same instance of
> a component twice in the page
>
> On 12/6/05, Leonardo Quijano Vincenzi <[EMAIL PROTECTED]> wrote:
> > Cosmin Bucur wrote:
> > > I don't understand why the jwcid and the id have to match .
> > >
> > > So tapestry won't render the page if your components have
> > > subcomponents which end up having the same name ? that sux
> > >
> > > Anywais , I never needed to do this , but I do have lists in my apps ,
> > > and within the listable components I make , the subcomponents tend to
> > > be identic . However I never declare these subcomponents in my jwc ,
> > > forcing them to have a jwcid name . Instead I do this
> > >
> > > <span id="ognl:val1" jwcid="@Insert" value="ognl:val1" />
> > > <span id="ognl:val2" jwcid="@Insert" value="ognl:val1" />
> > >
> > > ...
> > >
> > > Would that approach not work ?
> > >
> > Well if "ognl:val1" turns out with invalid ID values (I don't remember
> > the rules now, but there are some), it wouldn't work. Also, what
> > guarantees that ognl:val1 and ognl:val2 are identic? And even if they're
> > different in the same component, what happens when you put several
> > instances of this component in the page?
> >
> > --
> > Ing. Leonardo Quijano Vincenzi
> > DTQ Software
> >
> >
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> > for problems? Stop! Download the new AJAX search engine that makes
> > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> > _______________________________________________
> > Tacos-devel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/tacos-devel
> >
>
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
_______________________________________________
Tacos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tacos-devel
