TheCoder4eu / BootsFaces-OSP

BootsFaces - Open Source Project
Apache License 2.0
246 stars 102 forks source link

`disabled` does not prevent a page load after clicking `<b:commandButton` #142

Closed ahofmeister closed 9 years ago

ahofmeister commented 9 years ago

Working example to reproduce:

<h:form>
    <b:inputText value="#{bean.txt}"/>
    <b:commandButton value="Invoke me!" update="@form" disabled="true"
            action="#{bean.message}" />
 </h:form>
    javax.enterprise.inject.Model; // or whatever Annotation you use
    public class Bean {

    String txt;

    public void message() {
        System.out.println("a");
    }

    @PostConstruct
    public void invoke() {
        System.out.println("PC");
    }

    public String getTxt() {
        return txt;
    }

    public void setTxt(String txt) {
        this.txt = txt;
    }

    }

You will notice, the @PostCunstruct will get called after a click on the <b:commandButton>.

stephanrauh commented 9 years ago

Successfully tested (http://www.bootsfaces.net/BootsFacesWeb/forms/commandButton.jsf).

ahofmeister commented 9 years ago

I just looked up (randomly) this page and it was fixed. It just came to my mind, that it was my fault or this isn't a bug. Well, apparently you fixed it quickly. Thank you.

stephanrauh commented 9 years ago

Well, I didn't publish the version yet :). I hope to find some spare time in the next couple of days to upload a snapshot version to Maven Central. Recently, we started quite a few changes, so I'm reluctant to publish an official version without testing thoroughly.

ahofmeister commented 9 years ago

If you need someone to test those, give me a shot. I have not much time, but I have more than you, I bet. :)

stephanrauh commented 9 years ago

@AlexanderBl4h Great, thanks! I'll come back to this.