Label for toggleSwitch

markusg80
Posts: 67
Joined: 21 Nov 2013, 17:11

11 Oct 2018, 11:25

Here a sample xhtml:

Code: Select all

<div class="ui-g ui-fluid form-group">
	<div class="ui-g-12 ui-lg-6">
		<h:panelGroup class="toggleswitch-box toggleswitch-box-border" rendered="#{not cc.attrs.editmode}">
			<p:outputLabel for="createexbox" value="#{intl.createexlabel}" />
			<p:toggleSwitch id="createexbox" value="#{cc.attrs.createexercise}" 
							/>
		</h:panelGroup>

	</div>
	<div class="ui-g-12 ui-lg-6">
		<span class="toggleswitch-box toggleswitch-box-border">
			<p:outputLabel for="" value="#{intl.holiday}" />
			<p:toggleSwitch id="holidaybox" value="#{cc.attrs.holidayvalue}" 
							/>
		</span>

	</div>
</div>
@aragorn: Maybe the solution from RueKow can be implemented to Primefaces toggleSwitch with onLabel and offLabel attribute!
PrimeFaces 6.2.8,Mojarra 2.3.0,Payara 5.182

User avatar
aragorn
Posts: 3286
Joined: 29 Jun 2013, 12:38

22 Oct 2018, 13:46

Thanks a lot for the update, @markusg80 ;) Unfortunately, we don't think of adding it to the core. Please see; viewtopic.php?p=169780#p169780

Best Regards,

Post Reply

Return to “Ultima - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest