You need to sign in to do that
Don't have an account?
knowledge:categoryList with selectOption
This should be a pretty straightforward one but I can't seem to figure out why this isn't working. I'm trying to create a select box with the different categoryGroups of knowledge. It seems to work fine when I use basic html <select> and <option> but when using <apex:selectList> and <apex:selectOption> it does not.
This works:
<select name="category">
<option Value="myRoot">--All--</option>
<knowledge:categoryList categoryVar="category" categoryGroup="IssueType" rootCategory="myRoot" level="-1">
<option value="{!category.name}">{!category.label}</option>
</knowledge:categoryList>
</select>
But this does not (only the --All-- selection is displayed, nothing inside the categoryList loop)
<apex:selectList id="issueTypeList" size="1" value="{!issueType}">
<apex:selectOption itemLabel="--All--" itemValue="myRoot" />
<knowledge:categoryList categoryVar="category" categoryGroup="IssueType" rootCategory="myRoot" level="-1">
<apex:selectOption itemLabel="{!category.name}" itemValue="{!category.label}" />
</knowledge:categoryList>
</apex:selectList>
Is there something about knowledge:categoryList and apex:selectOption that do not play well together? I'm sure I could work around it using the basic html controls but was hoping to understand why this isn't working.
Thanks,
George
Hi,
Your issue comes from the fact that nesting knowledge categoryList tag within an apex:select is not supported at the moment. Unfortunately you should then stick to the plain select html tag.
Etienne
All Answers
Hi,
Your issue comes from the fact that nesting knowledge categoryList tag within an apex:select is not supported at the moment. Unfortunately you should then stick to the plain select html tag.
Etienne