Event fires twice. What did i mess up?

UI Components for JSF
Post Reply
webinspired
Posts: 5
Joined: 25 Mar 2011, 00:37

26 Oct 2011, 05:19

not sure why this is happening. Any insight would be greatly appreciated. I am new to prime faces, i apologize if this is a silly question.

Code: Select all

        <h:form>
            <h:commandButton id="change" action="#{testView.changeValue}" value="change"/>              
        </h:form>
        
        <p:panel id="foopanel" rendered="#{testView.showIt}" header="test her" style="width:300px;height:150px; margin-left: 300px; ">
            <h:outputText value="click" />
            <p:effect type="blind" event="load">                 
                 <f:param name="mode" value="'show'" />  
            </p:effect>  
        </p:panel>
my bean looks like

Code: Select all

package view;

import java.io.Serializable;

import javax.enterprise.context.SessionScoped;
import javax.inject.Named;


@SessionScoped
@Named
public class TestView implements Serializable{
    private boolean showIt = false;
    private String testMessage = "OK";
    
    public void changeValue(){
        this.setShowIt(true);
    }

    public boolean isShowIt() {
        return showIt;
    }

    public void setShowIt(boolean showIt) {
        this.showIt = showIt;
    }

    public String getTestMessage() {
        return testMessage;
    }

    public void setTestMessage(String testMessage) {
        this.testMessage = testMessage;
    }    
}

webinspired
Posts: 5
Joined: 25 Mar 2011, 00:37

26 Oct 2011, 20:59

This is maddening. Is it a know bug? Or am i derping the code?

webinspired
Posts: 5
Joined: 25 Mar 2011, 00:37

26 Oct 2011, 21:46

it only does this when the effect is triggered on "load"

if its a click event it works fine

webinspired
Posts: 5
Joined: 25 Mar 2011, 00:37

29 Oct 2011, 01:30

every effect i try (not fired from a click) fires twice...

Anyone have any ideas?

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 19 guests