문제

문서를 생성하고 반복 제어를 새로 고치는 XPage에 버튼이 있습니다.반복 제어가 테이블 (IMG1) 상단에 새로 추가 된 문서를 보여주는 것을 제외하고는 모두가 잘 작동합니다.

그러나 XPage를 다시 새로 고치면 반복 제어가 테이블을 올바르게 렌더링합니다 (IMG2)

코드

<xp:panel>
  <xp:table style="width:100.0%">
    <xp:tr>
      <xp:td style="font-weight:bold">
        Hardware
      </xp:td>
      <xp:td style="font-weight:bold">
        Quantity
      </xp:td>
      <xp:td style="font-weight:bold">
        Asset Tag No
      </xp:td>
      <xp:td style="font-weight:bold">
        Previous User
      </xp:td>
      <xp:td>
      </xp:td>
    </xp:tr>
    <xp:repeat id="rpHardware" rows="30" var="clHardwares">
      <xp:this.value>
        <![CDATA[#{javascript:var docMain:NotesDocument = compositeData.docOnboarding.getDocument();
var vwApp:NotesView = database.getView("lkupHardwaresByParentID");
vwApp.getAllDocumentsByKey(docMain.getUniversalID(),true)}]]>
      </xp:this.value>
      <xp:tr>
        <xp:td>
          <xp:text escape="true" id="cfHWName">
            <xp:this.value>
              <![CDATA[#{javascript:clHardwares.getItemValueString("REQ_HW_Name")}]]>
            </xp:this.value>
          </xp:text>
        </xp:td>
        <xp:td>
          <xp:text escape="true" id="cfHWQuantity">
            <xp:this.value>
              <![CDATA[#{javascript:clHardwares.getItemValueString("REQ_HW_Quantity")}]]>
            </xp:this.value>
          </xp:text>
        </xp:td>
        <xp:td>
          <xp:text escape="true" id="cfHWAssetTagNo">
            <xp:this.value>
              <![CDATA[#{javascript:clHardwares.getItemValueString("REQ_HW_AssetTagNo")}]]>
            </xp:this.value>
          </xp:text>
        </xp:td>
        <xp:td>
          <xp:text escape="true" id="cfHWPreviousUser">
            <xp:this.value>
              <![CDATA[#{javascript:clHardwares.getItemValueString("REQ_HW_PreviousUser")}]]>
            </xp:this.value>
          </xp:text>
        </xp:td>

        <xp:td>
          <xp:link escape="true" text="Edit" id="link4">
            <xp:eventHandler event="onclick"
            submit="true" refreshMode="complete">
              <xp:this.action>
                <![CDATA[#{javascript:viewScope.put("selHardware",clHardwares.getNoteID());
getComponent("dlgAddHardware").show();}]]>
              </xp:this.action>

            </xp:eventHandler>
          </xp:link>
          <xp:link escape="true" id="link5" text="Delete">
          </xp:link>
        </xp:td>
      </xp:tr>
    </xp:repeat>
  </xp:table>
</xp:panel>
.

img1

img2

도움이 되었습니까?

해결책

반복의 "Removevereat"속성을 true로 설정하려고 시도 했습니까?이것은 컨트롤의 작업이 완료된 후 반복에서 생성 된 원하지 않는 DIV 컨트롤을 제거합니다.

(반복 >> 모든 속성 >> 기본 정보)

편집 :

해당 속성이 true로 설정된 경우 버튼이 반복 자체에서 부분 새로 고침을 수행 할 수 없다는 것을 언급하는 것을 잊었습니다.대신 주변 테이블이나 조건을 수행하는 데 사용할 수있는 자체 ID

다른 팁

새 문서를 생성 한 후보기를 새로 고치 었습니까?

database.getView ( "viewName"). 새로 고침 ();

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top