-
FEATURED COMPONENTS
First time here? Check out the FAQ!
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.
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.
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";
}
}
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
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.
Asked: 2013-11-27 09:24:45 +0800
Seen: 67 times
Last updated: Apr 01 '14
Some feedback about ZK SpreadSheet
Cannot add to Eclipse the ZK SPreadsheet jars
Zk Spreadsheet: Date in cells are displayed as GMT+0 while my locale is GMT+8
I want cancel the page part refresh ,how?
Spreadheet and pagination problem
Zk spreadsheet 2.0 beta3 - row copy/cut and paste not working
Zk spreadsheet - cell values changing automatically
how to make spreadsheet row un-editable & freeze???