简体   繁体   English

不带标签的JSF Trinidad SelectBooleanCheckbox

[英]JSF Trinidad SelectBooleanCheckbox with out Label

Using Trinidad selectBooleanCheckbox Component as following: 使用Trinidad selectBooleanCheckbox组件,如下所示:

<tr:selectBooleanCheckbox text="FIRST" id="firstType" value="#{bean.type}"/>

The render html is : 渲染html是:

<tr>
<td>
    <table cellspacing="0" cellpadding="0" border="0" summary=""
        style="padding: 0px" class="af_selectBooleanCheckbox"
        id="idtable">
        <tbody>
            <tr>
                <td nowrap="" class="af_selectBooleanCheckbox_label"><span
                    style="display: none;" id="firstType::icon"><a
                        class="AFErrorIconStyle" title="Error"
                        name="_msgAnc_firstType">X</a>
                </span>
                </td>

<td valign="top" nowrap="" class="AFContentCell">
                    <span id="firstType__xc_c"
                    class="af_selectBooleanCheckbox_content"><input
                        type="checkbox" checked="" value="t" name="first"
                        id="firstType"><label for="firstType">FIRST</label>
                </span>
                </td>
            </tr>

<tr>
                <td></td>

                <td class="AFComponentMessageCell">
                    <span style="margin-left: 21px; padding: 0px"
                    class="OraInlineErrorText" id="first::msg"></span>
                </td>
            </tr>
        </tbody>
    </table>
</td>

My Question is : 我的问题是:

I'm not using the label , instead I'm using text property(since I want to render the checkbox first and then the text- when I'm using the label the label shows before the checkbox) 我不使用label,而是使用text属性(因为我想先呈现复选框,然后呈现文本-当我使用标签时,标签显示在复选框之前)

So what I want is the html that is render will not render the section of the label at all because it take some place that I can't remove.. 所以我要的是呈现的html根本不会呈现标签的部分,因为它占据了我无法删除的位置。

Please assist. 请协助。

I found the solution to my problem 我找到了解决我问题的方法

I just added the attribute simple="true" which removed the message and label from the html according the Trinidad API for selectBooleanCheckbox . 我只是添加了属性simple="true" ,该属性根据selectBooleanCheckbox API for selectBooleanCheckbox从html中删除了消息和标签。

the new Code: 新代码:

<tr:selectBooleanCheckbox text="FIRST" id="firstType" value="#{bean.type}" simple="true"/>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM