At first, different data sets are stored from the two lists, however, after some combination of variables in the get method, it ultimately saves the same data type. The ultimate goal is to populate the drop-down list with two lists sorted by their names (description).
The main thing is that there are two tables containing the data type, but storing them so differently that it is almost impossible to write a good SQL statement to get it. The end result is a "name" or "nameIndex" object.
Both have an index code, but this is not related to the opposite table, it is related to what is stored in the third table, which must be updated using this code. Codes will never match between tables (one two characters long, the remaining 3 or more).
How to combine these two lists into a drop-down list for the user, so that the value of the drop-down list is an index code and a description displayed as a label?
Example:
<html:select property="name"> <html:optionsCollection name="nameList" label="nameDescription" value="nameCode" /> </html:select> <html:select property="nameIndex"> <html:optionsCollection name="nameIndexList" label="nameIndexDescription" value="nameIndexId.nameCode" /> </html:select>
(note the value of "nameIndexId.nameCode"):
<html:select property="allNames"> <html:optionsCollection name="allNames" label="nameDescription" value="nameCode" /> </html:select>
source share