[Opensource] enhanced lookup in DBMaint
#KARSTEN VOGES#
EX020679 at ntu.edu.sg
Mon Oct 28 19:36:49 PST 2002
A suggestion for the DBMaint controller part:
In my opinion it is important to have the oportunity to add a value to a lookup object, not just to search it.
This code is for Update.java in package com.jcorporate.expresso.services.controller.dbmaint;
Very Similar in Add.java as well.
if (!lookupObjectName.equals("")) {
.....
Transition addLookup = new Transition();
addLookup.setName("addlookup");
addLookup.addParam("dbobj", lookupObjectName);
addLookup.addParam("state", "Add");
addLookup.setDescription("Add Values");
oneField.addNested(addLookup);
} /* if there was a lookup object */
Additional to that I inserted the following into add.jsp and update.jsp:
<logic:present name="oneInput" property="/addlookup">
<bean:define id="addlookupTrans" name="oneInput" property="/addlookup"/>
<td class="jc-default"><a href="<expresso:Context/><bean:write name="oneInput" property="/addlookup.url"/>" target="_new">
<img src="<%=contextPath%>/expresso/images/add.png" border="0"></a></td>
</logic:present>
right before the <logic:present name="oneInput" property="/lookup"> tag.
I think it is useful, maybe someone can put it into cvs?
Cheers,
Karsten.
More information about the Opensource
mailing list