Hi!

Yes it might help putting the data into a data file.

Database yes, or csv file:
http://opencsv.sourceforge.net/

**
Martin

2010/11/14 Paolo <[email protected]>:
> I use Eclipse Europe and Wicket 1.4.10
> I am newbie. I am try to make a ecommerce web site.
> I follow the example Cheese Shop in "Wicket in Action" manual.
> I put the products database in memory in a ArrayList in MainApplication.
> I works all ok, until the database was small. Now it include about 1000 
> products,
> so I had this error: ...exceded the 65,535 byte limit
>
> I found in google search some solution as to put the database in an external 
> text file with fields divided with semicolon ;
> like .csv files
> and read it from java class.
> One line for every product, and 32 fields of Strings, like I declared in 
> Class C:
> ....
> public class C implements Serializable {
> private String cat1;
> private String art;
> private String cat2;
> private String cat3;
> ....
> public C(String cat1, String art, String cat2, String cat3, String cat4, 
> String cat5, String cat6, String cat7, String cat8, String cat9, String 
> cat10, String descr_it, String descr_en, String nota_it, String nota_en, 
> String Ricerca, String nfoto, String multi, String disp, String codprezzi, 
> String prezzopub, String prezzoriv, String prezzoacq, String peso, String 
> fornitore, String noteotty, String agg1, String agg2, String agg3, String 
> agg4, String agg5, String quantita) {
>  super();
>  this.cat1 = cat1;
>  this.art  = art;
>  this.cat2 = cat2;
>  .....
>
>
> So to implement it to my wicket MainApplication before to read from external 
> file, I am starting to convert source from this:
>
> public class MainApplication extends WebApplication {
> private List<C> cheeses = Arrays.asList(
>                new 
> C("BBTAA","001","","","","","","","","","","Portafotografia 
> argento","","","","","","","","","19.00","","","1000","ard","verif","","","","","","0"),
>                new C("BBTAA","002","","","","","","","","","","Serie 
> sacchetti in 
> azzurro","","","","","","","","","15.00","","","1000","ard","verif","","","","","",0),
>                new C("BBTAA","003","","","","","","","","","","Serie 
> sacchetti in 
> rosa","","","","","","","","","10.00","","","1000","ard","verif","","","","","",0),
>        new C(.................
>
> To this:
>
> public class MainApplication extends WebApplication {
> private List<C> cheeses = new ArrayList<C>();
>          cheeses.add (new 
> C("BBTAA","001","","","","","","","","","","Portafotografia 
> argento","","","","","","","","","19.00","","","1000","ard","verif","","","","","","0"));
>
> The last line (cheeses.add(...), give me this errors:
> Multiple markers at this line
>        - Syntax error on token "add", = expected after this token
>        - Syntax error on token(s), misplaced construct(s)
>
> Please Help me!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to