facebook

Complex JSP Partitioning Problems [Closed]

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

    posttool
    Member

    Hi

    I have a list of quirks that you might be aware of with the JSP editor.
    Some are a little odd. I will try to describe them clearly, but ask if anything is vague…

    1. “The command for the key you pressed failed” Reason: Same
    This happens frequently. The offending key is a command: undo, redo, format, cut, etc.

    2. document parsing ends abruptly for no reason: the outline view is incomplete, syntax coloring is incomplete (large sections will go black and corresponding outline is wrong). with sections like so:

    
    <c:if test="${program.website!=''}">
        <a href='http://<c:out value="${program.website}" />' 
            target="_new"> <c:out value="${program.website}" /> </a> 
        <br />
    </c:if>
    
    <div class="contents">
        <p><c:out value="${row.title}" />
        <c:if test="${row.favoriteQuotes!=''}">
        <br />
        <i><str:truncateNicely upper="210" appendToEnd="..."><str:removeXml>
        <c:out value="${row.favoriteQuotes}" escapeXml="false"/> 
        </str:removeXml></str:truncateNicely></i>
        </c:if>
        </p> 
        <A href='<c:out value="person/${row.id}.html" />'
            class="selected">click here for more information</A>
    </div>

    3. javascript withing the jsp page will not accept key strokes! the rest of the document allows edits, but the <script> block does not.

    -david

    #212679 Reply

    Riyad Kalla
    Member

    David,
    I wasn’t able to reproduce any of these… do you have a sample page that I can try that exhibit this behavior? What are the vitals of the project you are editing? (libs, versions, etc.) maybe the key will lie there…

    #212680 Reply

    posttool
    Member

    here is a screenshot-

    i have to gather all the includes to give you a sample- later

    #212682 Reply

    posttool
    Member

    try this

    
    <%@ page language="java" errorPage="/templates/error.jsp"%>
    
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
    <%@ taglib uri="http://jakarta.apache.org/taglibs/string-1.1"
        prefix="str"%>
    <%@ taglib uri="/WEB-INF/dataTaglib.tld" prefix="pt"%>
    
    <pt:permission group="org_sfhiv.org_sfhiv" />
    <pt:pageModel />
    
    <pt:data var="program" reference="providerProgram" id="${model.id}">
        <pt:data reference="contactProgram" order="type" />
        <pt:data reference="providerProgram" />
    </pt:data>
    
    <html>
    <head><title>p</title></head>
    <body>
    
    <div id="program_bar"><a href="javascript:window.print();"><img
        src="templates/images/07a_providerProgram/bar_print.gif" 
        border="0"></a><a href="javascript:window.close();"><img
        src="templates/images/07a_providerProgram/bar_close.gif" 
        border="0"></a>
    </div>
    
    <div id="background_popup"></div>
    
    <div id="image_1"><pt:img
        src="upload/organization/${program.providerProgram.image}" 
        height="110" /></div>
    
    <div id="program_name">
    
    <h1><b><c:out value="${program.programName}" /></b></h1>
    
    <p>
    <c:out value="${program.contactProgram[0].streetAddress}" /><br />
    <c:out value="${program.contactProgram[0].workPhone}" />
    </p>
    
    <c:if test="${program.contactProgram[0].email!=''}"> 
        <a href='mailto:<c:out value="${program.contactProgram[0].email}" />'><c:out
            value="${program.contactProgram[0].email}" /></a>
        <br />
    </c:if> 
    
    <c:if test="${program.website!=''}">
        <a href='http://<c:out value="${program.website}" />' target="_new"> <c:out
            value="${program.website}" /> </a> 
        <br />
    </c:if>
    
    <div id="program_description">
    
    <p><c:out value="${program.description}" escapeXml="false" /></p>
    
    <c:if test="${program.serviceDescription!=''}">
        <p><c:out value="${program.serviceDescription}" /></p>
    </c:if>
    <c:choose>
        <c:when test="${program.referralHours!=''}">
            <p><b>Referral hours</b><br />
            <c:out value="${program.referralHours}" /></p>
        </c:when>
        <c:when test="${program.monday!='' || program.tuesday!='' || program.wednesday!='' || program.thursday!='' || program.friday!='' || program.saturday!=''}">
            <p><b>Hours</b></p>
            <table border="0" cellpadding="0" cellspacing="0" style="font-size:10px;">
                <c:if test="${program.monday!=''}">
                    <tr><td>Monday </td><td><c:out value="${program.monday}" /></td></tr>
                </c:if>
                <c:if test="${program.tuesday!=''}">
                    <tr><td>Tuesday </td><td><c:out value="${program.tuesday}" /></td></tr>
                </c:if>
                <c:if test="${program.wednesday!=''}">
                    <tr><td>Wednesday </td><td><c:out value="${program.wednesday}" /></td></tr>
                </c:if>
                <c:if test="${program.thursday!=''}">
                    <tr><td>Thursday </td><td><c:out value="${program.thursday}" /></td></tr>
                </c:if>
                <c:if test="${program.friday!=''}"> 
                    <tr><td>Friday </td><td><c:out value="${program.friday}" /></td></tr>
                </c:if>
                <c:if test="${program.saturday!=''}">
                    <tr><td>Saturday </td><td><c:out value="${program.saturday}" /></td></tr>
                </c:if>
                <c:if test="${program.sunday!=''}">
                    <tr><td>Sunday </td><td><c:out value="${program.sunday}" /></td></tr> 
                </c:if> 
            </table><br/>
        </c:when>
    </c:choose>
     
    <c:if test="${program.typeOfTestingOffered!='Not Applicable'}"> 
        <p><b>Type of testing offered</b><br />
        <c:out value="${program.typeOfTestingOffered}" /></p>
    </c:if>
    <c:if test="${program.testTypeUsed!='Not Applicable'}"> 
        <p><b>Test type used</b><br />
        <c:out value="${program.testTypeUsed}" /></p>
    </c:if>
    <c:if test="${program.confirmatoryTestType!='Not Applicable'}"> 
        <p><b>Confirmatory test type</b><br />
        <c:out value="${program.confirmatoryTestType}" /></p>
    </c:if>
    <c:if test="${program.referralEligibility!=''}"> 
        <p><b>Eligibility</b><br />
        <c:out value="${program.referralEligibility}" /></p> 
    </c:if>
    <c:if test="${program.referralFees!=''}"> 
        <p><b>Fees</b><br />
        <c:out value="${program.referralFees}" /></p> 
    </c:if>
    <c:if test="${program.referralRegistration!=''}"> 
        <p><b>Registration</b><br />
        <c:out value="${program.referralRegistration}" /></p> 
    </c:if>
    <c:if test="${program.referralTransportation!=''}"> 
        <p><b>Transportation</b><br />
        <c:out value="${program.referralTransportation}" /></p>
    </c:if>
    <c:if test="${program.referralWaitingPeriod!=''}"> 
        <p><b>Waiting period</b><br />
        <c:out value="${program.referralWaitingPeriod}" /></p>
    </c:if>
    <c:if test="${program.languagesOtherThanEnglish!=''}"> 
        <p><b>Bilingual services</b><br />
        <c:out value="${program.languagesOtherThanEnglish}" /></p> 
    </c:if>
    <c:if test="${program.hoursDaysBilingualServices!=''}"> 
        <p><b>Bilingual service hours</b><br />
        <c:out value="${program.hoursDaysBilingualServices}" /></p>
    </c:if>
    
    
    </div>
    </div>
    
    </body></html>
    
    
    
    #212684 Reply

    Riyad Kalla
    Member

    I do see the coloring problems and formatting the page does nothing… I think this is a good “complex page” example we can use. Thank you.

    #212690 Reply

    posttool
    Member

    this does the same thing.
    its not terribly pretty- i am in the middle of it,
    but it does compile.

    
    <%@ page language="java" errorPage="error.jsp"%>
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
    <%@ taglib uri="http://jakarta.apache.org/taglibs/string-1.1"
        prefix="str"%>
    <%@ taglib uri="/WEB-INF/taglibs-datetime.tld" prefix="dt"%>
    <%@ taglib uri="/WEB-INF/dataTaglib.tld" prefix="pt"%>
    
    <pt:permission group="org_sfhiv.org_sfhiv" />
    <pt:pageModel />
    
    <c:set var="include_js" scope="page" >
    <script language="JavaScript" src="templates/js/popUp.js" type="text/javascript"></script>
    <script language="JavaScript" src="templates/js/toggleFolder.js" type="text/javascript"></script>
    </c:set>
     
    
    <%@ include file="include/head.jspf"%>
    
    <div id="bottom">
    <div id="background">
    </div>
    <div id="search_border">
    <div id="search_title" class="text">
    <h1><b> Search: <str:capitalize><c:out value="${model.args[0]}"/></str:capitalize></b></h1>
    </div>
    <div id="search_window" >
    <div id="search_window_content">
        <c:if test="${model.data==null}">
        <p style="padding:50 0 100 5;">Your search yields no results.</p>
        
        </c:if>
        <c:forEach items="${model.rows}" var="rows"> 
        <c:if test="${rows[0].name!=null}">
        <p><b style="padding-left:5px;"><c:choose>
            <c:when test="${rows[0].name=='person'}">People/Profiles</c:when>
            <c:when test="${rows[0].name=='organization'}">Agencies</c:when>
            <c:when test="${rows[0].name=='providerProgram'}">Services</c:when>
            <c:when test="${rows[0].name=='calendarItem'}">Events</c:when>
            <c:when test="${rows[0].name=='message'}">Messages</c:when>
            <c:when test="${rows[0].name=='textPage'}">Information</c:when>
            <c:when test="${rows[0].name=='campaign'}">Campaigns</c:when>
        </c:choose></b> <br />
    
        <c:forEach items="${rows}" var="row">
            <c:choose>
                <c:when test="${row.name=='person'}">
                    <div class="folder"><a href="javascript:tf();" 
                        onclick="tf(this);"><img alt="folder" 
                        src="templates/images/menu_/folder-open.gif" 
                        width="16" height="9" border="0" /><c:out
                        value="${row.firstName} ${row.lastName}" /></a>
                    <div class="contents">
                        <p><c:out value="${row.title}" />
                        <c:if test="${row.favoriteQuotes!=''}">
                        <br />
                        <i><str:truncateNicely upper="210" appendToEnd="..."><str:removeXml>
                        <c:out value="${row.favoriteQuotes}" escapeXml="false"/> 
                        </str:removeXml></str:truncateNicely></i>
                        </c:if>
                        </p> 
                        <A href='<c:out value="person/${row.id}.html" />'
                            class="selected">click here for more information</A>
                    </div>
                    </div>
                </c:when>
                <c:when test="${row.name=='organization'}">
                    <DIV class="folder"><A href="javascript:tf();" 
                        onclick="tf(this);"><IMG alt="folder" 
                        src="templates/images/menu_/folder-open.gif" 
                        width="16" height="9" border="0" /><str:truncateNicely 
                        upper="50"><c:out value="${row.organizationName}" /></str:truncateNicely></A>
                    <DIV class="contents">
                        <p><str:truncateNicely upper="210" appendToEnd="..."><str:removeXml>
                        <c:out value="${row.synopsis}" escapeXml="false" />
                        </str:removeXml></str:truncateNicely></p>
                        <A href='<c:out value="organization/${row.id}.html" />'
                            class="selected">click here for more information</A>
                    </DIV>
                    </DIV>
                </c:when>
                <c:when test="${row.name=='providerProgram'}">
                    <DIV class="folder"><A href="javascript:tf();" 
                        onclick="tf(this);"><IMG alt="folder" 
                        src="templates/images/menu_/folder-open.gif" 
                        width="16" height="9" border="0" /><str:truncateNicely 
                        upper="50"><c:out  value="${row.programName}"/></str:truncateNicely></a>
                    <DIV class="contents"> 
                        <p>
                        <c:out value="${row.contactProgram[0].workPhone}"/><br/>
                        <str:truncateNicely upper="210" appendToEnd="..."><str:removeXml>
                        <c:out value="${row.synopsis}" escapeXml="false" />
                        </str:removeXml></str:truncateNicely> 
                        </p>
                        <A href="javascript:popup_service('providerProgram/<c:out 
                        value="${row.id}"/>.html')" class="selected">click
                        here for more information</A> 
                    </DIV>
                    </DIV>
                </c:when>
                <c:when test="${row.name=='calendarItem'}">
                    <DIV class="folder"><A href="javascript:tf();" 
                        onclick="tf(this);"><IMG alt="folder" 
                        src="templates/images/menu_/folder-open.gif" 
                        width="16" height="9" border="0" /><str:truncateNicely 
                        upper="50"><c:out value="${row.title}" /></str:truncateNicely></A>
                    <DIV class="contents">
                        <p><dt:format pattern="EEE, MMM d, yyyy" ><c:out 
                        value="${row.start.time}"/></dt:format>
                        <br/><c:out value="${event.body}" escapeXml="false" />
                        <c:forEach items="${row.calendarAttachments}" var="attach">
                        <c:out value="${attach.link}" escapeXml="false"/>
                        </c:forEach>
                        </p>
                    </DIV>
                    </DIV>
                </c:when>
                <c:when test="${row.name=='message'}">
                    <DIV class="folder"><A href="javascript:tf();" 
                        onclick="tf(this);"><IMG alt="folder" 
                        src="templates/images/menu_/folder-open.gif" 
                        width="16" height="9" border="0" /><c:out 
                        value="${row.title}"/></a>
                    <DIV class="contents"> 
                        <p><str:truncateNicely upper="210" appendToEnd="..."><str:removeXml>
                        <c:out value="${row.body}" escapeXml="false" />
                        </str:removeXml></str:truncateNicely></p>
                        <A href='<c:out value="message/${row.id}.html" />'
                         class="selected">click here for more</A>
                    </DIV>
                    </DIV>
                </c:when>
                <c:when test="${row.name=='textPage'}">
                    <DIV class="folder"><A href="javascript:tf();"  
                        onclick="tf(this);"><IMG alt="folder" 
                        src="templates/images/menu_/folder-open.gif" 
                        width="16" height="9" border="0" /><c:out 
                        value="${row.title}"/></a>
                    <DIV class="contents"> 
                        <p><str:truncateNicely upper="210" appendToEnd="..."><str:removeXml>
                        <c:out value="${row.synopsis}" escapeXml="false" />
                        </str:removeXml></str:truncateNicely></p>
                        <A href='<c:out value="textPage/${row.id}.html" />'
                            class="selected">click here for more</A>
                    </DIV>
                    </DIV>
                </c:when>
                <c:when test="${row.name=='campaign'}">
                    <DIV class="folder"><A href="javascript:tf();"  
                        onclick="tf(this);"><IMG alt="folder" 
                        src="templates/images/menu_/folder-open.gif" 
                        width="16" height="9" border="0" /><c:out 
                        value="${row.title} ${row.year}"/></a>
                    <DIV class="contents"> 
                        <p><str:truncateNicely upper="210" appendToEnd="..."><str:removeXml>
                        <c:out value="${row.description}" escapeXml="false" />
                        </str:removeXml></str:truncateNicely></p>
                        <A href='<c:out value="campaign/${row.id}.html" />'
                            class="selected">click here for more</A>
                    </DIV>
                    </DIV>
                </c:when>
            </c:choose>
    
        </c:forEach></P> 
        </c:if>
    </c:forEach>
    </DIV>
    </DIV>
    </DIV>
    </DIV>
    
    <%@ include file="include/foot.jspf"%>
    
    
    
    #212695 Reply

    Riyad Kalla
    Member

    post thanks, I have attached this to the bug as well for us to test.

    #212800 Reply

    Hung Nguyen
    Member

    My problem is similar after doing a JSP source format: erratic cursor movement, keystrokes not accepted at certain places. Work around is to close the editor and reopen the jsp file. Eclipse 3.0 with MyEclipse 3.8 GA.

    #213043 Reply

    posttool
    Member

    HI

    the update helps! how many of you working on this? just curious…. I still have syntax coloring problems here:

    
    <%@ page language="java" errorPage="/templates/error.jsp"%>
    <%@ page import="java.util.*"%>
    <%@ page import="com.posttool.dataclass.tag.*"%>
    
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
    <%@ taglib uri="http://jakarta.apache.org/taglibs/string-1.1"
        prefix="str"%>
    <%@ taglib uri="/WEB-INF/dataTaglib.tld" prefix="pt"%>
    
    <pt:permission group="org_sfhiv.org_sfhiv" />
    <pt:pageModel />
    
    <%
    List args = (List) request.getAttribute(Constants.PAGE_ARGS);
    String id = (String) args.get(0);
    %>
    
    <pt:data var="program" reference="providerProgram" id="<%=id%>">
        <pt:data reference="contactProgram" order="type" />
        <pt:data reference="providerProgram" />
    </pt:data>
    
    <c:set var="include_js" scope="page" >
    <script language="JavaScript" type="text/javascript">
    function goOrg(id) {
        var url = "organization/"+id+".html";
        if (window.opener.location.href.indexOf("providerList")!=-1) {
            window.opener.opener.location.href = url;
            window.opener.opener.focus();
        } else {
            window.opener.location.href = url;
            window.opener.focus();
        }
    }
    </script>
    </c:set>
    
    <%@ include file="include/headpop.jspf"%>
    
    <div id="program_bar"><a href="javascript:window.print();"><img
        src="templates/images/07a_providerProgram/bar_print.gif" 
        border="0"></a><a href="javascript:window.close();"><img
        src="templates/images/07a_providerProgram/bar_close.gif" 
        border="0"></a>
    </div>
    
    <div id="background_popup"></div>
    
    <div id="image_1"><pt:img
        src="upload/organization/${program.providerProgram.image}" height="110" />
    </div>
    
    <div id="provider_link">
        <a href='javascript:goOrg(<c:out value="${program.providerProgram.id}" />);'>
        Click here to find out more about 
        <c:out value="${program.providerProgram.organizationName}"/>.</a>
    </div>
    
    <div id="program_name">
    
    <h1><b><c:out value="${program.programName}" /></b></h1>
    
    <p>
    <c:out value="${program.contactProgram[0].streetAddress}" /><br />
    <c:out value="${program.contactProgram[0].city}" />,
    <c:out value="${program.contactProgram[0].state}" />
    <c:out value="${program.contactProgram[0].postalCode}" /><br />
    <c:out value="${program.contactProgram[0].workPhone}" />
    </p>
    
    <c:if test="${program.contactProgram[0].email!=''}"> 
        <a href="mailto:<c:out value="${program.contactProgram[0].email}" />">
        <c:out value="${program.contactProgram[0].email}" /></a> 
        <br />
    </c:if> 
    
    <c:if test="${program.website!=''}">
        <a href="http://<c:out value="${program.website}" />" target="_new"> 
        <c:out value="${program.website}" /> </a> 
        <br />
    </c:if>
    
    <div id="program_description">
    
    <p><c:out value="${program.description}" escapeXml="false" /></p> 
    <c:if test="${program.serviceDescription!=''}">
        <p><c:out value="${program.serviceDescription}" escapeXml="false" /></p>
    </c:if>
    
    <c:choose> 
        <c:when test="${program.referralHours!=''}">
            <p><b>Referral hours</b><br />
            <c:out value="${program.referralHours}" /></p>
        </c:when>
        <c:when test="${program.monday!='' || program.tuesday!='' || program.wednesday!='' || program.thursday!='' || program.friday!='' || program.saturday!=''}">
            <p><b>Hours</b></p>
            <table border="0" cellpadding="0" cellspacing="0" style="font-size:10px;">
                <c:if test="${program.monday!=''}">
                    <tr><td>Monday </td><td><c:out value="${program.monday}" /></td></tr>
                </c:if>
                <c:if test="${program.tuesday!=''}">
                    <tr><td>Tuesday </td><td><c:out value="${program.tuesday}" /></td></tr>
                </c:if>
                <c:if test="${program.wednesday!=''}">
                    <tr><td>Wednesday </td><td><c:out value="${program.wednesday}" /></td></tr>
                </c:if>
                <c:if test="${program.thursday!=''}">
                    <tr><td>Thursday </td><td><c:out value="${program.thursday}" /></td></tr>
                </c:if>
                <c:if test="${program.friday!=''}"> 
                    <tr><td>Friday </td><td><c:out value="${program.friday}" /></td></tr>
                </c:if>
                <c:if test="${program.saturday!=''}">
                    <tr><td>Saturday </td><td><c:out value="${program.saturday}" /></td></tr>
                </c:if>
                <c:if test="${program.sunday!=''}">
                    <tr><td>Sunday </td><td><c:out value="${program.sunday}" /></td></tr> 
                </c:if> 
            </table><br/>
        </c:when>
    </c:choose>
     
    <c:if test="${program.typeOfTestingOffered!='Not Applicable'}"> 
        <p><b>Type of testing offered</b><br />
        <c:out value="${program.typeOfTestingOffered}" /></p>
    </c:if>
    <c:if test="${program.testTypeUsed!='Not Applicable'}"> 
        <p><b>Test type used</b><br />
        <c:out value="${program.testTypeUsed}" /></p>
    </c:if>
    <c:if test="${program.confirmatoryTestType!='Not Applicable'}"> 
        <p><b>Confirmatory test type</b><br />
        <c:out value="${program.confirmatoryTestType}" /></p>
    </c:if>
    <c:if test="${program.referralEligibility!=''}"> 
        <p><b>Eligibility</b><br />
        <c:out value="${program.referralEligibility}" /></p> 
    </c:if>
    <c:if test="${program.referralFees!=''}"> 
        <p><b>Fees</b><br />
        <c:out value="${program.referralFees}" /></p> 
    </c:if>
    <c:if test="${program.referralRegistration!=''}"> 
        <p><b>Registration</b><br />
        <c:out value="${program.referralRegistration}" /></p> 
    </c:if>
    <c:if test="${program.referralTransportation!=''}"> 
        <p><b>Transportation</b><br />
        <c:out value="${program.referralTransportation}" /></p>
    </c:if>
    <c:if test="${program.referralWaitingPeriod!=''}"> 
        <p><b>Waiting period</b><br />
        <c:out value="${program.referralWaitingPeriod}" /></p>
    </c:if>
    <c:if test="${program.languagesOtherThanEnglish!=''}"> 
        <p><b>Bilingual services</b><br />
        <c:out value="${program.languagesOtherThanEnglish}" /></p> 
    </c:if>
    <c:if test="${program.hoursDaysBilingualServices!=''}"> 
        <p><b>Bilingual service hours</b><br />
        <c:out value="${program.hoursDaysBilingualServices}" /></p>
    </c:if>
    
    <br/><br/>
    
    </div>
    </div>
    
    <%@ include file="include/footpop.jspf"%>
    
    #213052 Reply

    Riyad Kalla
    Member

    Post I will attach this new page to the original bug as well so we have more test cases, thank you.

    We did some work on the partitioner in the 3.8.1 release but that was mostly crashing/bug fixes. We will address performance and feature fixes here in the upcomming 3.8.2 update.

    #213076 Reply

    posttool
    Member

    thanks riyad-
    tell me if there is anything else you need tested…
    i am happy to do it ’cause y’all (i am from texas) try so hard!

    #223780 Reply

    Riyad Kalla
    Member

    Fixed in 3.8.4.

    #237456 Reply

    mjurjovec
    Participant

    I still have the same error in 3.8.4. It seems random, but about 10 times / day, the JSP editor seems to fail. Pressing the ‘Delete’ key causes the ‘The command for the key you pressed failed’. Then, whenever I type in the file, the cursor moved behind the last-key as I type. Any updates?

    #237458 Reply

    Brian Fernandes
    Moderator

    mjurjovec,

    Several issues in this area were fixed in ME4.0GA. Please download Eclipse 3.1 Final and ME 4.0GA, install them to new locations and you should be all set.
    You can import your projects into the new workspace or choose to continue using the old workspace.

    Best,
    Brian.

Viewing 14 posts - 1 through 14 (of 14 total)
Reply To: Complex JSP Partitioning Problems [Closed]

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