sgodden / echo3ext20

Automatically exported from code.google.com/p/echo3ext20
Other
0 stars 1 forks source link

Component's Class can't be anonymous. #31

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have a Component, which is an anonymous Class.
But it throw exception:

Caused by: java.lang.IllegalArgumentException: Invalid identifier:107
    at nextapp.echo.app.Component.setRenderId(Component.java:1545)
    at org.sgodden.echo.ext20.ExtComponent.<init>(ExtComponent.java:49)

Because 

    public ExtComponent() {
        super();
        if (nextapp.echo.app.Window.getActive() != null)
            setRenderId(getClass().getSimpleName() +
nextapp.echo.app.Window.getActive().generateId());
    }

Why should we set the component's renderId include the class's simple name?

Original issue reported on code.google.com by simon...@gmail.com on 11 May 2009 at 2:12

GoogleCodeExporter commented 9 years ago
I agree - it seems strange.  I will ask Lloyd to comment.

Original comment by sgod...@gmail.com on 15 Jun 2009 at 4:22

GoogleCodeExporter commented 9 years ago
It's there to make debugging easier on the client-side using things like the DOM
Inspector and/or Firebug. Having the render id be the simple name of the 
component
means we have ids on the divs like 'Panel321' rather than 'c.321'.

I guess it wants to detect when the simple name of the class is null or the 
empty
string, and not set the render id in that case.

Original comment by lloyd.colling@gmail.com on 15 Jun 2009 at 7:44

GoogleCodeExporter commented 9 years ago

Original comment by lloyd.colling@gmail.com on 9 Jul 2009 at 2:13