Posted:
19-June-2008 10:26 Here's the code ... <select name="assettype"> <xsl:choose> <xsl:when test="assetkey"> <option selected="selected"><xsl:value-of select="/nvp/assettype"/></option> <xrl:include href="xrl:get_assettypes.idoc"/> </xsl:when> <xsl:otherwise> <xrl:include href="xrl:get_assettypes.idoc"/> </xsl:otherwise> </xsl:choose> </select> |
Now, the idea is that I display the allowed assettypes in a pull-down. The get_assettypes.idoc gets those from the database, so far so good. However, in the case of an update, I want the option previously selected displayed as such. Again no problem, I add an "option selected". And now the tricky part. I do not want that selected option displayed twice, so I wrote get_assettypes.idoc so it can take a parameter (assettype) to filter out values. For example : http://localhost:1070/theplanone/testing/get_assettypes.idoc Returns : <nvp> <option>HWC</option> <option>CFG</option> <option>SW</option> <option>ASS</option> </nvp> |
http://localhost:1070/theplanone/testing/get_assettypes.idoc?assettype="ASS"; Returns : <nvp> <option>HWC</option> <option>CFG</option> <option>SW</option> </nvp> |
And then I hit the problem ... how do pass the parameter inside the xrl:include statement ? Long explanation for something simple probably ... Hope someone can help, Regards, Tom |