OAF Form Items


Different Form Items.

1- Create a new workspace, Project, AM and Page as usual.






1- messageTextInput Item:-

            Message text input item will used to enter values.

            For example username,password etc.

First create two items and select the item and go to property inspector set item style as messageTextInput.

To make the fields mandatory in the property inspector set showRequired to TRUE.

To make the texts in disable mode like we write the passwords in property inspector set the secret to TRUE.

If u want u can change the CSS style also.


Run this form and the output would be like:


2- messageStyledText:-

            To display the data in a read only format use the message style text item.

            Create the item select the item style as messageStyleText in the property inspector.


3- messageCheckBox Item:-

            Create the item select the item style as messageCheckBox in the property inspector.

            For messageCheckBox item we have to set some default properties.

            Initial Value:- Y (By default if u want to check the check box give the value Y).

            Checked Value:-ONE(By default which check box u want to check give that value).

Unchecked Value:-TWO(By default which check box u want to uncheck give that
 value).
            Initially Checked:-TRUE (By default if u want to check set the value to true).



4- messageRadioButton Item:-

            Create the item select the item style as messageRedioButton in the property inspector.


Note: Add the import entry in the controller area
import oracle.apps.fnd.framework.webui.beans.message.OAMessageRadioButtonBean;

We can create and check all the radio buttons .

To check the single value we have to create one group for all the radio buttons programmatically in the controller.


 public void processRequest(OAPageContext pageContext, OAWebBean webBean)
  {
    super.processRequest(pageContext, webBean);
      //To retrive the radio buttons
      OAMessageRadioButtonBean mrb=(OAMessageRadioButtonBean)webBean.findChildRecursive("MRB1");
      /*set the group name for the radio buttons.*/
      mrb.setName("Gender");
      /*set the value for particular radio button.*/
      mrb.setValue("male");
     
        OAMessageRadioButtonBean mrb3=(OAMessageRadioButtonBean)webBean.findChildRecursive("MRB2");
        mrb3.setName("Gender");
        mrb3.setValue("female");
     
  }

Run this form:



5- messageChoice Item:-

            Create the item select the item style as messageChoice in the property inspector.



            For message choice we need a view object so first create the view object.

            Right click on project select new.

            ADF Business Component---- >View Object

            Click ok.





## Add the VO in AM



6- Image Item:-

           If u wants to insert any image in the OAF page then we we will use the image item.

           We cannot take image item directly in messageComponentLayout region for that first we have to
            take messageLayout and within that create the item and select the item set item style as image in
           property inspector.


To display the images first we have to put our image in the server.

         All the images in server are stored in OA_MEDIA directory.

         Copy the image in OA_MEDIA. To know the path open the putty type $OA_MEDIA

         It will give the OA_MEDIA directory

        Type pwd it give the path and place your image in that.

        Here we are using WinSCP to move the file to server.

Next Copy the image in the local machine Jdeveloper patch OA_MEDIA directory also.
  jdevhome\jdev\myhtml\OA_MEDIA


To display the image in page we have to set some property in the property inspector of that item
Visual--- >
 Image URI-- > /OA_MEDIA/rose.jpg
  

Run this page.

7- messageRichTextEditor Item:-

            Create the item select the item style as messageRichTextEditor  in the property inspector.

            messageRichTextEditor item is used if the user want to give more details we use this.

            For ex writing Summary, Address etc.

            Give the prompt for the item.

            Run the page to get the output.





1 comment:

  1. This comment has been removed by the author.

    ReplyDelete