facebook

tag pairings not detected if within logic:notempty

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #257974 Reply

    In MyEclipse 5.x, the following jsp snippet results in an error and a warning. There were no such problems with MyEclipse 4.x:
    <%@ taglib uri=”/WEB-INF/struts-logic.tld” prefix=”logic” %>

    <logic:notEmpty name=”wordListForm” property=”displayList”>
    <div style=”height:200px; width:600px;overflow:auto”>
    </logic:notEmpty> [No end tag (</div>).]
    <logic:notEmpty name=”wordListForm” property=”displayList”>
    </div> [No start tag (<div>).]
    </logic:notEmpty>

    #258023 Reply

    Riyad Kalla
    Member

    When I paste in what I think you meant:

    
            <logic:notEmpty name="wordListForm" property="displayList">
            <div style="height:200px; width:600px;overflow:auto">
        </logic:notEmpty>
        <logic:notEmpty name="wordListForm" property="displayList">
            </div>
        </logic:notEmpty>
    

    it works fine on my end with no errors.

    NOTE: You didn’t actually mean the snippet above, line for line, with the [No end tag] notation in it did you? When I did that, I got two errors but I figured you were just annotating your post and not really using that as your code.

    #258120 Reply

    Correct. I added the annotations that the jsp editor was displaying.

    So, any theories as to why this would appear to work for you but not for me?

    Remember that there was not a problem before upgrading from MyEclipse 4.x to 5.x (along with the requisite Eclipse upgrade).

    Are you sure you do not see little yellow and red error bar indicators on the right side of the editor window?

    #258140 Reply

    Riyad Kalla
    Member

    Can you download this project and see if you get the warnings/errors? Do you see any differences between this and you example?

    #258146 Reply

    You did not test the scenario I noted in my original memo. In particular, your code needs to look more like the following:

    <body>
    <logic:notPresent name=”tstlist”>
    <div style=”height:200px; width:600px;overflow:auto”>
    </logic:notPresent>
    <logic:notPresent name=”wordListForm” property=”displayList”>
    </div>
    </logic:notPresent>
    </body>

    #258148 Reply

    Riyad Kalla
    Member

    Doh, I ran “cleanup document” and it inserted opening and closing tags which, as you correctly pointed out, makes the HTML validator happy and hides the problem.

    The problem is the HTML validator has no knowledge of tag behavior so it thinks it’s seeing a random end tag crossing over the boundry of the other taglib end tag. The workaround is to turn off the HTML validator for that project. I have filed it as a bug however and someone in another therad had this same issue I added your comments to.

    #258149 Reply

    Thank you. My concern is mainly that there was not a problem in MyEclipse 4.x, but now there is a problem in 5.x

    #258150 Reply

    Riyad Kalla
    Member

    We shipped the HTML validator off by default in 4.x, unless you manually turned it on, that is why you never saw the error. (we shipped it off for this reason, it was too pedantic. But it’s been improving so we ship it on now. In some cases, not enough though)

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: tag pairings not detected if within logic:notempty

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