Wednesday, 7 December 2011

Making Rows Read Only



Create a transient attribute in VO

Assign into page

${oa.current.saveEnable}







public void readOnlyTable(OAPageContext pageContext, OAWebBean webBean)
 { 
    //making rows readonly which are saved
    OAApplicationModule am = (OAApplicationModule)pageContext.getApplicationModule(webBean);
    OAViewObject vo = (OAViewObject)am.findViewObject("OverridesFullVO1");
    if(vo!=null)
    {
      for(Row row = (Row)vo.first();row!=null;row = (Row)vo.next())
      {
        if("SAVED".equals((String)row.getAttribute("Attribute1")))
        {
          row.setAttribute("saveEnable",Boolean.TRUE);
        }
      }
    }
 }

No comments:

Post a Comment