Sunday, August 28, 2011

Get value from ADF selectOneChoice


    public void selectOneChoice1_valueChangeListener(ValueChangeEvent valueChangeEvent) {
	  //for iterator name click binding tab in the jsf page
        DCIteratorBinding  listIter = getBindingsForDCB().findIteratorBinding("yourViewObj1Iterator");                  
        int curIndex = (Integer)valueChangeEvent.getNewValue(); 
        Row datRow = listIter.getRowAtRangeIndex(curIndex);
        String name = (String)datRow.getAttribute("Code"); //as in data control
    }

Wednesday, August 10, 2011

ADF tableLayouts


A TableLayout is a thin wrapper around the HTML < table > element. It contains a series of row layout elements.

Example:

<afh:tableLayout width="75%"
             borderWidth="3"
             cellSpacing="10"
             halign="center">
  <afh:rowLayout>
     First Column

    <afh:cellFormat valign="bottom">
      SecondColumn
    </afh:cellFormat>

    <af:panelGroup layout="horizontal">
      Third Column
      <af:objectSpacer height="100" width="1"/>
    </af:panelGroup>

  </afh:rowLayout>

  <afh:rowLayout>
    <af:panelHeader text="ADF Faces Components"/>
    <afh:cellFormat columnSpan="2">
      <af:panelHeader text="Faces Servlet"/>
    </afh:cellFormat>
  </afh:rowLayout>
</afh:tableLayout>