0

How to include MenuBar in ZUL

asked 2013-11-27 09:24:45 +0800

sivaprasadjvs gravatar image sivaprasadjvs
1 2

updated 2014-03-13 13:25:12 +0800

sitansu gravatar image sitansu
2254 13
http://java91.blogspot.in...

Hi All,

I have file called file.zul where i had hardcoded the excel sheet. now my problem in whenever i refresh the browser it is taking me to blank.xlsx file how to remain in the same excel sheet even after refreshing the browser.

Please reply me asap

Thanks Siva prasad.

delete flag offensive retag edit

5 Answers

Sort by ยป oldest newest most voted
1

answered 2013-11-27 10:06:36 +0800

tian2yu3 gravatar image tian2yu3
21 3

Don't use the zscript in production environment, it just for debugging and testing. You can write a composer like the AppCtrl. See the composer(to books.zkoss.org/wiki/ZK Developer's Reference/MVC/Controller/Composer) of zk Frame. And before your developing you'd better to see the whole MVC(to books.zkoss.org/wiki/ZK Developer's Reference/MVC) reference first.

link publish delete flag offensive edit
0

answered 2014-03-18 05:57:58 +0800

roliroli gravatar image roliroli
164 4

updated 2014-03-18 05:58:25 +0800

What do you mean hardcoded excel sheet?

You can assign excel file path to spreadsheet component in zul simply

<spreadsheet src="myfile.xlsx" ....></spreadsheet>

or

Use a composer to wire spreadsheet component then assign excel source to it

public void MyComposer {

  @Wire
  Spreadsheet ss;

  @AfterComposer
  void init() {
     ss.setSrc = "MyExcel.xlsx";
  }

}
link publish delete flag offensive edit
0

answered 2014-03-20 08:07:55 +0800

sivaprasadjvs gravatar image sivaprasadjvs
1 2

updated 2014-03-20 08:10:20 +0800

Thanks for that idea roli i have implemented your idea in zul file everything working good.my point is i need to include menu where i have one more menu item like submit which need to save the excel complete information into database. <include hflex="1" src="~./zssapp/mainMenubar.zul"/> if i do like this once i press submit menu item or refresh due to mainMenubar.zul every time i am getting blank excel because in mainMenybar.zul i have

menubar id="mainMenubar" width="100%"apply="org.zkoss.zss.app.ui.menu.MainMenubarCtrl"

FYI i am using zss3.0 version.

how to retain my excel sheet based on this requirement. please reply me asap we are in middle of production.

Thanks Siva prasad

link publish delete flag offensive edit
0

answered 2014-03-24 09:59:34 +0800

roliroli gravatar image roliroli
164 4

Maybe you can provide a simple prototyping example, it will help others understand your problem more clearly.

I don't think

menubar id="mainMenubar" width="100%"apply="org.zkoss.zss.app.ui.menu.MainMenubarCtrl"

is the root cause of your problem.

I suggest you to download ZSS app from ZK official site and check the file mainMenubar.zul and MainMenubarCtrl to find out how ZK Spreadsheet teams make it possible to save book without refresh page and retain excel file on view.

Actually, you can simply rewrite the doSaveBook() method in AppCtrl to your database information saving process.

link publish delete flag offensive edit
0

answered 2014-04-01 10:48:21 +0800

cloudfuze gravatar image cloudfuze
1

can you provide dependency for add Menubar

link publish delete flag offensive 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

Follow
1 follower

RSS

Stats

Asked: 2013-11-27 09:24:45 +0800

Seen: 67 times

Last updated: Apr 01 '14

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