JSF pages - pressing a button first calls the constructor

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zeeshanks
    New Member
    • Dec 2007
    • 26

    JSF pages - pressing a button first calls the constructor

    Hello,
    I 'm making my first JSF page using jdeveloper. The problem i'm facing is that every time i press a button for which i have an action method, the constructor is called first. I only want the constructor to be called at the beginning of the application.

    Any help would be highly appreciated.
    Following is the jsf button code:

    Code:
      <h:commandButton value="Submit"
                             id="commandButton2"
                             action="#{backing_hello1.commandButton2_action}"/>
          </h:form></body>
  • Dököll
    Recognized Expert Top Contributor
    • Nov 2006
    • 2379

    #2
    What is the name of your constructor?

    Comment

    • JosAH
      Recognized Expert MVP
      • Mar 2007
      • 11453

      #3
      Originally posted by Dököll
      What is the name of your constructor?
      Riddle: for a class named X what would be the name of its constructor(s)?

      kind regards,

      Jos ;-)

      Comment

      • Dököll
        Recognized Expert Top Contributor
        • Nov 2006
        • 2379

        #4
        Originally posted by JosAH
        Riddle: for a class named X what would be the name of its constructor(s)?

        kind regards,

        Jos ;-)
        X to the third power:-)

        Comment

        Working...