br.com.jarch.faces.ui._LookupUI Maven / Gradle / Ivy
package br.com.jarch.faces.ui;
import javax.el.MethodExpression;
import javax.faces.component.FacesComponent;
import javax.faces.component.NamingContainer;
import javax.faces.component.UIInput;
import javax.faces.component.UINamingContainer;
import javax.faces.context.FacesContext;
@FacesComponent("br.com.jarch.faces.ui._LookupUI")
public class _LookupUI extends UIInput implements NamingContainer {
private UIInput code;
private UIInput description;
private Object actionFilterSelect;
public UIInput getCode() {
return code;
}
public void setCode(UIInput code) {
this.code = code;
}
public UIInput getDescription() {
return description;
}
public void setDescription(UIInput description) {
this.description = description;
}
public Object getActionFilterSelect() {
return actionFilterSelect;
}
public void setActionFilterSelect(Object actionFilterSelect) {
this.actionFilterSelect = actionFilterSelect;
}
@Override
public String getFamily() {
return UINamingContainer.COMPONENT_FAMILY;
}
@Override
public void decode(FacesContext context) {
setSubmittedValue(context.getExternalContext().getRequestParameterMap().get(getClientId()));
super.decode(context);
}
public String methodAction() {
MethodExpression me = (MethodExpression) this.getAttributes().get("action");
if (me != null) {
Object result = me.invoke(FacesContext.getCurrentInstance().getELContext(), null);
if (result instanceof String) {
return (String) result;
}
}
return null;
}
public void methodListener() {
MethodExpression me = (MethodExpression) this.getAttributes().get("listener");
if (me != null) {
me.invoke(FacesContext.getCurrentInstance().getELContext(), null);
}
}
public String getIdPanelLookup() {
return "_panelLookup_" + getId().replace(":", "");
}
public String getSearchLookup() {
return "_executeSearchLookup" + getId().replace(":", "");
}
public String getClearCodeDescriptionLookup() {
return "_clearCodeDescriptionLookup" + getId().replace(":", "");
}
public String getWidgetVarLookup() {
return "_widgetVarLookup" + getId().replace(":", "");
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy