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,040,783
  • 362
  • 3,548
  • 3,513
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
  • 572,413
  • 138
  • 1,043
  • 1,132