Friday, November 30, 2007

Final year project

Now we are working hard on our final year projects. Im in Rampart2 project group. Its a security module for Apache Axis2.

I'm working on XML Encryption part in XMLSec project. I have to use Axiom instead of DOM to parse XML in this new version to increase performance as it uses pull parsing while DOM does push parsing.

We have to finish the project before end of January. So having a hard time:)

Wednesday, March 14, 2007

Training is over

Our 6 months industrial training period is over now. We submitted the training report on last Friday and had the viva yesterday. So it's almost over although we continue working till may optimizing the vacation. (missed 2 months vacation however:)

Thursday, February 08, 2007

JSF: Binding dataTable from managed bean

This is a very easy method to retrieve row data of the data table in jsp page, from managed bean.
<h:dataTable var="item" value="#{MyBean.items}"
binding="#{MyBean.dataTable}" >
<h:column>
<h:outputText styleClass="output" value="#{item.productName}"/>
</h:column>

<h:column>
<h:commandButton value="remove" action="#{MyBean.remove}" />
</h:column>
</h:dataTable>
.
public class MyBean {
   private ArrayList items = new ArrayList();
   private HtmlDataTable dataTable;

   public ArrayList getItems() {
      return items;
   }

   public void setItems(List items) {
      this.items = new ArrayList(items);
   }

   public void remove(){
      ItemBean item = (ItemBean) getDataTable().getRowData();
      items.remove(item);
   }

   public HtmlDataTable getDataTable() {
      return dataTable;
   }

   public void setDataTable(HtmlDataTable dataTable){
      this.dataTable = dataTable;
   }

}
here, when user clicks the remove button, the related item is removed
from the data table.
Related Posts with Thumbnails