oracle adf - Input text validation when is empty -
i have 3 dependent text boxes. is, department, class , subclass. when department fill class of inputtext enable , when preecho class subclass enable. make process not had difficulties. however, can not make reverse process when delete, example, value of department should put disable class , delete value. not because events, when empty not trigger new event , therefore not enter else if. text boxes have autosuggest behavior , class depends on chosen department , subclass of class. class , subclass have associated partialtriggers.
my code of input text department (with valuechangelistener setdepartment()):
public void setdepartment(valuechangeevent valuechangeevent) { dciteratorbinding dc2 = (dciteratorbinding)evaluteel("#{bindings.scpclassview1iterator}"); viewobject vo2 = dc2.getviewobject(); vo2.applyviewcriteria(vo2.getviewcriteriamanager().getviewcriteria("scpclassviewcriteria")); if (it7.getvalue() == null) { vo2.ensurevariablemanager().setvariablevalue("p_dept", null); } else { string deptiddesc = valuechangeevent.getnewvalue().tostring(); int indexofseparator = deptiddesc.indexof("-"); string deptid = deptiddesc.substring(0, indexofseparator - 1); vo2.ensurevariablemanager().setvariablevalue("p_dept", deptid); } vo2.executequery(); if (valuechangeevent.getnewvalue().tostring().isempty()) { getit8().setdisabled(true); } else { getit8().setdisabled(false); }
did try run code in debug mode , set breakpoint inside setdepartment method? confirm whether setdepartment method invoked on clearing off data department input. also, looking @ code, feel throw exception when input empty. if (it7.getvalue() == null)
evaluate false when clear off data, it7 have blank value instead. here need use if (valuechangeevent.getnewvalue().tostring().isempty())
Comments
Post a Comment