I need to build a component using Dynamic Combo Box, but I can not get the data in the java class.
How can I send data from natural program to java class and so fill the Combo Box? (Note: The XML of control is actually generated by Java class).
Best regards,
Alexandre Oliveira
Hi Alexandre,
I am curious: Why don’t you use the dynamic combobox controls of the NJX control set?
Best Regards,
Christine
Hi Chistine,
I have created the component as you can see in the attached image. The problem is to fill the combobox with data from Natural.
Best Regards,
Alexandre
FINDERHandler.java (4.81 KB)
P17.TXT (1.25 KB)
Alexandre, you don’t need an Info class if you just combine existing controls to new controls. These controls generate their binding themselves. Please see attached your modified example. Just import it into your workspace as a project and build it. You might have to use the Monitoring tool (as above) to make sure that the newly generated class is loaded. Regards, Thomas
SAMPLE01.zip (7.31 KB)
1 Like
Hi Thomas,
I didn’t understand what was wrong, but the component is working. Thanks.
My idea is that the component has intelligence and is returned to the program only the result of selection. I think a java class (FINDERInfo.java) is required
Regards
Hi Alexandre,
what about using a FIELD control with popupmethod=“openIdValueCombo” instead of COMBODYN2?
Best Regards,
Christine
Hi Christine,
I think it’s a good idea, but Thomas showed me how to use the combobox. I am curious: how do I put items in the FIELD?
Best Regards,
Alexandre
Hi Alexandre,
for the FIELD controls using popupmethod you’ll find samples in the NaturalAjaxDemos. For instance: ctrlfieldvalidvalues.xml and corresponding Natural program CTRFVV-P.
With FIELD controls you also can use the AUTOCOMPLETE feature. Example: ctrlfieldautocomplete.xml and Natural program FDAUTO-P.
Best Regards,
Christine