TheCoder4eu / BootsFaces-OSP

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

b:switch left label and <b:form horizontal="true" /> support #1169

Closed nando2301 closed 1 week ago

nando2301 commented 3 years ago

Problem: When I use this code to create page elements:

<b:form id="infoConf" horizontal="true">
    ...
    <ui:repeat var="conf" value="#{configBean.items}" varStatus="status">
        <b:inputText labelColLg="2" colLg="6"
                     labelColMd="2" colMd="6"
                     labelColSm="2" colSm="6"
                     label="#{conf.label}"
                     value="#{conf.value}" 
                     rendered="#{conf.type == 'text'}"/>
        <b:formGroup>
            <b:switch onColor="success"
                      offColor="default"
                      label="#{conf.label}"
                      value="#{conf.value}"
                      rendered="#{conf.type == 'boolean'}"/>
        </b:formGroup>
    </ui:repeat>
    ...
</b:form>

This is the result:

image

Version used:

        <dependency>
            <groupId>net.bootsfaces</groupId>
            <artifactId>bootsfaces</artifactId>
            <version>1.5.0</version>
            <scope>compile</scope>
        </dependency>

Expected result: image

I Think: Switch doesn't support horizontal forms (labelColXX and colXX attributes) and always its label is on top. The same case y I use separate label y looks like this using </b:formGroup>:

...
<b:formGroup>
    <h:outputLabel value="#{conf.label}"
                   rendered="#{conf.type == 'boolean'}"/>
    <b:switch onColor="success"
              offColor="default"
              value="#{conf.value}"
              rendered="#{conf.type == 'boolean'}"/>
</b:formGroup>
...

image

stephanrauh commented 1 week ago

I'm afraid development of BootsFaces has slowed down considerably. We'll never manage to address this issue. Let's close it.