从每个检索输入文本值

时间:2014-01-15 03:54:53

标签: oracle-adf

我在Jdeveloper 11.1.7工作,我创建了一个表单。 还有一个添加和删除链接。 点击添加,我为每个标签复制表格,点击删除我减少表格数量。

复制表单后,我必须将所有数据保存到数据库中。 我无法从所有字段中获取值。 我无法绑定在运行时添加的字段。

这是页面源代码:

<af:panelFormLayout id="Mediclassic_Policy_Individual"
                          inlineStyle="width:1029px;">
        <af:outputText value="Mediclassic Policy Individual====>#{sessionScope.prodId==1}"
                       id="ot12"
                       inlineStyle="font-weight:bold; color:black; font-size:20.0px;"
                       rendered="false"/>
        <af:spacer width="10" height="10" id="s4"/>
        <af:separator id="separator1"
                      inlineStyle="color:black; font-weight:bold;"/>
        <af:outputText value="Plan Details" id="outputText1"
                       inlineStyle="color:rgb(8, 160, 205); font-weight:bold; font-size:14px;"/>
        <af:separator id="separator2" inlineStyle="color:black;"/>
        <af:panelGroupLayout id="pgl3" layout="vertical"
                             inlineStyle="width:366px;">
          <af:outputText value="Plan Details &amp; Premium Calculation "
                         id="outputText2"
                         inlineStyle="font-weight:bold; color:black;"/>
          <af:spacer width="10" height="10" id="s3"/>
          <af:outputText value="This section contains policy specific details "
                         id="ot3" inlineStyle="color:black;"/>
        </af:panelGroupLayout>
        <af:panelBox id="panelBox2"
                     inlineStyle="width:315px; height:163px; border-color:#c4f2fc; border-style:solid; border-width:thin;"
                     text="   " showHeader="never">
          <af:panelGroupLayout id="pgl15"
                               inlineStyle="height:149px; background:#c4f2fc none repeat scroll 0% 0%; width:301px;"
                               layout="vertical" valign="middle">
            <af:spacer width="10" height="10" id="s57"/>
            <af:panelGroupLayout id="pgl33" layout="horizontal"
                                 inlineStyle="width:269px;">
              <af:spacer width="26" height="10" id="spacer208"/>
              <af:outputText value="Policy Period" id="outputText230"
                             inlineStyle="font-size:12px; font-weight:bold; color:black;"/>
              <af:selectOneChoice label="Policy Period(Years)" id="soc4"
                                  contentStyle="width:130px;height:20px;"
                                  value="1" autoSubmit="true" simple="true">
                <af:selectItem label="1" value="1" id="si12"/>
                <af:selectItem label="2" value="2" id="si11"/>
              </af:selectOneChoice>
            </af:panelGroupLayout>
            <af:spacer width="10" height="10" id="s58"/>
            <af:panelGroupLayout id="pgl13" layout="horizontal"
                                 inlineStyle="width:280px;">
              <af:spacer width="40" height="10" id="s56"/>
              <af:outputText value="Start Date" id="ot13"
                             inlineStyle="font-size:12px; font-weight:bold; color:black;"/>
              <af:inputDate label="Start Date               "
                            id="inputText8"
                            contentStyle="width:120px;height:20px;"
                            minValue="2014-01-06" autoSubmit="true"
                            simple="true"/>
            </af:panelGroupLayout>
            <af:spacer width="10" height="10" id="spacer209"/>
            <af:panelGroupLayout id="pgl14" layout="horizontal">
              <af:spacer width="50" height="10" id="spacer207"/>
              <af:outputText value="End Date" id="outputText229"
                             inlineStyle="font-size:12px; font-weight:bold; color:black;"/>
              <af:spacer width="10" height="10" id="spacer210"/>
              <af:inputDate label="End Date                 "
                            id="inputText12"
                            contentStyle="width:120px;height:20px;"
                            disabled="true" simple="true"/>
            </af:panelGroupLayout>
          </af:panelGroupLayout>
        </af:panelBox>
        <af:spacer width="10" height="10" id="s20"/>
        <af:separator id="separator7" inlineStyle="color:black;"/>
        <af:panelGroupLayout id="pgl11" layout="horizontal"
                             inlineStyle="width:913px;">
          <af:outputText value="Insured Details" id="outputText18"
                         inlineStyle="color:rgb(8, 160, 205); font-weight:bold; font-size:14px;"/>
          <af:spacer width="586" height="10" id="s21"/>
          <af:commandLink id="commandLink1">
            <af:image source="/images/addinsured.jpg"
                      shortDesc="Add Insured Details" id="image1"/>
          </af:commandLink>
          <af:commandLink id="cl1">
            <af:image source="/images/delete.jpg" shortDesc="Delete Insured"
                      id="i1"/>
          </af:commandLink>
        </af:panelGroupLayout>
        <af:separator id="separator8" inlineStyle="color:black;"/>
        <af:forEach begin="1" end="2">
          <af:panelGroupLayout id="pgl9" layout="horizontal"
                               inlineStyle="width:953px; height:539px; border-color:#c4f2fc; border-style:solid; border-width:thin;">
            <af:spacer width="11" height="10" id="s11"/>
            <af:panelGridLayout id="pgl4"
                                inlineStyle="background-color:#c4f2fc; width:500px; border-color:white; border-style:solid; border-width:2px;">
              <af:gridRow marginTop="5px" height="20px" id="gr1">
                <af:gridCell marginStart="1px" width="150px" id="gc4"
                             halign="center">
                  <af:outputText value="Name" id="ot4"
                                 inlineStyle="color:black; font-weight:bold;"/>
                </af:gridCell>
                <af:gridCell marginStart="1px" width="70px" id="gc16"
                             halign="center">
                  <af:outputText value="Gender" id="outputText3"
                                 inlineStyle="color:black; font-weight:bold;"/>
                </af:gridCell>
                <af:gridCell marginStart="1px" width="100px" id="gc9"
                             halign="center">
                  <af:panelGroupLayout id="pgl8" layout="vertical">
                    <af:outputText value="Relationship to" id="outputText4"
                                   noWrap="true"
                                   inlineStyle="color:black; font-weight:bold;"/>
                    <af:outputText value="Proposer" id="outputText16"
                                   noWrap="true"
                                   inlineStyle="color:black; font-weight:bold;"/>
                  </af:panelGroupLayout>
                </af:gridCell>
                <af:gridCell marginStart="1px" width="90px" id="gc7"
                             halign="center">
                  <af:outputText value="Date of Birth" id="outputText5"
                                 inlineStyle="color:black; font-weight:bold;"/>
                </af:gridCell>
                <af:gridCell marginStart="1px" width="80px" id="gc14"
                             halign="center">
                  <af:outputText value="Occupation" id="outputText6"
                                 inlineStyle="color:black; font-weight:bold;"/>
                </af:gridCell>
                <af:gridCell marginStart="1px" width="170px" id="gc11"
                             halign="center">
                  <af:outputText value="Pre existing illness"
                                 id="outputText7"
                                 inlineStyle="color:black; font-weight:bold;"/>
                </af:gridCell>
                <af:gridCell marginStart="1px" width="140px" id="gc13"
                             halign="center">
                  <af:outputText value="Sum Insured" id="outputText8"
                                 inlineStyle="color:black; font-weight:bold;"/>
                </af:gridCell>
                <af:gridCell marginStart="1px" marginEnd="1px" width="40px"
                             id="gc15">
                  <af:outputText value="Hospital Cash" id="outputText9"
                                 inlineStyle="color:black; font-weight:bold;"/>
                </af:gridCell>
              </af:gridRow>
              <af:gridRow marginTop="2px" marginBottom="2px" height="500px"
                          id="gr2">
                <af:gridCell marginStart="1px" width="100px" id="gc6">
                  <af:spacer width="10" height="130" id="spacer2"/>
                  <af:inputText id="it3" contentStyle="width:90px;"
                                label="  "/>
                </af:gridCell>
                <af:gridCell marginStart="1px" width="70px" id="gc1"
                             halign="center">
                  <af:spacer width="10" height="130" id="s5"/>
                  <af:selectOneChoice id="soc2" label=" ">
                    <af:selectItem label="Male" value="m" id="si3"/>
                    <af:selectItem label="Female" value="f" id="si2"/>
                  </af:selectOneChoice>
                </af:gridCell>
                <af:gridCell marginStart="1px" width="90px" id="gc2">
                  <af:spacer width="10" height="130" id="spacer1"/>
                  <af:selectOneChoice id="selectOneChoice2" label=" "
                                      contentStyle="width:80px;">
                    <f:selectItems id="selectItems5"/>
                  </af:selectOneChoice>
                </af:gridCell>
                <af:gridCell marginStart="1px" width="130px" id="gc10">
                  <af:spacer width="10" height="130" id="spacer3"/>
                  <af:inputDate id="id1" contentStyle="width:90px;"
                                label=" "/>
                </af:gridCell>
                <af:gridCell marginStart="1px" width="120px" id="gc8"
                             halign="start">
                  <af:spacer width="10" height="130" id="spacer4"/>
                  <af:selectOneChoice id="soc3" contentStyle="width:100px;"
                                      label="  ">
                    <f:selectItems id="si6"/>
                  </af:selectOneChoice>
                </af:gridCell>
                <af:gridCell marginStart="1px" width="140px" id="gc3"
                             halign="center">
                  <af:panelGroupLayout id="pgl5" layout="vertical"
                                       inlineStyle="width:144px;"
                                       halign="center">
                    <af:inputText label="Label 4" id="it4" simple="true"
                                  columns="15"/>
                    <af:spacer width="10" height="30" id="s7"/>
                    <af:panelGroupLayout id="pgl6"
                                         inlineStyle="width:133px; background-color:white;"
                                         layout="vertical">
                      <af:panelGroupLayout id="pgl7" layout="horizontal">
                        <af:spacer width="10" height="10" id="s6"/>
                        <af:outputText value="Specific Illness" id="ot5"
                                       inlineStyle="font-weight:bold; color:#c4f2fc;"/>
                      </af:panelGroupLayout>
                      <af:outputText value="Cancer :" id="ot6"
                                     inlineStyle="color:black; font-weight:bold;"/>
                      <af:spacer width="10" height="05" id="s16"/>
                      <af:selectOneRadio id="sor1" layout="horizontal"
                                         contentStyle="font-weight:bold"
                                         label=" ">
                        <af:selectItem label="Yes" value="1" id="si4"/>
                        <af:selectItem label="No" value="0" id="si5"/>
                      </af:selectOneRadio>
                      <af:separator id="s8" inlineStyle="color:black;"/>
                      <af:outputText value="Chronic Kidney"
                                     id="outputText17"
                                     inlineStyle="color:black; font-weight:bold;"/>
                      <af:outputText value="Dieseases :" id="ot7"
                                     inlineStyle="color:black; font-weight:bold;"/>
                      <af:spacer width="10" height="05" id="s15"/>
                      <af:selectOneRadio id="selectOneRadio1"
                                         layout="horizontal"
                                         contentStyle="font-weight:bold"
                                         label=" ">
                        <af:selectItem label="Yes" value="1"
                                       id="selectItem10"/>
                        <af:selectItem label="No" value="0"
                                       id="selectItem11"/>
                      </af:selectOneRadio>
                      <af:separator id="separator3"
                                    inlineStyle="color:black;"/>
                      <af:spacer width="10" height="10" id="s9"/>
                      <af:outputText value="Heart Dieseases :" id="ot8"
                                     inlineStyle="color:black; font-weight:bold;"/>
                      <af:spacer width="10" height="05" id="s14"/>
                      <af:selectOneRadio id="selectOneRadio2"
                                         layout="horizontal"
                                         contentStyle="font-weight:bold"
                                         label=" ">
                        <af:selectItem label="Yes" value="1"
                                       id="selectItem12"/>
                        <af:selectItem label="No" value="0"
                                       id="selectItem13"/>
                      </af:selectOneRadio>
                      <af:separator id="separator4"
                                    inlineStyle="color:black;"/>
                      <af:spacer width="10" height="10" id="s10"/>
                      <af:outputText value="Phychiatric Disorders :"
                                     id="ot9"
                                     inlineStyle="color:black; font-weight:bold;"/>
                      <af:spacer width="10" height="05" id="s13"/>
                      <af:selectOneRadio id="selectOneRadio3"
                                         layout="horizontal"
                                         contentStyle="font-weight:bold"
                                         label=" ">
                        <af:selectItem label="Yes" value="1"
                                       id="selectItem14"/>
                        <af:selectItem label="No" value="0"
                                       id="selectItem15"/>
                      </af:selectOneRadio>
                      <af:separator id="separator5"
                                    inlineStyle="color:black;"/>
                      <af:spacer width="10" height="10" id="s12"/>
                      <af:outputText value="Have you been taking" id="ot10"
                                     noWrap="true"
                                     inlineStyle="color:black; font-weight:bold;"
                                     truncateAt="20"/>
                      <af:outputText value="drugs/Medicines "
                                     id="outputText10" noWrap="true"
                                     inlineStyle="color:black; font-weight:bold;"
                                     truncateAt="20"/>
                      <af:outputText value="regularly during the"
                                     id="outputText11" noWrap="true"
                                     inlineStyle="color:black; font-weight:bold;"
                                     truncateAt="20"/>
                      <af:outputText value="last 1 year for any"
                                     id="outputText12" noWrap="true"
                                     inlineStyle="color:black; font-weight:bold;"
                                     truncateAt="20"/>
                      <af:outputText value="disease/illness (other "
                                     id="outputText13" noWrap="true"
                                     inlineStyle="color:black; font-weight:bold;"
                                     truncateAt="20"/>
                      <af:outputText value="than Hypertension / "
                                     id="outputText14" noWrap="true"
                                     inlineStyle="color:black; font-weight:bold;"
                                     truncateAt="20"/>
                      <af:outputText value="Diabetes/Hypothyroidism) :"
                                     id="outputText15" noWrap="true"
                                     inlineStyle="color:black; font-weight:bold;"
                                     truncateAt="20"/>
                      <af:spacer width="10" height="05" id="s17"/>
                      <af:selectOneRadio id="selectOneRadio4"
                                         layout="horizontal"
                                         contentStyle="font-weight:bold"
                                         label=" ">
                        <af:selectItem label="Yes" value="1"
                                       id="selectItem16"/>
                        <af:selectItem label="No" value="0"
                                       id="selectItem17"/>
                      </af:selectOneRadio>
                      <af:separator id="separator6"
                                    inlineStyle="color:black;"/>
                    </af:panelGroupLayout>
                  </af:panelGroupLayout>
                </af:gridCell>
                <af:gridCell marginStart="1px" width="1px" id="gc5"
                             halign="center">
                  <af:spacer width="10" height="130" id="spacer5"/>
                  <af:selectOneChoice id="selectOneChoice37"
                                      contentStyle="width:100px;"
                                      label="  ">
                    <f:selectItems id="selectItems4"/>
                  </af:selectOneChoice>
                </af:gridCell>
                <af:gridCell marginStart="1px" marginEnd="1px" width="40px"
                             id="gc12">
                  <af:spacer width="10" height="130" id="spacer6"/>
                  <af:selectBooleanCheckbox id="sbc1" label=" "/>
                </af:gridCell>
              </af:gridRow>
            </af:panelGridLayout>
          </af:panelGroupLayout>
        </af:forEach>
        <af:spacer width="10" height="10" id="s23"/>
        <af:separator id="s22" inlineStyle="height:0.5px; color:gray;"/>
        <af:panelGroupLayout id="panelGroupLayout45"
                             inlineStyle="width:929px; background-color:#c4f2fc;"
                             rendered="false">
          <af:panelGroupLayout id="panelGroupLayout46" layout="horizontal">
            <af:outputText value="Social Status :" id="outputText62"
                           inlineStyle="font-weight:bold; color:black;"/>
            <af:selectOneRadio id="selectOneRadio25" layout="horizontal"
                               contentStyle="font-weight:bold" value="N"
                               autoSubmit="true" label=" ">
              <af:selectItem label="Yes" value="Y" id="selectItem69"/>
              <af:selectItem label="No" value="N" id="selectItem70"/>
            </af:selectOneRadio>
            <af:popup id="popup2">
              <af:dialog id="dialog2" type="none" title=" ">
                <af:panelGroupLayout id="panelGroupLayout47"
                                     layout="horizontal"
                                     inlineStyle="width:321px; height:31px;">
                  <af:outputText value="For more details on how to categorize the policy, Please click"
                                 id="outputText63"/>
                  <af:goLink text="here" id="goLink2" targetFrame="_blank"
                             destination="http://retail.starhealth.in/assets/pdf/SocailStatusExplanation.xls"/>
                </af:panelGroupLayout>
              </af:dialog>
            </af:popup>
          </af:panelGroupLayout>
          <af:outputText value='Please choose "Yes" in case of BPL families, Disabled Persons etc, Persons working in UnOrganized/Informal Sectors ( '
                         id="outputText64"
                         inlineStyle="font-weight:bold; color:black;"/>
          <af:outputText value="? )" id="outputText65"
                         inlineStyle="font-weight:bold;">
            <af:showPopupBehavior popupId="popup2" triggerType="mouseOver"
                                  align="beforeEnd"/>
          </af:outputText>
          <af:panelList id="panelList2" partialTriggers="selectOneRadio25">
            <af:panelGroupLayout id="panelGroupLayout48"
                                 layout="horizontal">
              <af:outputText value='Please choose "Yes", if you are working in UnOrganized Sector'
                             id="outputText66"
                             inlineStyle="font-weight:bold;"/>
              <af:selectOneRadio id="selectOneRadio26" layout="horizontal"
                                 contentStyle="font-weight:bold" value="N"
                                 label=" ">
                <af:selectItem label="Yes" value="Y" id="selectItem109"/>
                <af:selectItem label="No" value="N" id="selectItem110"/>
              </af:selectOneRadio>
            </af:panelGroupLayout>
            <af:panelGroupLayout id="panelGroupLayout49"
                                 layout="horizontal">
              <af:outputText value='Please choose "Yes", if you live below the poverty line (BPL) '
                             id="outputText67"
                             inlineStyle="font-weight:bold;"/>
              <af:selectOneRadio id="selectOneRadio27" layout="horizontal"
                                 contentStyle="font-weight:bold" value="N"
                                 label=" ">
                <af:selectItem label="Yes" value="Y" id="selectItem111"/>
                <af:selectItem label="No" value="N" id="selectItem112"/>
              </af:selectOneRadio>
            </af:panelGroupLayout>
            <af:panelGroupLayout id="panelGroupLayout50"
                                 layout="horizontal">
              <af:outputText value='Please choose "Yes", if you are Physically Handicaped/Disabled '
                             id="outputText68"
                             inlineStyle="font-weight:bold;"/>
              <af:selectOneRadio id="selectOneRadio28" layout="horizontal"
                                 contentStyle="font-weight:bold" value="N"
                                 label=" ">
                <af:selectItem label="Yes" value="Y" id="selectItem113"/>
                <af:selectItem label="No" value="N" id="selectItem114"/>
              </af:selectOneRadio>
            </af:panelGroupLayout>
            <af:panelGroupLayout id="panelGroupLayout51"
                                 layout="horizontal">
              <af:outputText value='Please choose "Yes", if you are working in Informal Sector'
                             id="outputText69"
                             inlineStyle="font-weight:bold;"/>
              <af:selectOneRadio id="selectOneRadio29" layout="horizontal"
                                 contentStyle="font-weight:bold" value="N"
                                 label="   ">
                <af:selectItem label="Yes" value="Y" id="selectItem115"/>
                <af:selectItem label="No" value="N" id="selectItem116"/>
              </af:selectOneRadio>
            </af:panelGroupLayout>
          </af:panelList>
        </af:panelGroupLayout>
        <af:separator id="s24" inlineStyle="color:Gray;" rendered="false"/>
        <af:spacer width="10" height="10" id="s25" rendered="false"/>
        <af:separator id="separator9"
                      inlineStyle="height:0.5px; color:gray;"
                      rendered="false"/>
      </af:panelFormLayout>

1 个答案:

答案 0 :(得分:0)

如果您从数据控件中拖放创建插入操作以添加图像链接,只需将其更改为普通图像链接并在支持bean中创建方法,如

vo.createrow();
vo.insertrow();
vo.executequery();

enter code here

然后你将获得一个空记录并输入详细信息并保存。