Suggest option to NOT have a new idspace for windows within windows

asked 2021-06-09 16:51:24 +0800

Bobzk gravatar image Bobzk
442 1 7

Just a though (unless there is another way?

If I have something like (sudo code)-

        <window id="outerDiv" apply="pfactory.ComposerFactory" >
        <label id="outer_label"></label>
            <div id="innerDiv">
                <label id="inner_label"></label>

all is fine and it is easy to access "outerlabel" or "innerlabel" in ComposerFactory but if I have (sudo code) -

        <window id="outerDiv" apply="pfactory.ComposerFactory" >
        <label id="outer_label"></label>
            <window id="innerWin">
                <label id="inner_label"></label>

I have to use (sudo code) to access "inner_label" -

                        label = innerWin.getFellow("inner_label")

It is not a major problem, just an annoyance. The reason of course is that the Window component creates a new idspace.

perhaps it would be a nice idea to have something like "newIdspace="false" as an option of the window component?

Or am I missing something?

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted

answered 2021-06-09 18:06:16 +0800

MDuchemin gravatar image MDuchemin
1901 1 5
ZK Team

Hey there,

I'd say it depends why you need the window for?

If you want an object that can be moved around, resized, etc, you can consider using a Panel or a Groupbox, both of which have window-ish features without implementing IDSpace.

If you just want a logical container, then good old Div might be a better choice since it's lightweight and all that.

Did you have specific features you want to use on that container?

link publish delete flag offensive edit


it is nice to have popup windows with a title and a close button. So a highlighted window.

I appreciate there is more than one way to skin a cat, but this would be a nice feature.

Bobzk ( 2021-06-09 19:58:27 +0800 )edit

IDSpace is baked into the window at a fundamental level (it's actually an interface on the window java class). decoupling these wouldn't be easy.

MDuchemin ( 2021-06-10 11:19:22 +0800 )edit

Regarding the initial annoyance: if you are using a SelectorComposer, you can still @Wire components located inside a window. You can do that by chaining the selectors in the wire annotation. For example: @Wire("#myWin #myComp") will wire the component id="myComp" inside of the window "#myWin".

MDuchemin ( 2021-06-10 11:20:36 +0800 )edit

That also works with other IDSpace holders too

MDuchemin ( 2021-06-10 11:20:54 +0800 )edit
Your answer
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




Asked: 2021-06-09 16:51:24 +0800

Seen: 3 times

Last updated: Jun 09

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