Tag Archives: af:input

How to in Jdeveloper ADF – increase the inputcomboboxlistofvalues dialog width


Problem:

To increase the width of the af:inputcomboboxlistofvalues dialog box.

Solution:

Recently I have been challenged to increase the width of the af:inputcomboboxlistofvalues dialog box. using contentStyle or inlinestyle will increase the width of the component and the dialog box will remain the same. So i thought of playing with the CSS file and could possibly achieve the width with the following hack.


<af:resource type=”css”>
.adf_dialog_main{
   min-width: 500px;
}
</af:resource>
Advertisements

Explicit validation for af:input components


Here is a simple way to get around with the red box validation that used to appear on af:input Components upon some validation

<af:inputText value="#{row.bindings.<attributeValue>.inputValue}"
 label="#{bindings.<tableBinding>.hints.<attributeValue>.label}"
 required="#{bindings.<tableBinding>.hints.<attributeValue>.mandatory}"
 columns="#{bindings.<tableBinding>.hints.<attributeValue>.displayWidth}"
 maximumLength="#{bindings.<tableBinding>.hints.<attributeValue>.precision}"
 shortDesc="#{bindings.<tableBinding>.hints.<attributeValue>.tooltip}"
 id="it3" validate="#{MyBean.validate}">

and in the MyBean class we have it like

public void validate(FacesContext facesContext, UIComponent uiComponent, Object value) {
        FacesMessage message = new FacesMessage();
        message.setDetail("Some Errror message");
        message.setSummary("Value Error message");
        message.setSeverity(FacesMessage.SEVERITY_ERROR);
        throw new ValidatorException(message);
}

what are we doing here..

  • Getting the handle to the FacesMessage by explicitly instantiating it
  • Set the Detail,Summary and Severity for the message
  • Throwing the message as a ValidatorException