You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Wesley Hales <we...@gmail.com> on 2006/10/02 19:33:08 UTC

How To Workaround dynamic ID for datatable's etc...

So not having dynamic ID's will prevent cross site scripting attacks... So
how must one workaround the issue of multiple components with the same id on
one page?
My issue is that I have multiple datatables on one page with the same id (I
have a list of lists... after datatable loops throught the first list, a new
datatable loops through the sub-list and uses the same id for each one)
a.k.a nested tables in the detailStamp. All of the tables sort when I only
want one of them to sort.

Any help is greatly appreciated,
Wesley Hales

Re: How To Workaround dynamic ID for datatable's etc...

Posted by Andrew Robinson <an...@gmail.com>.
What do IDs have to do with cross site scripting attacks? Cross site
scripting attacks refers to people injecting HTML/SCRIPT content into
your pages to introduce content that looks like it is from your page
but is from another site. I don't see how the IDs of UIComponent is
related at all.

As for IDs, don't reuse them -- and ID is just that -- a unique
identifier for a component on a JSP or XHTML page, it cannot be reused
-- that is a bug.

On 10/2/06, Wesley Hales <we...@gmail.com> wrote:
> So not having dynamic ID's will prevent cross site scripting attacks... So
> how must one workaround the issue of multiple components with the same id on
> one page?
> My issue is that I have multiple datatables on one page with the same id (I
> have a list of lists... after datatable loops throught the first list, a new
> datatable loops through the sub-list and uses the same id for each one)
> a.k.a nested tables in the detailStamp. All of the tables sort when I only
> want one of them to sort.
>
> Any help is greatly appreciated,
> Wesley Hales
>