Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <h:form>
- <h:dataTable value="#{commingMaanagedBean.dmbrb}" var="o" binding="#{table}">
- <h:column>
- <h:inputText value="#{amountUpdatingManagedBean.list[table.rowIndex]}" disabled="#{o.dvariable}"/>
- </h:column>
- </h:dataTable>
- <h:commandButton value="UPDATE" action="#{amountUpdatingManagedBean.clearamount}" />
- </h:form>
- @ManagedBean
- @RequestScoped
- public class AmountUpdatingManagedBean {
- private String username;
- private List<String> list;
- public String getUsername() {
- return username;
- }
- public List<String> getList() {
- return list;
- }
- public void setList(List<String> list) {
- this.list = list;
- }
- public void setUsername(String username) {
- this.username = username;
- }
- public String clearamount(){
- if(list.isEmpty()){
- System.out.println("the list is empty ");
- }
- else {
- System.out.println("the list is pragent");
- }
- return null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement