Advertisement
Guest User

Untitled

a guest
Apr 16th, 2014
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. <h:form>
  2. <h:dataTable value="#{commingMaanagedBean.dmbrb}" var="o" binding="#{table}">
  3.  
  4.  
  5. <h:column>
  6. <h:inputText value="#{amountUpdatingManagedBean.list[table.rowIndex]}" disabled="#{o.dvariable}"/>
  7.  
  8. </h:column>
  9. </h:dataTable>
  10. <h:commandButton value="UPDATE" action="#{amountUpdatingManagedBean.clearamount}" />
  11.  
  12. </h:form>
  13.  
  14. @ManagedBean
  15. @RequestScoped
  16. public class AmountUpdatingManagedBean {
  17.  
  18. private String username;
  19. private List<String> list;
  20.  
  21.  
  22.  
  23. public String getUsername() {
  24. return username;
  25. }
  26.  
  27. public List<String> getList() {
  28. return list;
  29. }
  30.  
  31. public void setList(List<String> list) {
  32. this.list = list;
  33. }
  34.  
  35. public void setUsername(String username) {
  36. this.username = username;
  37. }
  38. public String clearamount(){
  39.  
  40. if(list.isEmpty()){
  41. System.out.println("the list is empty ");
  42. }
  43. else {
  44. System.out.println("the list is pragent");
  45.  
  46. }
  47. return null;
  48. }
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement