3 Replies Latest reply: Jun 4, 2012 7:31 PM by Ben Pleysier RSS

    Need help with master detail from different datasets

    maxwellj

      I have xml data from three different datasets that I want to use in a master detail region. 

       

      So initially, a list of model codes is displayed. When the user clicks on a specific model, the model inputs appear in the detail region.  One of these inputs is a list of map units. I also want a real name description of the map unit to be displayed.  It's working for one map code, but not for all of them. 

       

      My question is: "How do I get the description to disply for each of the map codes?"

       

      Here is my code: 

       

      _______________________________________________________

       

      <head>

      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

      <title>Untitled Document</title>

      <script src="/SpryAssets/xpath.js" type="text/javascript"></script>

      <script src="/SpryAssets/SpryData.js" type="text/javascript"></script>

      <link href="/SpryAssets/SprySpotlightColumn.css" rel="stylesheet" type="text/css" />

      <script type="text/javascript">

      var DSpresence = new Spry.Data.XMLDataSet("/SpeciesReview/Copy of tblSppMapUnitPres.xml", "dataroot/Copy_x0020_of_x0020_tblSppMapUnitPres");

       

      var DSancillary = new Spry.Data.XMLDataSet("/SpeciesReview/ModelingAncillarywname.xml", "dataroot/Sheet1", {sortOnLoad: "CommonName", sortOrderOnLoad: "ascending"});

       

      var DSpresence2 = new Spry.Data.XMLDataSet("/SpeciesReview/Copy of tblSppMapUnitPres.xml", "dataroot/Copy_x0020_of_x0020_tblSppMapUnitPres[strSpeciesModelCode='DSancillary::strSpec iesModelCode']");

      var dsMUDescription  = new Spry.Data.XMLDataSet("/SpeciesReview/tblMapUnitDesc.xml", "dataroot/tblMapUnitDesc");

      var dsMUDescription2= new Spry.Data.XMLDataSet("/SpeciesReview/tblMapUnitDesc.xml", "dataroot/tblMapUnitDesc[intLSGapMapCode='{DSpresence2::intLSGapMapCode}']");

      </script>

      </head>

       

      <body>

      <div style="width: 100%">

      <div id="Species_DIV" spry:region="DSancillary DSpresence dsMUDescription" width="50%" style="float:left">

       

        <table id="DSancillary">

        <tr>

        <th>Species Code</th>

       

        </tr>

        <tr spry:repeat="DSancillary" "DSpresence" "dsMUDescription" spry:setrow="DSancillary" >

        <td>{strSpeciesModelCode}</td>

       

        </tr>

        </table>

         

          </div>

         

        <div id="Species_Detail_DIV" spry:detailregion="DSancillary DSpresence dsMUDescription" style="float:right; margin-top:20px; width: 40%">

          <table id="Species_Detail_Table"  >

            <tr width="100%">

            <th style="font-family:Verdana, Geneva, sans-serif; font-size:14px; background-color:#CCCCCC; font-weight:bold">Modeling variables used for {strSpeciesModelCode}</th>

            </tr>

                         

              <tr>

                <td spry:if="'{memModelNotes}' != ''">Hand Model Notes: {DSancillary::memModelNotes}</td></tr>

                 <tr>

                  <td spry:if="'{DSancillary::ysnHydroFW}' == 1">HydroFW: {DSancillary::ysnHydroFW}<br />Buffer from flowing water:  {DSancillary::intFromBuffFW}<br />

                  Buffer into flowing water:  {DSancillary::intIntoBuffFW}

                  </td></tr>

                 

                  <tr>

                  <td spry:if="'{DSancillary::ysnHydroOW}' == 1"> Buffer from open water: {DSancillary::intFromBuffFW}<br />Buffer into open water:  {DSancillary::intIntoBuffOW}</td></tr>

            <tr><td><br /></td></tr>

             <tr><th>Mapcode:</th></tr>

          <tr spry:repeat="DSpresence">

                  <td spry:if="'{DSpresence::ysnPres}' == '1'">{DSpresence::intLSGapMapCode}</td><td spry:if= "'{DSpresence::intLSGapMapCode}'=='{dsMUDescription::intLSGapMapCode}'">{dsMUDescription: :strLSGapName}</td>

              </tr>

              <tr><td><ul>

                  <li spry:repeat="DSpresence" spry:if="'{DSpresence::ysnPres}' == '1'">{DSpresence::intLSGapMapCode}{dsMUDescription::intLSGapMapCode}</li>

              </ul></td></tr>

          </table>

          </div>

       

      </div>

       

      </body>