Custom theme swatch per button

UI Components for JSF
Post Reply
jdeviney
Posts: 37
Joined: 24 Jul 2013, 18:12

01 Oct 2014, 00:13

This used to work under pf mobile 1.0 ...

Code: Select all

                           <p:commandButton 
                               value="Activate" 
                               rendered="#{!userSearchMobileBean.selectedUser.active}"  
                               ajax="true"  
                               update="userOptionsPanel,:userDetailPage:userDetailForm:userInfoPanel" 
                               action="#{userSearchMobileBean.activateUser()}" 
                               inline="false">
                               <f:attribute name="swatch" value="b"/>
                           </p:commandButton>
That no longer works under pf 5.0.8. In the showcase I see one example that overrides the button style class like the following ...

Code: Select all

                           <p:commandButton 
                               value="Activate" 
                               styleClass="ui-btn-b"
                               rendered="#{!userSearchMobileBean.selectedUser.active}"  
                               ajax="true"  
                               update="userOptionsPanel,:userDetailPage:userDetailForm:userInfoPanel" 
                               action="#{userSearchMobileBean.activateUser()}" 
                               inline="false">
                           </p:commandButton>
That doesn't function like the old swatch attribute. The color is washed out and that is only one of many styles defined per swatch. I also tried using a pass through attribute ... and that doesn't work either.

Code: Select all

                            <p:commandButton 
                               pt:data-theme="b"
                               value="Activate" 
                               rendered="#{!userSearchMobileBean.selectedUser.active}"  
                               ajax="true"  
                               update="userOptionsPanel,:userDetailPage:userDetailForm:userInfoPanel" 
                               action="#{userSearchMobileBean.activateUser()}" 
                               inline="false">
                           </p:commandButton>
Any ideas?
Java 1.7.0_45
NetBeans 8.0
GlassFish Server Open Source Edition 3.1.2.2 (build 5)
Mojarra 2.1.6 (SNAPSHOT 20111206)
PrimeFaces 5.0.8
PrimeFaces Extensions 2.1.0

jdeviney
Posts: 37
Joined: 24 Jul 2013, 18:12

01 Oct 2014, 18:17

Apparently the washed out color was a side effect of running inside Firefox OS Simulator. The color looks correct in a normal web browser and on iOS.
Java 1.7.0_45
NetBeans 8.0
GlassFish Server Open Source Edition 3.1.2.2 (build 5)
Mojarra 2.1.6 (SNAPSHOT 20111206)
PrimeFaces 5.0.8
PrimeFaces Extensions 2.1.0

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: Bing [Bot], Google [Bot] and 43 guests