thanks for the idea!
Error selecting object doesn´t appear anymore, but now it´s turn for this one:
value is required (javax.faces.component.UIInput.REQUIRED)
This is the code I´ve added: (following your sample)
In RstReportHome.java
|
| private Firm specialFirm;
|
| public Firm getSpecialFirm() {
| System.out.println("getSpecialFirm!!");
| return getInstance().getFirm();
| }
|
| public void setSpecialFirm(Firm firm) {
| System.out.println("setSpecialFirm!!");
| if(firm == null) {
| System.out.println("setSpecialFirm - asignando AUTOMATIC!!");
| firm = new Firm();
| firm.setFirmCode("AUTOMATIC");
| CfgCurrency cfgCurrency = new CfgCurrency();
| cfgCurrency.setCurrencyCode(60);
| firm.setCfgCurrency(cfgCurrency);
|
| } else {
| System.out.println("setSpecialFirm - firm no null
"+firm.getFirmDescription());
| }
| getInstance().setFirm(firm);
| }
|
In the view:
| <s:decorate id="firmCodeDecoration"
template="layout/edit.xhtml">
| <ui:define
name="label">#{messages['Firm']}</ui:define>
| <h:selectOneMenu value="#{rstReportHome.specialFirm}"
required="true" id="firm">
| <s:selectItems value="#{firmList.resultList}"
var="firm" label="#{firm.firmCode}"
noSelectionLabel="AUTOMATIC"/>
| <s:convertEntity/>
| <a:support event="onchange"
reRender="firmCodeDecoration"/>
| </h:selectOneMenu>
| </s:decorate>
|
any further idea? I guess the solution must be near ;-)
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4102465#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...