Safe to have multiple Struts inputs with same name?
Joined: Sep 14, 2004
I have a page that shows widget data. This data lives on 4 different tabbed sections which a swapped in and out. Also above the tabbed region is a pull down that allows user to choose from 4 widget types. One of the tabbed areas changes for each of the different types. This area has a couple of inputs in common and several which are not. Since this thing is tabbed all of the inputs exist on the page at the same time its just that they are not all visible at the same time. My first question is this for the inputs that are in common in the dynamic tabbed region can they all reference by the "name" attribute the same field in the action form? Or is this dangerous. Also if this is possible when you first intialize the page from the action form if more than input has the same name will they all be initialized from the form by Struts? Or should each input have a unique name? I know this seems weird but this is the design issues that I am struggling with for this project. TIA