Uploaded image for project: 'MyFaces Tobago'
  1. MyFaces Tobago
  2. TOBAGO-326

Submit in subform leads to validation of values outside of the subform

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.10
    • None
    • None
    • None

    Description

      This is an example to reproduce the bug:
      a tx:selectOneChoice inside a subform submits on every change. All entry fields outside of this subform should be ignored, but instead they are validated as well.

      <tc:tab id="details_contracts"
      label="#

      {label.adminRefdata_contracts_tabLabel}

      "
      rendered="#

      {controller.msAdminUser}

      ">

      <f:facet name="layout">
      <tc:gridLayout rows="fixed;" columns="710px;" />
      </f:facet>
      <tc:form>
      <tc:panel>
      <f:facet name="layout">
      <tc:gridLayout columns="350px;350px;" rows="fixed;" />
      </f:facet>
      <tc:box label="#

      {label.adminRefdata_contracts_haltBoxLabel}

      ">
      <f:facet name="layout">
      <tc:gridLayout columns="fixed;" rows="fixed;" border="0" />
      </f:facet>

      <tc:form> <-- subform start
      <tx:selectOneChoice value="#

      {contractHaltController.contractName}

      "
      label="#

      {label.adminRefdata_contracts_contract}

      ">
      <f:selectItems value="#

      {contractHaltController.contractItems}

      " />
      <f:facet name="change">
      <tc:command action="#

      {contractHaltController.reloadContract}

      "/>
      </f:facet>
      </tx:selectOneChoice>
      </tc:form> <-- subform end
      <tc:cell />

      <tc:selectOneRadio value="#

      {contractHaltController.contractModType}

      "
      disabled="#

      {contractHaltController.contract.inactive || marketHaltController.marketHalt}

      ">
      <f:selectItems
      value="#

      {contractHaltController.contractModTypeItems}

      " />
      </tc:selectOneRadio>

      <tc:cell />
      </tc:box>

      <tc:box label="#

      {label.adminRefdata_contracts_boxLabel}

      ">
      <f:facet name="layout">
      <tc:gridLayout columns="fixed;" rows="fixed;fixed;" border="0" />
      </f:facet>
      <tx:in disabled="#

      {!contractHaltController.contract.inactive}

      " <-- outside of form, but validated as well
      value="#

      {contractHaltController.contractTradeFrom}

      "
      label="#

      {label.adminRefdata_contracts_startTime}

      "
      converter="DateConverter" />
      <tc:cell />

      <tx:in value="#

      {contractHaltController.contractTradeUntil}

      " <-- outside of form, but validated as well
      label="#

      {label.adminRefdata_contracts_endTime}

      "
      converter="DateConverter" />
      <tc:cell />

      <tc:cell spanX="2" />

      </tc:box>
      <tc:cell />
      <tc:cell spanX="3" />

      </tc:panel>
      <tc:cell />

      <tc:panel>
      <f:facet name="layout">
      <tc:gridLayout columns=";100px;" rows="fixed;*" />
      </f:facet>
      <tc:cell />
      <tc:button label="#

      {label.adminRefdata_contracts_submitButton}

      ">
      <%-<tc:attribute name="renderedPartially" value="popup-modify-contract" />-%>
      <popup:confirmationPopup name="popup-modify-contract"
      text="#

      {label.adminRefdata_contracts_modifyContractPopup_text}

      "
      onConfirm="contractHaltController.submitContract"
      onCancel="contractHaltController.closeModifyContractPopup" />
      </tc:button>
      <tc:cell />
      <tc:cell spanX="3" />
      </tc:panel>
      <%-</tc:cell>-%>
      <tc:cell />
      </tc:form>
      </tc:tab>

      Attachments

        1. subform-bug.jpg
          61 kB
          Dennis Hauser

        Activity

          People

            Unassigned Unassigned
            hausden Dennis Hauser
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: