0

I debutante in jsf and I wanted to show in a textbox the reference of the client must display and augmeneter implicitly.

Here is the code I've done

private int number;

    public int getNumber() {
        return number;
    }
    public void setNumber(int number) {
        this.number = number;
    }
    public void increment() {
        number++;
    }

et voici my view :

 <h:outputLabel value="N Ticket : "
                    style="font-size:15px; font-family:verdana;" />
                <p:inputText value="#{ticketBean.increment}" />

this code it not works, I wanted to know how I can call my function in my view

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
user3850191
  • 29
  • 1
  • 6

1 Answers1

1

You can't assign 'void' as value. If you want to increment on clicking a button, then check this answer

Community
  • 1
  • 1
Bozho
  • 588,226
  • 146
  • 1,060
  • 1,140