Not quite :)
getHTMLId() seems to work but,
it would produce the same id if you put your component within another
component and then add the new one twice in a page.

In general, we add in .jwc
<parameter name="id" property="idParameter" default-value="id"/>
and then in the .java
writer.attribute("id", cycle.getUniqueId(getIdParameter()));
which is similar to yours but ensures uniqueness. It has a drawback,
however. You can't know the html id before the component renders!

Anyway, as you noticed, we somehow forgot to add this to the Dialog component -
we'll do asap!

>From  Kris Rasmussen <[EMAIL PROTECTED]>:

> I don't see any way to extend your existing tacos components that use the
> component id as the html id. For example, if I wanted to create a new
> component based on the Dialog component, I don't see how I could create
> unique ids for refrence via javascript in the page.
>  
> I checked out the source and added an "elementId" override paramter to the
> dialog component and replaced all references to getId() with getHTMLId().
>  
> getHTMLId() looks like
> return getElementId() != null ? getElementId() : getId().
>  
> Does this sound like the correct approach? Should you guys consider something
> like this for the other components?
>  
> Kris


-- 




-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Tacos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tacos-devel

Reply via email to