0

Grid in Grid: fulfill without using a zul file

asked 2009-11-25 06:53:11 +0800

jhuber gravatar image jhuber
192 1 4

updated 2009-11-25 06:55:16 +0800

Hey,

Is it possible to open a complex tree with grid in grid without using another zul file ?
instead of doing
<detail open="false" fulfill="onOpen=season.zul"/>

I want to do something like this
<detail open="false" fulfill="onOpen=id_of_grid"/>

for a grid in grid example please hava a look in here:
http://docs.zkoss.org/wiki/Building_a_Complex_Tree_with_Grid-in-Grid

Does anybody have an idea to solve this problem?

thanks for your answers ! :)

delete flag offensive retag edit

6 Replies

Sort by ยป oldest newest

answered 2009-11-25 19:41:00 +0800

joylo0122 gravatar image joylo0122
688 1
www.zkoss.org

updated 2009-11-25 20:22:39 +0800

@jhuber

Hi jhuber, i'm afraid to inform you that we didn't support this function, using page name is the only way.

But i think you can try this:

<detail fulfill="onOpen">
	<grid id="yourgrid">
                ...
        </grid>
</detail>

Just refer to our ZK-Demo: Grid's Master Details.

/Joy

link publish delete flag offensive edit

answered 2009-11-26 01:31:53 +0800

jhuber gravatar image jhuber
192 1 4

updated 2009-11-26 01:42:44 +0800

Great, it's working !
Thank you very much :)

But now I'm having the problem, that I have to do this twice...
I want to have several grid's with the same grid inside and
I can't give them the same Id, but I have to give them the same Id, because it's referenced to Java
I have to do this for every tree inside the grid

private MenuitemDMO getSelectedMenuitem()
   {
      MenuitemDMO retval = null;

      Tree tree = (Tree)getFellow("explorerTree");
      Treeitem item = tree.getSelectedItem();
      if (item != null) {
         retval = (MenuitemDMO)item.getValue();
      }
      return retval;
   }

Is it possible to reference more Id's for one ?
Or do I have to do this for every grid in grid ???

thanks for your replies !

/Juliane

link publish delete flag offensive edit

answered 2009-11-26 03:02:24 +0800

joylo0122 gravatar image joylo0122
688 1
www.zkoss.org

@jhuber

I'm not sure what you want, but it looks you should use a customized grid, and write the method on it.
Or just use GenericForwardComposer to handle all the works.

References:
An_Introduction_of_ZK_Composer
Component_Development_Tutorial

/Joy

link publish delete flag offensive edit

answered 2009-11-26 03:45:33 +0800

jhuber gravatar image jhuber
192 1 4

updated 2009-11-26 04:01:14 +0800

Thanks Joy :)

I meant, that I don't want to write 3 similar methods just with other Id's.
This 3 grids all have to do the same and so I need only one method, but this 3 grids all have another Id
thus I have to write 3 similar methods just with another Id.

My question is now : What can I do to prevent writing 3 times the same method ???


Something like this:
private MenuitemDMO getSelectedMenuitem (Tree tree)
???

/Juliane

link publish delete flag offensive edit

answered 2009-11-26 04:09:19 +0800

joylo0122 gravatar image joylo0122
688 1
www.zkoss.org

@jhuber

The best way that i thought is you must customize your own grid, just extend the standard grid then write the method for it.
Or just use a marco component.

References:
Marco Components, Window "use" clause, and POJO's

/Joy

link publish delete flag offensive edit

answered 2009-11-26 04:13:13 +0800

jhuber gravatar image jhuber
192 1 4

ok I'll try it :)

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: 2009-11-25 06:53:11 +0800

Seen: 896 times

Last updated: Nov 26 '09

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