facebook

Quoting tag/attribute problem with taglibs [Closed]

  1. MyEclipse Archived
  2.  > 
  3. Web Development (HTML, CSS, etc.)
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #217574 Reply

    Scott Minor
    Participant

    I am getting the following error (Attribute best invalid for tag option according to TLD). This works if I don’t have it in the “VALUE” property of the html:option. Anyone have this problem and or answer.

    <html:form action=”/menu”>
    <html:select property=”homeContext”>
    <html:option value=””><bean:message key=”home.context” /></html:option>
    <logic:iterate name=”supplierlst” id=”supplier” scope=”request”>
    <html:option value=”<bean:write property=”best” name=”supplier”/>”><bean:write property=”supplierName” name=”supplier”/></html:option>
    </logic:iterate>

    #217609 Reply

    Scott Anderson
    Participant

    Scott,

    It’s likely that you’re using double-quotes in a nested manner, which isn’t really valid. Try this instead:

    
    <html:option value="<bean:write property='best' name='supplier'/>"><bean:write property="supplierName" name="supplier"/></html:option>
    
    #217622 Reply

    Scott Minor
    Participant

    Scott,

    I tried that before posting but that didn’t work. I was able to make it work with a little more work. Here is what I did.

    <html:select property=”homeContext”>
    <html:option value=””><bean:message key=”home.context” /></html:option>
    <logic:iterate name=”supplierlst” id=”supplier” scope=”request”>
    <bean:define id=”supplierValue” ><bean:write property=”best” name=”supplier”/></bean:define>
    <html:option value=”<%=supplierValue%>“><bean:write property=”supplierName” name=”supplier”/>(<bean:write property=”best” name=”supplier”/>)</html:option>
    </logic:iterate>
    </html:select>

    But thanks for the ideas.

    #217625 Reply

    Riyad Kalla
    Member

    Moving to web dev

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Quoting tag/attribute problem with taglibs [Closed]

You must be logged in to post in the forum log in