[Wicket-user] dynamically populate tree

2007-05-15 Thread galbu

Hello world
I have a problem with a data tree: I need to generate a data tree that shows
the structure of products' classification from this table:

Object: ClasseCND
id| anno | livello | descrizione | classemadre|
A| 2005 |0| d   | null  |
A01| 2005 |1|  g  |  A|
B| 2005 |0| gg | null  |
B01| 2005 |1| g   |  B|
B02| 2005 |1| g   |  B|  etc...
I have more levels of depth in the tree...and I have a great number of
classes to show
At first time I would show to the user only the level 0 of my data structure
and, when the user select one node of the
tree, I would show the requested subtree expanded. There is a way to do
something like that without generate and cache all the classification tree
in the session ? Some way to dynamically populate the tree when the user
select the node he wants to see expanded ?
Any suggest will be appreciate
Thanks in advance
  Galbu
-- 
View this message in context: 
http://www.nabble.com/dynamically-populate-tree-tf3758317.html#a10622286
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Send files with Wicket

2007-05-08 Thread galbu

Hi Nino thanks for interesting in my problem...
I try to explain better what I need: I'm developing an application that
allows to upload some report files  in a db so I want to create a page
like a ChooseFile in which there is a form with a button Browse that
shows (on click) the folders' tree to the user and allows him to have the
correct localization path of the file he wants to write on the db. I think
it's a standard function for a web application, but I have not any example
to do something like that with Wicket...
I hope it's more clear

Thanks in advance Galbu


Nino Saturnino Martinez Vazquez Wael wrote:
 
 Hi Galbu
 
 Could you rephraise your question, please?
 
 I got lost somewhere around where you asked about dragging and dropping?
 
 regards Nino
 
 galbu wrote:
 Hello world,
 I have a problem...I need to update a table reading data from a file
 Excel:
 I'm able to read and save the file from a specific fold on my computer to
 the db, but now I want that the final user of the application could
 choose
 which file save browsing his data folders and selecting it in the same
 way
 we do with attachments for an e-mail.
 Does anyone give me some ideas on which is the correct way to do that or
 which are the Wicket's components I must use? 
 Thanks in advance 
   
   
 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

-- 
View this message in context: 
http://www.nabble.com/Send-files-with-Wicket-tf3704527.html#a10371326
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Send files with Wicket

2007-05-08 Thread galbu

Hi Johan thanks for the example it's what I need, but I have another
question...
I'm trying to use FileUploadField Component and I have a problem: I want to
select a file with my ChooseFile page and then send it to another page
called UpdateProdotti in which I have a confirm button to press for write
the file on db.
But when I read the file selected in the ChooseFile page I lost the
information on the location path  so, when the  UpdateProdotti (File
uploadFile) is invoked, I can't find the file (no path is present).
I send the source code of ChooseFile, UpdateProdotti pages to be more
clear...if someone could show me where I'm wrong...
Thanks in advance Galbu

public class ChooseFile extends  ConsumiTemplateMenuPage {

public ChooseFile() {
super();
verifyAccess();

final FeedbackPanel feedback = new FeedbackPanel(feedback);
final FileUploadForm form = new 
FileUploadForm(chooseFileForm);

add(feedback);
add(form);

}

public String getPageTitle() {
return Scelta File da Salvare;
}


private class FileUploadForm extends Form {

private File uploadFile;

private FileUploadField fileUploadField;

public FileUploadForm(String name) {
super(name);

// set this form to multipart mode (allways needed for 
uploads!)
setMultiPart(true);

// Add one file input field
add(fileUploadField = new FileUploadField(fileInput));

// Set maximum size to 100K for demo purposes
//setMaxSize(Bytes.kilobytes(100));
}

public void onSubmit() {
final FileUpload upload = 
fileUploadField.getFileUpload();
if (upload != null) {

uploadFile = new 
File(upload.getClientFileName());
setResponsePage(new UpdateProdotti(uploadFile));

}
}

}

}


public class UpdateProdotti extends  ConsumiTemplateMenuPage {

public UpdateProdotti(File src) {
super();
verifyAccess();
final File uploadFile = src;
final Form form = new Form(updateProdottiForm);
final FeedbackPanel feedback = new FeedbackPanel(feedback);
add(feedback);
add(form);

form.add(new Button(annulla) {
public void onSubmit() {
setResponsePage(new ChooseFile());
}
});

form.add(new Button(updateProdotti) {
public void onSubmit() {
AppService appService = ((ConsumiApplication)
Application.get()).getAppService();
ConsumiSession session = 
(ConsumiSession)getSession();

ExcelLoader.setConsumiSession(session); 
ExcelLoader.setAppService(appService);
String esito;

try {
String tipo = ANAGRAFICA_PRODOTTO;
int dimensioneTabIniziale = 
appService.countRecords(tipo,
session.getUser());


ExcelLoader.loadAnagraficaProdotto(uploadFile);

/*
 * va impostata la logica di gestione 
dell'errore nel caricmento dei
dati e,
 * quindi, anche un controllo sulla 
stringa con cui valorizzare
l'esito.
 */
esito = caricamento effettuato;

int dimensioneTabFin = 
appService.countRecords(tipo,
session.getUser());

int numDatiCaricati = 
dimensioneTabFin-dimensioneTabIniziale;

setResponsePage(new
ReportUpdateProdotti(esito,numDatiCaricati,dimensioneTabFin));

}

catch

[Wicket-user] Send files with Wicket

2007-05-07 Thread galbu

Hello world,
I have a problem...I need to update a table reading data from a file Excel:
I'm able to read and save the file from a specific fold on my computer to
the db, but now I want that the final user of the application could choose
which file save browsing his data folders and selecting it in the same way
we do with attachments for an e-mail.
Does anyone give me some ideas on which is the correct way to do that or
which are the Wicket's components I must use? 
Thanks in advance 
  
-- 
View this message in context: 
http://www.nabble.com/Send-files-with-Wicket-tf3704527.html#a10359759
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Internal error cloning object

2007-04-18 Thread galbu

Hello world I'm a beginner and I have a problem with my first Wicket
Application:
I get from a database a list of objects Ordine and I have a ViewOrdini
page 
that correctly show me the list; now I want check an Ordine from that list
and 
generate a ViewDettaglioOrdini page that must show me all the objects
DettaglioOrdine
contained in the db that are associated with the Ordine I checked before.
When I try to generate this page where I have the details of the checked
Ordine
I get this error: 

WicketMessage: Internal error cloning object. Make sure all dependent
objects implement Serializable. 
Class: wicket.consapplication.ViewDettaglioOrdini 

Root cause:

java.io.NotSerializableException:
wicket.services.AppService$$EnhancerByCGLIB$$b5498fd0
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at
wicket.protocol.http.HttpSessionStore.setAttribute(HttpSessionStore.java:57)
at wicket.Session.setAttribute(Session.java:952)
at wicket.PageMap.put(PageMap.java:526)
at wicket.Session.touch(Session.java:744)
at wicket.Page.renderPage(Page.java:419)
at wicket.protocol.http.WebRequestCycle.redirectTo(WebRequestCycle.java:160)
at
wicket.request.target.component.PageRequestTarget.respond(PageRequestTarget.java:60)
at
wicket.request.compound.DefaultResponseStrategy.respond(DefaultResponseStrategy.java:49)
at
wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond(AbstractCompoundRequestCycleProcessor.java:66)
at wicket.RequestCycle.doProcessEventsAndRespond(RequestCycle.java:902)
at wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:929)
at wicket.RequestCycle.step(RequestCycle.java:1010)
at wicket.RequestCycle.steps(RequestCycle.java:1084)
at wicket.RequestCycle.request(RequestCycle.java:454)
at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:219)
at wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:262)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358)
at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1807)
at
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:525)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1757)
at org.mortbay.http.HttpServer.service(HttpServer.java:879)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:789)
at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:960)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:806)
at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:218)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:331)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:520)

Complete stack:

wicket.WicketRuntimeException: Internal error cloning object. Make sure all
dependent objects implement Serializable. Class:
wicket.consapplication.ViewDettaglioOrdini
at
wicket.protocol.http.HttpSessionStore.setAttribute(HttpSessionStore.java:63)
at wicket.Session.setAttribute(Session.java:952)
at wicket.PageMap.put(PageMap.java:526)
at wicket.Session.touch(Session.java:744)
at wicket.Page.renderPage(Page.java:419)
at wicket.protocol.http.WebRequestCycle.redirectTo(WebRequestCycle.java:160)
at
wicket.request.target.component.PageRequestTarget.respond(PageRequestTarget.java:60)
at
wicket.request.compound.DefaultResponseStrategy.respond(DefaultResponseStrategy.java:49)
at
wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond(AbstractCompoundRequestCycleProcessor.java:66)
at wicket.RequestCycle.doProcessEventsAndRespond(RequestCycle.java:902)
at 

[Wicket-user] Pro Wicket bugs

2007-04-03 Thread galbu

Hello world I'm a beginner in wicket developing and I need just a little
help:
I'm studying Wicket on Pro Wicket by Karthik Gurumurthy and I have a problem
with
 the BookStore example because the pdf version of the book is incomplete . .
.
 I don't know where I could find the content of these pages: 104-105-107. I
can't find the correct pdf version
of Pro Wicket so if anybody has used this tutorial and could show me these
pages I'll be grate . . .

Thank you all
-- 
View this message in context: 
http://www.nabble.com/Pro-Wicket-bugs-tf3515398.html#a9814696
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user