/** * This method can be used by controllers of lookup popup windows to find the max length of the * lookup component */ public static int getParentLookupMaxLength(JspController cont) { int value = 0; String callingController = cont.getParameter(HtmlLookUpComponent.PARAM_LOOKUP_CONTROLLER); if (callingController != null) { try { JspController otherCont = (JspController) cont.getSession().getAttribute(callingController); if (otherCont != null) { HtmlLookUpComponent luComp = (HtmlLookUpComponent) otherCont.getComponent( cont.getParameter(HtmlLookUpComponent.PARAM_LOOKUP_COMPONENT)); value = luComp.getEditField().getMaxLength(); } } catch (Exception ex) { } } return value; }
private String[] getLookupComponent() { String lookupComponent = null; String lookupFormat = null; String formString = null; String popup = null; String callingController = getPage().getParameter(HtmlLookUpComponent.PARAM_LOOKUP_CONTROLLER); if (callingController != null) { try { JspController thisCont = (JspController) getPage(); JspController otherCont = (JspController) thisCont.getSession().getAttribute(callingController); if (otherCont != null) { HtmlLookUpComponent luComp = (HtmlLookUpComponent) otherCont.getComponent( thisCont.getParameter(HtmlLookUpComponent.PARAM_LOOKUP_COMPONENT)); String luName = luComp.getEditField().getFullName(); int luRow = Integer.parseInt(thisCont.getParameter(HtmlLookUpComponent.PARAM_LOOKUP_ROW)); if (luRow > -1) luName += "_" + luRow; lookupComponent = luName; if (luComp.getUsePopup()) { popup = "win"; if (luComp.getUseDiv()) popup = "div"; } lookupFormat = luComp.getEditField().getDisplayFormat(); formString = luComp.getEditField().getFormString(); } } catch (Exception ex) { } } if (lookupComponent == null) return null; String st[] = new String[4]; st[0] = lookupComponent; st[1] = lookupFormat; st[2] = formString; st[3] = popup; return st; }
public String getDivFullName(int rowNum) { HtmlLookUpComponent luComp = this; String luName = luComp.getFullName(); if (rowNum > -1) luName += "_" + rowNum; return "div" + luName; }