| Author |
jxls problem
|
Yasmeen MohdRafi
Greenhorn
Joined: Nov 27, 2008
Posts: 2
|
|
I am a novice in this field. My purpose is to create a bean from xls, but i am unable to do so. Could anyone please help me out in figuring as what the error is. Code is as follows: I have a bean class: I have a xml mapping file. I have another java file as follows Kindly help.. [ UD: Please UseCodeTags when posting code of any length. The code is unnecessarily hard to read without them. ] [ December 16, 2008: Message edited by: Ulf Dittmer ]
|
 |
Cristina Tarcuta
Greenhorn
Joined: Jun 18, 2009
Posts: 1
|
|
Hi,
I do not know if you solved your problem ... but for making available a solution for other users also, I decided to post an answer.
For solving you problem your should make the following changes:
1. In the class Infoxl2Bean you need to put List infos = new ArrayList(); as class member (to declare it outside the methods) and to have a set method for it.
2. Change beans.put("infos", infos); to beans.put("infosHolder", this);
3. In the config XML change items="infos" to items="infosHolder.infos"
Good luck.
|
 |
Martijn Verburg
author
Bartender
Joined: Jun 24, 2003
Posts: 3268
|
|
Hi Cristina and welcome to the Javaranch!
I'd normally say Don't wake the zombies, they bite! but we're easing up on that polciy a little, just posting the link for your future reference .
Happy ranching!
|
Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
|
 |
 |
|
|
subject: jxls problem
|
|
|