Programmatically showing the Popup in ADF | Techartifact

Requirment – To display popup in adf programmatic.

You have to display the popup on click of some button. Drag drop the af:popup in the page and bind the popup in the managed bean like screenshot

On the button , write a method on the action event.

   public void ShowPopup(ActionEvent actionEvent) {
             RichPopup.PopupHints hints = new RichPopup.PopupHints();
             this.getPopUp().show(hints);

    }

If you want to hide the popup..you can write like this

  public void HidePopup(ActionEvent actionEvent) {
             RichPopup.PopupHints hints = new RichPopup.PopupHints();
             this.getPopUp().hide();

    }
   

changing the width of input text in ADF | Techartifact

Requirment – to manage the width of an input text.

Solution- A very small tip on ADF. We have panel form layout , inside that we have multiple input text which is bind to db table column which is set as datatype to verchar2(1000) .then the input text will go beyond the expected limit.How to change the width.

In the input text property there is property called columns.You can give some value like 200 or 300 according to your need.
and it will change the width.

Happy coding with Techartifact

Creating new row of view object in ADF | Techartifact

Requirment – Creating new rows through the view object

Solution-Create a new view row by calling createRow() on the view object as shown in the following code snippet:

/**The createEmployee is a custom method defined in application
* module implementation class.
*/


public void createEmployee () {
//Get the view object
ViewObject employee= findViewObject("EmployeeVO");
// Create a row and fill in the columns.
Row row = employee.createRow();
row.setAttribute("Name", "Vinay");
row.setAttribute("EmpId", 1);
//Insert row in to the default row set
employee.insertRow(row);
}


You can also use createAndInitRow(AttributeList initVals) on the view object to create a new view row. This API allows you to initialize the row with an attribute list.