【问题标题】:How to change jelly form layout?如何改变果冻形式的布局?
【发布时间】:2016-10-05 10:11:11
【问题描述】:

我正在开发 jenkin 插件。我使用以下果冻脚本创建了一个表单。

<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler"  xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson"  xmlns:f="/lib/form">
<f:section title="Catalyst Login">
    <f:entry title="Catalyst Url" field="catUrl">
        <f:textbox />
    </f:entry>
    <f:entry title="Username" field="catUser">
        <f:textbox />
    </f:entry>
    <f:entry title="Password" field="catPass">
        <f:textbox />
    </f:entry>
    <f:validateButton
        title="${%Test Connection}" progress="${%Testing...}"
        method="testConnection" with="catUrl,catUser,catPass" />
</f:section>
</j:jelly>

这是多行一列的布局。我的意思是一行中只显示一个输入框。 一行可以有两个输入框吗?

【问题讨论】:

    标签: java jenkins jenkins-plugins jelly


    【解决方案1】:

    尝试使用table,您可以在其中操作行数和列数。

    例子:

    <?jelly escape-by-default='true'?>
    <j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler"  xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson"  xmlns:f="/lib/form">
    <f:section title="Catalyst Login">
        <table> 
            <tr>
                <td>
                    <f:entry title="Username" field="catUser">
                        <f:textbox />
                    </f:entry>
                </td>
                <td>
                    <f:entry title="Password" field="catPass">
                        <f:textbox />
                    </f:entry>
                </td>
            </tr>
        </table>
        <f:validateButton
            title="${%Test Connection}" progress="${%Testing...}"
            method="testConnection" with="catUrl,catUser,catPass" />
    </f:section>
    </j:jelly>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-02-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多