Re: RadioChoice : default choice ?

2008-01-21 Thread cblehman

Scott,

To answer your last question, to set a selected value on the RadioChoice,
you must set the PropertyModel's value to what you want selected.  One thing
that took me a while to figure out personally (and I have been programming
in java for several years) is that the Object you set in the PropertyModel
must be of the same type (class) as the objects in your list of choices.  

This is what Per was referring to.  So if you have a list of Integers as
choices, set the propertymodel to an integer.  If you instead have a more
complex Object (say MyChoiceObject) for your choices you use that.  To
render the choices, Wicket by default will just do ToString on the Object
inthe choices list, unless you create an IChoiceRenderer.  In any event, you
need to set the PropertyModel's object to an object that is int he List of
choices to preselect one of the objects.  The example below is a good on,
you should look at the RadioChoice and DropDownChoice, since they both use
the same idea with their propertymodels.

The point is that at some time, Wicket will try to cast one of the objects
in the list into the variable in the propertymodel, so they have to  have
the same type.

Hope this helps...
-Clay


Newgro wrote:
 
 
 The example you should understand is here 
 http://www.wicketstuff.org/wicket13/forminput/
 There is a link in the upper right corner with source code. The classes 
 FormInput.java and FormInputModel.java should help you out.
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/RadioChoice-%3A-default-choice---tp14876844p15001375.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Create a report based on a wicket page using DynamicJasper

2007-11-30 Thread cblehman

While this topic is not really related to Wicket, I have done something
similar (Dynamic Jasper layouts)

Jasper by itself does not support this type of thing, but you can use
Velocity Templates to create teh Jasper Design jrxml file dynamically based
on the columns you need.

Here is a good link on setting this up:
http://www-128.ibm.com/developerworks/websphere/library/techarticles/0505_olivieri/0505_olivieri.html

-Clay


lizz wrote:
 
 I have some wicket pages with a table component
 (org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable).
 I would like to use DynamicJasper to create a report that looks more or
 less the same as the table + some additional information. The table
 content and the number of rows per page varies so the report must be
 dynamic. 
 What is the best way to create the report?
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Create-a-report-based-on-a-wicket-page-using-DynamicJasper-tf4892428.html#a14080794
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Is wicket-contrib-jasperreports alive?

2007-11-30 Thread cblehman

I have used the project to create links to Jasper Report resources (with
wicket1.3 beta3) and it works fine for me.

The Repository link I got the project from is:
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff

-Clay

Newgro wrote:
 
 Hi *,
 
 i'm realy interested in this. The cvs link i found in old mailing list has
 gone.
 Someone knows the state here?
 
 Thanks
 Per
 

-- 
View this message in context: 
http://www.nabble.com/Is-wicket-contrib-jasperreports-alive--tf4902030.html#a14080389
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]