0

Popup ids seem to trascend the boundaries of id spaces

asked 2008-12-19 14:56:18 +0800

cvarona gravatar image cvarona
554 1 6

Hi!

I've tried the following:

<zk>
    <window title="w1">
        <textbox popup="popup" />
        <popup id='popup'>
            <label value='p1' />
        </popup>
    </window>
    <window title="w2">
        <textbox popup="popup" />
        <popup id='popup'>
            <label value='p2' />
        </popup>
    </window>
</zk>
Quite to my surprese it's only the 'p2' popup that appears upon clicking on any of the textboxes. It's the same if I substitute 'popup' by 'context'.

Must it really work like that? Should not windows be actual independent id spaces?

With kind regards

César Varona

delete flag offensive retag edit

3 Replies

Sort by » oldest newest

answered 2008-12-23 15:24:49 +0800

cvarona gravatar image cvarona
554 1 6

updated 2008-12-23 15:25:09 +0800

Hi Bobo,

thanks for the info. I also think it's a quite unconvincing explanation but alas! so be it.

With kind regards

César Varona

link publish delete flag offensive edit

answered 2008-12-23 15:10:22 +0800

bobo gravatar image bobo
24

I asked the same question a long time ago, and got the answer that it was implemented this way to make it easier for the developer. I disagree because I think how id spaces and components work should be homogeneous. I guess it is too late to change this behavior now though, or a lot of applications will stop working.

-Bobo

link publish delete flag offensive edit

answered 2008-12-23 09:28:09 +0800

cvarona gravatar image cvarona
554 1 6

I prepared this other test hoping it would shed some light on the subject:

<zk>
    <window id='w1' title="w1">
        <textbox context="popup" />
        <popup id='popup'>
            <label value='p1' />
            <button label='Display names in id space'>
                <attribute name='onClick'>
                    StringBuffer sb = new StringBuffer();
                    sb.append( "Components in id space " ).append( spaceOwner ).append( ' ' ).append( spaceOwner.getUuid() ).append( ":\n" );
                    for( c: spaceOwner.getFellows() ) {
                        sb.append( c ).append( ' ' ).append( c.getUuid() ).append( ", \n" );
                    }
                    sb.append( "that's all" );
                    alert( sb.toString() );
                </attribute>
            </button>
        </popup>
        <button label='Display names in id space'>
                <attribute name='onClick'>
                    StringBuffer sb = new StringBuffer();
                    sb.append( "Components in id space " ).append( spaceOwner ).append( ' ' ).append( spaceOwner.getUuid() ).append( ":\n" );
                    for( c: spaceOwner.getFellows() ) {
                        sb.append( c ).append( ' ' ).append( c.getUuid() ).append( ", \n" );
                    }
                    sb.append( "that's all" );
                    alert( sb.toString() );
                </attribute>
            </button>
            <button label='Tell me which component is the parent to the popup' onClick='alert( spaceOwner.getFellow( "popup" ).getParent().toString() )' />
    </window>
    <window id='w2' title="w2">
        <textbox context="popup" />
        <popup id='popup'>
            <label value='p2' />
            <button label='Display names in id space'>
                <attribute name='onClick'>
                    StringBuffer sb = new StringBuffer();
                    sb.append( "Components in id space " ).append( spaceOwner ).append( ' ' ).append( spaceOwner.getUuid() ).append( ":\n" );
                    for( c: spaceOwner.getFellows() ) {
                        sb.append( c ).append( ' ' ).append( c.getUuid() ).append( ", \n" );
                    }
                    sb.append( "that's all" );
                    alert( sb.toString() );
                </attribute>
            </button>
        </popup>
        <button label='Tell me which component is the parent to the popup' onClick='alert( spaceOwner.getFellow( "popup" ).getParent().toString() )' />
    </window>
</zk>
However I'm afraid it doesn't.

With kind regards

César Varona

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2008-12-19 14:56:18 +0800

Seen: 145 times

Last updated: Dec 23 '08

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More