Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-18556

Define tags for widget label and form display

    XMLWordPrintable

    Details

      Description

      For scaffolding features, it would be nicer to use tags than including templates for the following use cases:

      1. displaying a widget label, currently like this:

      <ui:include src="/widgets/incl/label_template.xhtml">
        <ui:param name="label" value="#{nxu:test(empty widgetLabel, defaultLabel, widgetLabel)}" />
        <ui:param name="helpLabel" value="#{widgetHelpLabel}" />
        <ui:param name="translated" value="#{widget.translated}" />
        <ui:param name="required" value="#{widget.required}" />
        <ui:param name="labelStyleClass" value="bold" />
      </ui:include>
      

      Would be nicer to have:

      <nxu:label
        value="#{nxu:test(empty widgetLabel, defaultLabel, widgetLabel)}"
        help="#{widgetHelpLabel}"
        translated="#{widget.translated}"
        required="#{widget.required}" />
      </ui:include>
      

      2. surround an element with a form, currently like this:

      <ui:decorate template="/widgets/incl/form_template.xhtml">
        <ui:param name="addForm" value="#{widgetControl_requireSurroundingForm}" />
        <ui:param name="formId" value="#{widget.id}_form" />
        <ui:param name="useAjaxForm" value="#{widgetControl_useAjaxForm}" />
        <ui:param name="disableMultipartForm" value="#{widgetControl_disableMultipartForm}" />
        <ui:param name="disableDoubleClickShield" value="#{widgetControl_disableDoubleClickShield}" />
        <ui:define name="form_template_content">
          <nxl:widget widget="#{widget}" value="#{value}" />
        </ui:define>
      </ui:decorate>
      

      Would be nicer to have:

      <nxu:form
        enabled="#{widgetControl_requireSurroundingForm}"
        id="#{widget.id}_form"
        useAjax="#{widgetControl_useAjaxForm}"
        disableMultipart="#{widgetControl_disableMultipartForm}"
        disableDoubleClickShield="#{widgetControl_disableDoubleClickShield}">
        <ui:define name="form_template_content">
          <nxl:widget widget="#{widget}" value="#{value}" />
        </ui:define>
      </nxu:form>
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                atchertchian Anahide Tchertchian
                Reporter:
                atchertchian Anahide Tchertchian
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: