Results 1 to 2 of 2
- 01-18-2011, 01:28 PM #1
Member
- Join Date
- Jan 2011
- Posts
- 21
- Rep Power
- 0
problem with delete row from <h:dataTable>
hi all
i have such code
<h:dataTable value="#{otsTableClass.list}" var="loc" border="1" styleClass="text" captionClass="label" >
<h:column>
<f:facet name="header" >
<h:outputText value="#"/>
</f:facet>
<h:outputText value="#{loc.rowNum}"/>
</h:column>
</h:dataTable>
with class
@ManagedBean
public class OtsTableClass implements Serializable {
private List<OtsTableBodyClass> list;
...
}
and it works fine, but i need add delete button as table column
and i add
in jsf
<h:column>
<f:facet name="header">Action</f:facet>
<h:commandLink value="Delete" action="#{otsTableClass.deleteAction(loc)}" />
</h:column>
in class file
public String deleteAction(OtsTableBodyClass order) {
list.remove(order);
return null;
}
when i compile this appares following exception
Error Parsing: #{otsTableClass.deleteAction(loc)}
anyone can tell how to add delete buttom as column to delete intended him row?
- 01-21-2011, 05:36 AM #2
Member
- Join Date
- Jan 2011
- Posts
- 21
- Rep Power
- 0
Similar Threads
-
JSF datatable with calendar component
By thilak in forum JavaServer Faces (JSF)Replies: 3Last Post: 06-25-2009, 07:53 AM -
How to delete a JLabel by using the keyboard 'delete' key?
By Suren in forum AWT / SwingReplies: 2Last Post: 04-20-2009, 08:00 AM -
Selection/highlight delete problem when editing
By bit in forum EclipseReplies: 1Last Post: 03-01-2009, 04:47 PM -
Row id in datatable
By nc_newie in forum JavaServer Faces (JSF)Replies: 0Last Post: 06-26-2008, 11:32 AM -
problem when I try to delete a file
By tommy in forum Advanced JavaReplies: 2Last Post: 07-31-2007, 02:44 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks