Wicket examples: repeaters

2013-01-20 Thread Lucio Crusca
Hello *,

I'm trying to understand repeaters and DataTable from WicketExamples. I'm 
definitely having a hard time...

http://www.wicket-library.com/wicket-examples-6.0.x/repeater/

The running example shows a nice table with sorting column headers. However 
looking at what pretends to be the corresponding source code, I can't find 
where the DataTablePage code adds the sorting table headers, nor where any 
third parties eventually refer to both DataTablePage and SortingPage, the 
latter being the only place where I see the headers being added. Likewise, 
DataTablePage is the only place where I see the CSV exporter being added, but 
the running example has both sorting columns and CSV exporter in the same 
table.

I've tried copying DataTable.java in my application and adapting it, but (as 
expected) the resulting table has no sorting headers, though it does use a 
SortableDataProvider (same provider being used by SortingPage).

Please help...


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket examples: repeaters

2013-01-20 Thread Sven Meier
DefaultDataTable uses a HeadersToolbar, which renders sortable headers 
*if* a column is sortable. For that the column has to return true from 
#isSortable() .


PropertyColumn supports sorting, but for that you have to provide a 
sortProperty. Note the third constructor argument:


columns.add(new PropertyColumnContact, String(new 
ModelString(Last Name), lastName, lastName)


Hope this helps
Sven

On 01/20/2013 01:35 PM, Lucio Crusca wrote:

Hello *,

I'm trying to understand repeaters and DataTable from WicketExamples. I'm
definitely having a hard time...

http://www.wicket-library.com/wicket-examples-6.0.x/repeater/

The running example shows a nice table with sorting column headers. However
looking at what pretends to be the corresponding source code, I can't find
where the DataTablePage code adds the sorting table headers, nor where any
third parties eventually refer to both DataTablePage and SortingPage, the
latter being the only place where I see the headers being added. Likewise,
DataTablePage is the only place where I see the CSV exporter being added, but
the running example has both sorting columns and CSV exporter in the same
table.

I've tried copying DataTable.java in my application and adapting it, but (as
expected) the resulting table has no sorting headers, though it does use a
SortableDataProvider (same provider being used by SortingPage).

Please help...


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Ajax Link not resolving Wicket 6.4

2013-01-20 Thread Simon B
Hi,

I've managed to produce a quickstart  that reliably reproduces the problem
I'm having.

It looks like that it's to do with my BookmarkableMapper sub class, so I
thought I'd try and diagnose the issue more precisely first rather than ask
others to look into it, as it may simply be a bug in my code.

Also I've not tried it with Wicket 6.5 yet.

I'll post again when I've done both of the above.

Cheers

Simon



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Ajax-Link-not-resolving-Wicket-6-4-tp4655511p4655542.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Unable to find property

2013-01-20 Thread Lucio Crusca
Thanks to Sven, now my DataTable has sorting columns!

However my next step is to add CSV export. I copied the code from the examples 
and added

CSVDataExporter c_exp = new CSVDataExporter();
ExportToolbar et = new ExportToolbar(dataTable);
et.addDataExporter(c_exp);
dataTable.addBottomToolbar(new
ExportToolbar(dataTable).addDataExporter(c_exp));

but when I try the app I get the following in the browser window:

java.util.MissingResourceException: Unable to find property: 
'datatable.export-file-name'. Locale: null, style: null
 at org.apache.wicket.Localizer.getString(Localizer.java:237)
 at org.apache.wicket.Localizer.getString(Localizer.java:149)
 at org.apache.wicket.model.ResourceModel.getObject(ResourceModel.java:76)
 at org.apache.wicket.model.ResourceModel.getObject(ResourceModel.java:33)
 at 
org.apache.wicket.extensions.markup.html.repeater.data.table.export.ExportToolbar.createExportLink(ExportToolbar.java:202)

...

What part of the examples code did I miss this time?


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Unable to find property

2013-01-20 Thread Sven Meier
If you don't provide a filename to the ExportToolbar constructor, a 
String resource with key datatable.export-file-name is used.


Normally a default is provided here:

/wicket-extensions/src/main/java/org/apache/wicket/extensions/Initializer.properties

I'm not sure why this is not present in your setup.

Sven

On 01/20/2013 03:52 PM, Lucio Crusca wrote:

Thanks to Sven, now my DataTable has sorting columns!

However my next step is to add CSV export. I copied the code from the examples
and added

 CSVDataExporter c_exp = new CSVDataExporter();
 ExportToolbar et = new ExportToolbar(dataTable);
 et.addDataExporter(c_exp);
 dataTable.addBottomToolbar(new
 ExportToolbar(dataTable).addDataExporter(c_exp));

but when I try the app I get the following in the browser window:

java.util.MissingResourceException: Unable to find property:
'datatable.export-file-name'. Locale: null, style: null
  at org.apache.wicket.Localizer.getString(Localizer.java:237)
  at org.apache.wicket.Localizer.getString(Localizer.java:149)
  at org.apache.wicket.model.ResourceModel.getObject(ResourceModel.java:76)
  at org.apache.wicket.model.ResourceModel.getObject(ResourceModel.java:33)
  at
org.apache.wicket.extensions.markup.html.repeater.data.table.export.ExportToolbar.createExportLink(ExportToolbar.java:202)

...

What part of the examples code did I miss this time?


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Wicket + Spring

2013-01-20 Thread JCoder

Hi all,

Im just trying to setup a basic project structure in Eclipse with Wicket 
and Spring. I think its pretty smart to separate both Wicket and Spring 
into two different Eclipse projects, isnt it? Thus, I created an Eclipse 
project for the Web part and one for the Spring (and later Hibernate as 
well) part.
Now when I start Tomcat with Eclipse I get ...Caused by: 
java.lang.NoClassDefFoundError: 
org/springframework/context/ConfigurableApplicationContext
Thats not rocket science. After adding the corresponding Spring lib to 
the WEB-INF/lib folder another error message appears after server 
startup telling me that another class is missing from a different jar. 
Probably I will end up adding all Spring jars into my WEB-INF/lib 
folder. But thats not what I what. I dont want to add any Spring Core 
jar in my Web project (Reasons should be clear). I already added all 
Spring related jars into my different Spring Eclipse project.

Any suggestions.

Cheers,
Y

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket + Spring

2013-01-20 Thread Tim Urberg
If you use Maven, it will take care of all the dependencies for you.  
That would be the easiest way to go.  Make sure you make your Wicket 
project into a war by using the war packaging element and have the 
wicket project depend on the spring project.


On 1/20/13 10:52 AM, JCoder wrote:

Hi all,

Im just trying to setup a basic project structure in Eclipse with 
Wicket and Spring. I think its pretty smart to separate both Wicket 
and Spring into two different Eclipse projects, isnt it? Thus, I 
created an Eclipse project for the Web part and one for the Spring 
(and later Hibernate as well) part.
Now when I start Tomcat with Eclipse I get ...Caused by: 
java.lang.NoClassDefFoundError: 
org/springframework/context/ConfigurableApplicationContext
Thats not rocket science. After adding the corresponding Spring lib to 
the WEB-INF/lib folder another error message appears after server 
startup telling me that another class is missing from a different jar. 
Probably I will end up adding all Spring jars into my WEB-INF/lib 
folder. But thats not what I what. I dont want to add any Spring Core 
jar in my Web project (Reasons should be clear). I already added all 
Spring related jars into my different Spring Eclipse project.

Any suggestions.

Cheers,
Y

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket + Spring

2013-01-20 Thread Ernesto Reinaldo Barreiro
Hi,

Look at

http://jweekend.co.uk/dev/LegUp

Some dependencies might be old but at least it will give you  something
from where to start,


On Sun, Jan 20, 2013 at 5:52 PM, JCoder i...@jcoder.de wrote:

 Hi all,

 Im just trying to setup a basic project structure in Eclipse with Wicket
 and Spring. I think its pretty smart to separate both Wicket and Spring
 into two different Eclipse projects, isnt it? Thus, I created an Eclipse
 project for the Web part and one for the Spring (and later Hibernate as
 well) part.
 Now when I start Tomcat with Eclipse I get ...Caused by: 
 java.lang.**NoClassDefFoundError:
 org/springframework/context/**ConfigurableApplicationContext**
 Thats not rocket science. After adding the corresponding Spring lib to the
 WEB-INF/lib folder another error message appears after server startup
 telling me that another class is missing from a different jar. Probably I
 will end up adding all Spring jars into my WEB-INF/lib folder. But thats
 not what I what. I dont want to add any Spring Core jar in my Web project
 (Reasons should be clear). I already added all Spring related jars into my
 different Spring Eclipse project.
 Any suggestions.

 Cheers,
 Y

 --**--**-
 To unsubscribe, e-mail: 
 users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




-- 
Regards - Ernesto Reinaldo Barreiro


Re: Unable to find property

2013-01-20 Thread Lucio Crusca
In data domenica 20 gennaio 2013 17:16:48, Sven Meier ha scritto:
 If you don't provide a filename to the ExportToolbar constructor, a
 String resource with key datatable.export-file-name is used.
 
 Normally a default is provided here:
 
 /wicket-extensions/src/main/java/org/apache/wicket/extensions/Initializer.p
 roperties
 
 I'm not sure why this is not present in your setup.

My project was depending on wicket-examples-6.0-SNAPSHOT, which in turn 
depends on wicket-extensions-6.0-SNAPSHOT, which in turn lacks that default in 
the above properties file. My final war was being built with both 
wicket-extensions-6.4.0 and wicket-extensions-6.0-SNAPSHOT and the latter 
eventually took precedence.

It now works, except it exports only the first column of my DataTable...

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket + Spring

2013-01-20 Thread yka
Well I dont use Maven,
I start Tomcat from within Eclipse...
Any ideas?
If I start Spring standalone or Wicket+Tomcat standalon it works fine...



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Spring-tp4655546p460.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket + Spring

2013-01-20 Thread yka
To go more into detail.
The Web part is a dynamic web project and is added to Tomcat Server within
Eclipse (Right-click on Tomcat in Servers-Tab - And and Remove - Add the
web project.)
The spring part is a just a java project...



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Spring-tp4655546p461.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Passing IModel in Constructor of bookmarkable Page?

2013-01-20 Thread Bernard
Hi all

I am searching for a robust pattern to work around
PageExpiredException.

My first idea was to have all pages bookmarkable and rely on
org.apache.wicket.settings.IPageSettings#getRecreateMountedPagesAfterExpiry()
to recover.

But this breaks when passing IModel in page constructors because then
pages are no longer bookmarkable.

Of course avoiding the constructor and letting Wicket create the page
with PageParameters would solve this problem but I want to avoid this.

It would be very useful to pass an IModel to a bookmarkable Page. How
can this be done?

I am trying to avoid expiring logout links (the primary driver of all
this). In case of page expiry I can deal with the exceptional call of
the default constructor from
IPageSettings#getRecreateMountedPagesAfterExpiry() by responding with
a bookmarkable page.

Many thanks,

Bernard



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org