Hi Mani,

Mani_N wrote:
Am seeing the following to do for generated select tag in appfuse generated
jsp page which is referring to the list of child objects. Please let me know
what is that I have to do to make this select box active with values of the
memotype table......

<!-- todo: change this to read the identifier field from the other pojo -->
    <s:select name="memorandum.memotype.id" list="memotypeList" listKey="id"
listValue="id"></s:select>
Assuming you are using AppFuse 2 and the Struts Archetype, you will need to add to your Action class a memotypelist attribute (which will presumably be a List<MemoType> assuming that MemoType is the name of that entity class). You'll also need to add getMemotypelist() and setMemotypelist(List<MemoType>) methods. Finally, you will have to populate the memotypelist list in your Action's "prepare" method.

How you populate the list will depend on your application. However, if you have a memotype table and you've used the AppFuse maven gen goal to create all the plugin code to support it, you should have a memotypeManager bean defined (possibly as a generic Manager bean in which should have a "getAll" method that will probably return you a useful list. The process you need to implement is very similar to the one described in the PersonAction tutorial (http://appfuse.org/display/APF/Using+Struts+2#UsingStruts2-action) except that list is built for a different screen and therefore the personList is populated in the "list()" method rather than the "prepare()" method.

Finally, on lists like this, a lot of people don't respond to "pleading" messages. It's much better to describe what you've tried and where you've looked for your answer. We're all developers like you, busy on our own projects and I've found everyone to be happy to help someone who's obviously tried hard to work it out for himself first.

HTH,

Rob Hills
Waikiki, Western Australia

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to