Menu

Subform from radio button Parent form

Help
buycarz
2005-05-05
2013-06-03
  • buycarz

    buycarz - 2005-05-05

    I have a radio-button style parent form (ParentForm.jsp).  When I select a record in this parent form via the radio button, I want the subform (ChildForm.jsp) to list all the associated records from another table and make a few columns editable.  The common field in both tables is called "IndicatorID".

    What value do I use for "followUp=" in the subform's db:dbform tag?  Right now, I'm using "/ChildForm.jsp" and the subform is clearing the window and displaying ChildForm.jsp only (not like the subordinate form it should be).

    Also, I've made parentField="IndicatorID" and childField="IndicatorID".  In dbforms-config, I've set IndicatorID in both tables to isKey="true" and sortable="true".  However, when the ChildForm displays, ALL rows in the table appear, not just the ones that have the same value of the selected IndicatorID in the parent form.  I'm displaying radiobuttons in the ChildForm too, so that the user can select the record to update.  How can I get just the related rows to display for edit? 

    Thanks,
    Charles Kogge

     
    • Henner Kollmann

      Henner Kollmann - 2005-05-05

      Subforms only work if parent form shows only one record yet.
      Could you builk an test page on based on the bookstore example? So that we can try to change the framework?

      Thanks,
      Henner

       
    • buycarz

      buycarz - 2005-05-05

      Well, if dbForms can't do a subform based on the selected record in a Parent radio-button form, how can i get dbForms to create a SEPARATE form to appear that dispalys only the related records from the original jsp page?  In other words, what do I do to restrict the records displayed in the second form to only those that are related to the selected IndicatorID in the first form?

      Thanks,
      Charles Kogge

       
      • Henner Kollmann

        Henner Kollmann - 2005-05-05

        You can use gotoButton or linkURL tag.
        See bookstore/test/testPosition.jsp for an example

        Henner

         
    • buycarz

      buycarz - 2005-05-09

      Okay, so I changed the .jsp form so that the parent is maxrows="1".  It still doesn't work.  I get nothing (whitespace) where the subform should be, even though I have specified the parentField and childField parameters.  I am using navigation buttons in the <db:header> to move from one record to the next in the parent form.  That movement works.

      I'm using a tablelist in the parent form.  Is this a problem?

      The key is that NOTHING displays, not even some text that I try to display after the subform begins:

      <%--                 ------ SUBFORM STARTS HERE ------                --%>

      <db:dbform  tableName="manual_indicator" autoUpdate="false"

      followUp="/sme_to_indicator_list_rb.jsp" maxRows="*" parentField="IndicatorID"

      childField="IndicatorID" >

      <td>
      <center><p><b>Indicators</b></p></center>
      </td>

      Thanks,
      Charles Kogge

       
      • Henner Kollmann

        Henner Kollmann - 2005-05-09

        Could you reproduce this with the bookstore example?

        Henner

         

Log in to post a comment.

MongoDB Logo MongoDB