Correct code for Visual JSF Lab

Tuesday, October 02, 2007

For the interested people who attended, during the NetBeans Day in Cagliari, the Visual JSF Lab, a possible correct code, in order to run correctly the example project, is listed below:

...

@Override
public void prerender() {
if ( dropDown1.getSelected() == null ) {
try {
personDataProvider.cursorFirst();
getSessionBean1().getTripRowSet().setObject(
1, personDataProvider.getValue("PERSON.PERSONID"));
tripDataProvider.refresh();
} catch (Exception e) {
e.printStackTrace();
}
}
}



...


public void dropDown1_processValueChange(ValueChangeEvent event) {

try {
getSessionBean1().getTripRowSet().setObject(1, dropDown1.getSelected());
tripDataProvider.refresh();
} catch (Exception e) {
e.printStackTrace();
}
}

...


You Might Also Like

0 commenti

Subscribe