2012-11-24 2 views
0

부모 양식이로되어 있고이 양식은 다섯 개의 양식에 다섯 개의 양식이 있습니다. 문제는 부모 양식을 제출할 때 부모 양식의 데이터가 제출 중이지만 모든 하위 양식이 서버에없는 것입니다. 부모 폼을 제출하면 모든 자식 폼이 무시됩니다. 내가 맞다면이 문제에 대한 해결책을 제안하십시오. 내가 jsf2.0를 사용하고 만났어 여러분 모두에게 매우 thankfull 수 3.4 부모 양식 제출하지만 하위 양식 제출 안 함


내 페이지에 몇 가지 문제가

하나 하나에 부모와 자녀 형성을 병합 한 후 primefaces. 난 내가 내 코드

<h:form id="mainForm"> 
    <h:panelGrid> 
    <p:accordionPanel activeIndex="#{salesLetterProBean.activeIndex}"> 
     <p:tab title="Product Introduction" id="productinfooTab"> 
      <p:panel header="Please Fill In The Details" style="padding:5px;" 
       id="productInfoPanel"> 
       <h:panelGrid cellpadding="1" cellspacing="0" columns="1" 
        columnClasses="a,b,c,d,e" rowClasses="plainRow,shadedRow"> 
        <h:outputLabel value="Introductory HeadLine:" class="field-title" 
         id="proInfoPanelGrid"/> 
        <p:inputTextarea value="#{salesLetterProBean.productIntroductoryLineRow.description}" 
         id="proIntroductorySentence" 
         style="width:1060px;height:400px;" effectDuration="400" /> 
       </h:panelGrid> 
       <p:dataTable var="productIntroSentenceList" first="1" 
        value="#{salesLetterProBean.productIntroductorySentenceList}" 
        paginator="true" rows="5" rowsPerPageTemplate="5,10,15,20,25" 
        rowIndexVar="rowIndex" rowKey="#{productIntroSentenceList.id}" 
        selection="#{salesLetterProBean.productIntroductoryLineRow}" 
        selectionMode="single" update="proIntroductorySentence"> 
        <p:ajax event="rowSelect" listener="#{salesLetterProBean.onRowSelect}" /> 
        <p:column headerText="#"> 
         <p:cellEditor> 
          <f:facet name="output"> 
           <h:outputText value="#{rowIndex}" /> 
          </f:facet> 
          <f:facet name="input"> 
           <p:inputText value="#{rowIndex}" /> 
          </f:facet> 
         </p:cellEditor> 
        </p:column> 
        <p:column headerText="Description"> 
         <p:cellEditor> 
          <f:facet name="output"> 
           <h:outputText value="#{productIntroSentenceList.description}" /> 
          </f:facet> 
          <f:facet name="input"> 
           <p:inputText value="#{productIntroSentenceList.description}" /> 
          </f:facet> 
         </p:cellEditor> 
        </p:column> 
        <p:column headerText="Select"> 
         <p:commandLink process="@none"> 
          <!-- --> 
          <span title="Select" class="ui-icon ui-icon-check"/> 
         </p:commandLink>   
        </p:column> 
       </p:dataTable> 
       <h:panelGrid cellpadding="1" cellspacing="0" columns="1" 
        columnClasses="a,b,c,d,e" rowClasses="plainRow,shadedRow"> 
        <h:outputLabel value="Feature List:" class="field-title" /> 
        <p:inputTextarea style="width:1060px;height:400px;" 
         effectDuration="400" id="featureList" 
         value="#{salesLetterProBean.featureList}"/> 
        <h:outputLabel value="How Your Product Solve The Problems :" 
         class="field-title" /> 
        <p:inputTextarea style="width:1060px;height:400px;" 
         effectDuration="400" id="prbSolutions" 
         value="#{salesLetterProBean.problemSolutions}" /> 
       </h:panelGrid> 
       <h:commandButton value="Previous" 
        actionListener="#{applicantManagedBean.changeActiveIndex}" 
        immediate="true" class="defaultButton" /> 
       <h:commandButton value=" Next " 
        actionListener="#{applicantManagedBean.changeActiveIndex}" 
        immediate="true" class="defaultButton" /> 
      </p:panel> 
     </p:tab> 
    </p:accordionPanel> 
    </h:panelGrid> 
</h:form> 

감사합니다 아래에 업데이트 이벤트에 잘못된 어딘지 행 선택에 <h:textarea> 나를 event.suggest 업데이트 할 수 없습니다.

+1

''을 중첩 할 수 없습니다. 6 개의 양식이 있고 동작이 1 개의 양식 (* 부모 * 1)에 대해서만 실행되고 있습니다. 이것이 바로 Web Apps의 작동 방식입니다. * 1 개 이상의 양식을 제출하려면 * 양식을 2 개 이상으로 나누지 않고 모든 양식을 하나의 양식으로 묶어야합니다. –

+0

안녕하세요, 답장을 보내 주셔서 감사합니다. 하지만 문제는 내가 나머지 양식을 삭제할 수 없다는 것입니다. 다른 양식에 대한 값을 얻을 수 있도록 jquery를 사용하는 방법이 있나요? 두 번째 폼에 입력 된 텍스트 사용자 이름이 있습니다. 나는 모든 나머지 폼을 포함하는 부모 폼을 제출하여 백킹 빈에이 값을 원한다. 왜냐하면 나는 지금 이것으로 붙어 있기 때문에 하나의 form.please 응답에 모든 데이터를 감쌀 수 없다. –

+0

당신이 필요로하는 것이면 (아주 ​​이상하다), 다른 하나의 모든 UIInput 컴포넌트에 대해 적어도 하나의 이 필요하다. 양식을 만들고 jquery 또는 다른 도구를 사용하여 모든 양식의 데이터를 모든 (많은 노력)에 전달하십시오. * 문제 *는 웹 응용 프로그램의 공통적 인 동작 결과이므로 다른 MVC 프레임 워크를 사용하여이 동작을 해결할 수 없습니다. 가장 좋은 방법은 모든 데이터를 래핑하는 단일 양식을 만드는 것입니다. 이 폼 안에 다른 액션/아약스 요청이 있다면'execute' 태그 속성을 사용하여 서버로 보낼 컴포넌트를 제한 할 수 있습니다. –

답변

0

중첩 된 양식은 허용되지 않지만 여러 양식을 스택으로 가질 수 있습니다.