Saturday 31 October 2015

How to set the width of input text box in ADF

To set the width of input text box we need to set the width in contentStyle. Add like the below code

<af:inputText contentStyle="width:100px;"/>

Now run your page automatically the width will set as per your define width.

Thanks...

How to expand the first node of tree table on page load

Add the below properties on af:treeTable

initiallyExpanded="true"

Now run you page on page load the first node will expand always.

Thanks..

Use of autotab in ADF

This blog we will see how to use auto tab in ADF.
Some times in real life example you can see after filling the one textbox automatically it will move to next box. Screen is like the below
Let’s consider a requirement, we have two text box and while user entering the text after 3 character automatically we need to move to next text box.
The below steps we need to follow
1. Create two textbox.
2. Add maximumLength="3" and autoTab="true" for the first text box.
The code should looks like the below.


<af:inputText label="First Name" id="it1"
                           maximumLength="5" autoTab="true"/>
<af:inputText label="Last Name" id="it2"/>

Now run you application and after entering the first text automatically it will move to next.

Thanks..

Wraping content of output text in ADF

This blog we will see how to wrap the value of output text.
Some time in real life development we will get a requirement, to wrap the value of output text if the value is long.

We need to add the inline style class like the below.

inlineStyle="width:50px;display:inline-block;word-wrap:break-word"

Now run your page as per the width it will wrap the text.

Thanks...

Thursday 29 October 2015

Displaying a Popup on Page Load


This blog we will see how to display a popup on page load.
The below steps we need to follow to display a popup on page load.
1. Create a page which one you want to display on Page.
2. Create a popup which one you want to display after the page load.


<af:popup childCreation="deferred" autoCancel="disabled" id="p1">
      <af:dialog title="Displaying the Popup on Page Load" id="d2">
            <f:facet name="buttonBar"/>
            <af:panelFormLayout id="pfl1">
            <af:outputText value="This is the onload popup." id="ot2"/>
            </af:panelFormLayout>
      </af:dialog>
</af:popup>

3. Add the af:showPopupBehaviorafter the af:form like the below
4. Now set the trigger type to load in af:showPopupBehavior.
 Now run your page and the popup will comes up after page load like the below.
You Can download the code: Download

Thanks..