Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    ID Collision, even after destroy(), how to debug this?

    Hello,

    I'm using SmartClient Version: v8.3p_2013-01-09/PowerEdition Deployment (built 2013-01-09).

    I'm getting more and more into the selenium testcases, which is a great feature. One problem I face on a regular basis is ID collision.

    I get warns like this:
    Code:
    [ERROR] [generatedcode] - 10:23:18.156:MUP6:WARN:Log:Specified ID:grid_IngredientRichTableView collides with the ID for an existing SmartGWT component or object.
    I am certain they are unique, and I know that they are destroyed, ie when a tab is closed or deselected. That is: in the developer console, after a tab deselection, I don't see the widget with this ID anymore in the 'Watch' tab.

    What I wonder is, if there is a reference (ie. the object is not drawn or connected to a canvas, and is destroy()'ed, but the object in Java is located in a HashMap or whatever), would this trigger a collision?

    I am trying to debug these collisions, so that's why I ask. Any hints for things I need to look into are welcome.

    #2
    Components are not destroy()d by tab deselection and whether they are destroyed by tab removal is optional, controlled by TabSet.destroyPanes.

    The checkboxes at the top of the Watch Tab control which components are displayed. By default you would not see components that are hidden or not drawn. You have to check all 3 boxes to see all components.

    Another definitive way to check for destruction is to call Canvas.getById()

    Comment


      #3
      Finally had some time to look into this again, and indeed, i did not seen those checkboxes. Now i realize that after tab deselection, somehow my panes aren't correctly destroyed. So I'll look into that.

      Thanks for now, at least I now know how to debug this.

      Comment


        #4
        how to solve DEBUG: widget ID collision on ID: InsertItem_from error in JSP

        Core JSP code:

        <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
        pageEncoding="ISO-8859-1"%>
        <%@ taglib prefix="s" uri="/struts-tags" %>
        <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
        <%@ page import="java.util.*" %>
        <%@ page import="com.uttara.Employee.pojos.*" %>
        <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
        <html>
        <head>
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
        <title>Insert title here</title>
        <s:head theme="ajax" debug="true"/>
        </head>
        <body background="./images/BG.jpg" >
        <h1> Add item jsp</h1>
        <div id="maindiv">
        <div id="header" style=" background-color:#B6D476; height: 50px; ">

        <div style="margin-left: 380px;"><h1>Discount Tracker</h1>
        <div style="margin-left: 800px;"><a style="text-decoration: none;" href="logout.action">Logout</a></div>
        </div>
        <div class="welcome" >
        <s:text name="Welcome"/>, <s:property value="%{#session.username}"/>
        </div>
        </div>

        <div id="mainContent" style="margin-top: 50px; background-color: #B6D476; width: 160px;float: left; width: 200px; border: 2px;border-style: dotted;height: 500px;">


        <div style="margin-left: 15px;margin-top: 10px;text-decoration: none">
        <a href="AddNewItem.action" class="current" style="text-decoration: none;">Add Item</a><br/><br/>
        <a href="ItemReport.action" style="text-decoration: none;" >Report</a><br/><br/>
        </div>

        </div>
        <div style="float: left;margin-top: 23px; margin-left: 5px;">
        <a href="AddNewItem.action" style="text-decoration: none;"><input type="button" value="Add Item"></a>
        </div>

        <div id="userval" style="width: 800px;margin-left: 210px; margin-top: 49px;">
        <div style="margin-left: 25px;"><s:form action="InsertItem.action">
        <div style="color: red; font-size: 14px;">
        <s:actionmessage/>
        <s:actionerror/>
        </div>

        <span class="inputHolder">
        <s:textfield key="itemname" onfocus="true" label="Item Name" maxlength="40" onkeypress="return onlyNumbers(event)" />
        </span>
        <span class="inputHolder">
        <s:textfield key="mrp" label="Mrp" onfocus="true" maxlength="40" />
        </span>
        <span class="inputHolder">
        <s:textfield key="discount" onfocus="true" label="Discount" maxlength="40" onkeypress="return onlyNumbers(event)" />
        </span>
        <span class="inputHolder">
        <s:datetimepicker key="from" displayFormat="dd-MM-yyyy" label="From Date" required="true" />
        </span>
        <span class="inputHolder">
        <s:datetimepicker key="to" displayFormat="dd-MM-yyyy" label="To Date" required="true" />
        </span>
        <span class="inputHolder">

        <s:select list="al" name="category" label="Select Category" headerKey="" headerValue="----select----"></s:select>
        </span>
        <s:submit value="Register"></s:submit>


        </s:form></div>

        </div>

        <s:if test="#session.message !=null">
        <div id="reeor" style="color :red; margin-left:500px;">
        <s:property value ="#session.message"/>
        </div>
        </s:if>


        </div>
        </body>
        </html>

        Error: While running in Jsp

        DEBUG: widget ID collision on ID: InsertItem_from
        DEBUG: widget ID collision on ID: InsertItem_to
        DEBUG: widget ID collision on ID: InsertItem_from
        DEBUG: widget ID collision on ID: InsertItem_to
        DEBUG: widget ID collision on ID: InsertItem_from
        DEBUG: widget ID collision on ID: InsertItem_to

        Answer Me Please... Because its solves me other more pages

        Comment

        Working...
        X