YUI/Struts2: tabs initially unrendered or clone hidden region with idmutations

D

david.karr

It's always a challenge to come up with a cogent subject line when I
don't know what the heck I'm talking about.

I'm using Struts2 and YUI, and I'm pretty new to YUI and JavaScript.

I'm trying to figure out the best strategies for implementing a
dynamic tab panel that will eventually be submitted en masse to the
server. There will be a couple of "static" tabs with a bunch of
fields in them, and there will be actions on the page to add/remove
dynamic tabs, each of which will have quite a few fields, but all the
same fields on all the dynamic tabs. the "id" attributes will specify
an array index to allow the server-side code to differentiate between
the tabs.

When I tried building this prototype with JSF/RichFaces, I ended up
rendering a max of 10 dynamic tabs, but all initially unrendered.
Actions on the page would set or clear the rendered flag on a tab.
I'm not sure whether this strategy will work with YUI. I think not.

Alternatively, I wonder if I can "clone" a hidden region in JavaScript
and mutate all the id fields to reflect an array index.

I could use some comments on this and some ideas.

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,438
Messages
2,571,699
Members
48,796
Latest member
Greg L.
Top