Anil's Blog is Best Viewed on GOOGLE CHROME

Monday, August 2, 2010

How to make selected row Read Only in Table



In this exercise, we are making read only one column of a Table Bean on the click of a image column.


Steps:

1. Create one Boolean Transient Attribute in existing VO.



 2.  Set the SPEL syntax into the Read Only property for the attributes of table that you want to make read only. In below screenshot I have set it for one column.




3.  Create event on image column. Name of Event : update


Controller Code

import oracle.apps.fnd.framework.OARow;

public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
  {
    super.processFormRequest(pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    if ("update".equals(pageContext.getParameter(EVENT_PARAM)))
    {
          String rowReference = pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);
          if(rowReference != null)
          {
            TestVORowImpl xxvorowimpl = (TestVORowImpl)am.findRowByRef(rowReference);
            xxvorowimpl.setreadOnlyAttr(Boolean.TRUE);
          }
        
    }
  }

Cheers!!!

4 comments:

  1. Great Job Anil
    That was very much helpful
    Keep going with the great job
    Appreciate that

    ReplyDelete
  2. great job!!!! but for complete row will we have to set the spel in each attribute of the row.

    ReplyDelete
  3. Just what I needed.
    Your doing such a great job.
    Thanks man.

    ReplyDelete

Note: Only a member of this blog may post a comment.