Re: [Wicket-user] Export to CSV encoding problem

2007-04-16 Thread Juergen Donnerstag
Unlike XML, CSV files don't have a tag or any other option to tell
which encoding the characters are. Hence Word, Excel etc are assuing
the encoding is equal to you computers default encoding (CP1259 in
Germany). Some programms are more intelligent than others and
recognize if certain byte codes are not allowed within the assumed
charset and than ask you (e.g. WORD). You need to output the CSV file
with the encoding you are using on your computer.

Juergen

On 4/16/07, LongkerDandy [EMAIL PROTECTED] wrote:
 Hi

 I'm try to export a table to CSV format;
 Following the example from wicket.examples.displaytag.export, most
 things goes well, except the encooding.
 It seems that when I export it to the CSV or XLS format, the Excel don't
 know what encoding my file used.
 All the Chinese characters in CSV and XLS are crap, and when exports to
 XML it works well with the browser at UTF-8 encoding.
 Plus, when I use WORD to open my CSV files, it asked me to choose the
 encoding, and with UTF-8, it just fine.

 So I think the Excel may not know the encoding by himself,
 I wondered if there is a way to let him know.

 I tried this

 response.setCharacterEncoding(UTF-8);

 while reponse is WebResponse.
 But no luck.

 Any idea to fix that?

 Regards
 LongkerDandy

 -
 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


-
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] Nullify objectModel when component is not visible

2007-04-16 Thread Alex Objelean

Sorry, my mistake. Indeed, it has nothing to do with changing model object. I
used YUI-ext LayoutManager for screen layout, and didn't noticed that the
rendered markup replace the form components... this was the cause that make
me believe that there is something wrong with wicket. :)


Johan Compagner wrote:
 
 when is it set to null?
 
 public final Component setVisible(final boolean visible)
 {
 // Is new visibility state a change?
 if (visible != getFlag(FLAG_VISIBLE))
 {
 // record component's visibility change
 addStateChange(new VisibilityChange(this));
 
 // Change visibility
 setFlag(FLAG_VISIBLE, visible);
 }
 return this;
 }
 
 i don't see any code touching the model.
 
 johan
 
 
 On 4/15/07, Alex Objelean [EMAIL PROTECTED] wrote:


 I don't understand why if the component visibility is set to false, the
 backing model object is set to null? Is there any reason? I find it more
 useful to not touch at all the backing object is such case. What is your
 opinion?

 Thank you!
 --
 View this message in context:
 http://www.nabble.com/Nullify-objectModel-when-component-is-not-visible-tf3577965.html#a9998155
 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

 
 -
 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/Nullify-objectModel-when-component-is-not-visible-tf3577965.html#a10012033
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] have wicket ignoring compononts/tags

2007-04-16 Thread Jan Kriesten

hi,

is it possible to have wicket configured to ignore references which can't be
resolved?

e.g. trying to add a component which doesn't exist in the markup (ok, this could
be done by catching the thrown exception, but only if the 'add'-method is used)
or not adding a component which is referenced in the markup.

background: i have different targets to publish from the same content system.
not all targets need all information displayed, so some markup files miss
certain id's (same classes are used, markup used is decided by the target to
publish to).

another use-case would be having generic markup files which are used as
'default', containing more wicket-tags than actually served by the corresponding
class.

optimal would be a page-based property

greets from sunny hamburg! :-)

--- jan.



-
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] Post Form to different server? How?

2007-04-16 Thread John RDF

I have a form that has some hidden fields that I need to be generated
dynamically. However, I want to form submitted to an other server (world
pay). Wicket changes the form so it posts back into wicket but I want to
leave wicket page (and come back after world pay). 

How do I do this?
-- 
View this message in context: 
http://www.nabble.com/Post-Form-to-different-server--How--tf3583928.html#a10014437
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] Integrating Guice into wicket-phonebook

2007-04-16 Thread Wesley Hales

The funny thing is that the SessionFactory is being created (through use of
debug logs) but when the form is submitted it resets to null. I guess the
transactional context part may be where it is failing, I will try to install
Hiberante directly without use of Spring.

Thx,
Wesley

On 4/15/07, Igor Vaynberg [EMAIL PROTECTED] wrote:


you get that error because a hibernatre session has not been created yet

guice is just DI, wicket-phonebook uses spring for a lot more. it uses
open-session-in-view filter, as well as spring's ability to create sessions
for transactional contexts used by phonebook.

so to the short of it is, you need to recreate all the services of
spring's that phonebook uses.

-igor


On 4/15/07, Wesley Hales  [EMAIL PROTECTED] wrote:

 I was able to get Guice's DI working and the wicket-phonebook app
 displays fine (btw, I am on 1.3.0-incubating-snapshot), but when I call
 a service from the HibernateContactDao class I get the following (i.e -
 I get this message after trying to edit a contact in the list displayed.
 When I click save on the EditContactPage I get...):
 -
 WicketMessage: Method onFormSubmitted of interface
 wicket.markup.html.form.IFormSubmitListener targeted at component
 [MarkupContainer [Component id = contactForm, page =
 wicket.contrib.phonebook.web.page.EditContactPage, path = 1:
 contactForm.Form, isVisible = true, isVersioned = true]] threw an
 exception

 Root cause:

 java.lang.NullPointerException
 at wicket.contrib.phonebook.HibernateContactDao.getSession (
 HibernateContactDao.java:75)
 -
 Something is happening to the SessionFactory when Guice does its
 DI/bind???, it is null after clicking on the save button in the edit form.
 Any ideas from the pros?

 If it helps I am integrating Guice using the same methods as these
 links:
 http://www.jroller.com/page/cagataycivici?entry=integrating_guice_and_jsf

 and
 http://java-x.blogspot.com/2007/03/my-first-guice-web-application.html

 As a quick hack I used -
 SessionFactory sessionFactory = new
 Configuration().configure().buildSessionFactory();
  - when the sessionFactory became null, but that gives me 2 out-of-sync
 sessions and causes ehcache problems.

 Appreciate any feedback/things to check
 Wesley Hales
 http://www.jroller.com/page/wesleyhales


 -
 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



-
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


-
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] switching back to WicketFilter from ReloadingWicketFilter in production

2007-04-16 Thread Jean-Baptiste Quenot
* Johan Compagner:

 you could  use a system  property for  that? so the  filter only
 works if a system property is set.

Yes using a  system property in development is the  only option to
avoid hacking web.xml when going to production.

So Peter, just override getClassLoader()  for that usecase, but we
may not check that change  into Wicket, otherwise the instructions
to use the reloading mechanism get too complicated.
-- 
 Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

-
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] Post Form to different server? How?

2007-04-16 Thread John RDF

It turns out easy. Wicket doesn't mind if wicket hidden fields are not inside
a wicket form. So I just used wicket hidden fields to modify the form to
send to worldpay.. :)


John RDF wrote:
 
 I have a form that has some hidden fields that I need to be generated
 dynamically. However, I want to form submitted to an other server (world
 pay). Wicket changes the form so it posts back into wicket but I want to
 leave wicket page (and come back after world pay). 
 
 How do I do this?
 

-- 
View this message in context: 
http://www.nabble.com/Post-Form-to-different-server--How--tf3583928.html#a10015452
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] wicket-contrib-tinymce-examples download

2007-04-16 Thread Andrew Moore

I've downloaded wicket tinymce from sourceforge, but cannot find anywhere
that the download of the examples is available. The wicket stuff wiki points
at a view of cvs, but it doesn't I just get a page not found error. (I also
can't connect using cvs to check it out as described at the page here
http://cwiki.apache.org/WICKET/wicket-stuff.html)

Does anyone know where the examples can be downloaded from, or does anyone
have an example of what's needed to get tinymce working in place of a
textarea?

Cheers
Andrew
-- 
View this message in context: 
http://www.nabble.com/wicket-contrib-tinymce-examples-download-tf3584332.html#a10015677
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] Wicket manager resources inside Javascript and Css files

2007-04-16 Thread Paolo Di Tommaso

Dear all,

which is the best strategy to use Wicket manager resource path from inside
Javascript file and Css?

For example I need to replace and url() attribute inside a css with a gif
deployed with the wicket application ..

Is there any example ?

Thanks in advance,
Paolo
-
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] More than one wicket:child

2007-04-16 Thread Daniel Stoch
Hi,

Is it possible to have more than one wicket:child section per page? I didn't 
find any possibility to do that, so maybe it can be a feature in the next 
version of Wicket. What I want to achieve is to have two or more wicket:child 
sections in the base page, so I will be able to define in derived component 
(page) different contents for these section.
Maybe each wicked:child could have an id (wicket-id), so in derived page I 
can place contents in corresponding wicket:extend (with the same id).
Here is a short example:

base page:
...
div id=leftPanelwicket:child wicket-id=contentLeft //div
...
div id=rightPanelwicket:child wicket-id=contentRight //div
...

derived page:
...
wicket:extend wicket-id=contentLeftSome content/wicket:extend
wicket:extend wicket-id=contentRightSome other content/wicket:extend
...

Best regards,
Daniel Stoch


--
Wkrec znajomych :) http://link.interia.pl/f1a5c 



-
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] Wicket manager resources inside Javascript and Css files

2007-04-16 Thread Matej Knopp
If you the css is a packagedresource, you don't need to do anything
special. Just use relative url for the image and have the image in
same folder than css.

-
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] Problem setting selected value in DropDownChoice

2007-04-16 Thread V. Jenks

Yeah, I've tried that also, it just isn't working...no idea why.

Here's what I have, using your suggestion...and I've walked through the
debugger to make sure the date is there, the value is definitely not null. 
I must be missing something obvious and simple because it doesn't select the
correct date:

public class CheckoutPanel extends Panel
{
public CheckoutPanel(String id)
{
super(id);  

//get cart from session
final ShoppingCartLocal cart = 
((UserSession)getSession()).getCart();

Date arrivalDate = null;

if (cart.getOrder().getEstArrivalDate() != null)
arrivalDate = cart.getOrder().getEstArrivalDate();

CheckoutInput input = new CheckoutInput();
input.setArrivalDate(arrivalDate);

//create form
add(new CheckoutForm(checkoutForm, cart, input));
}

private final class CheckoutForm extends Form
{
private CheckoutForm(String id, final ShoppingCartLocal cart,
CheckoutInput input)
{
super(id, new CompoundPropertyModel(input));

//create dropdown w/ days List
DropDownChoice arrivalChoices = new 
DropDownChoice(arrivalDate, days)
{
protected String getDefaultChoice(final Object 
selected)
{
return ; //get rid of Choose One 
default
}   
};

//override key/value in dropdown
arrivalChoices.setChoiceRenderer(new IChoiceRenderer()
{   
public String getIdValue(Object object, int 
index)
{
return object.toString();
}   

public String getDisplayValue(Object object)
{
//format differently for display, i.e. 
Thu, Mar 2
return 
DateTime.getCartDateFormatString(object.toString());
}
});

//add dropdown to form
add(arrivalChoices);
}
}
}


ptrthomas wrote:
 
 Instead of pre-loading in the input field, try pre-loading the property in
 your form backing object (model) - so call setArrivalDate() or just ensure
 that PaymentInfoInput.arrivalDate is not null
 
 On 4/7/07, V. Jenks [EMAIL PROTECTED] wrote:


 I feel like I've asked this question before...but here I am again.  I'm
 simply trying to set a selected value for a DropDownChoice when a page is
 loaded.

 I've tried pre-loading it into the input class, setting it in
 getDefaultChoice, and also by trying to pass a model into the control w/
 the
 value in the getObject method.  I'm sure it's a simple thing but the
 DropDownChoice is tricky at times...for me anyhow.

 Here's my control:

 //get calendar days (buffer by 2 days  go 1
 month
 ahead)
 ListString days =
 DateTime.getDaysListForward(2,
 1, true);

 //create dropdown w/ days List
 DropDownChoice arrivalChoices = new
 DropDownChoice(arrivalDate, days)
 {
 protected String getDefaultChoice(final
 Object selected)
 {
 return ; //get rid of Choose
 One default
 }
 };

 //override key/value in dropdown
 arrivalChoices.setChoiceRenderer(new
 IChoiceRenderer()
 {
 public String getIdValue(Object object,
 int index)
 {
 return object.toString();
 }

 public String getDisplayValue(Object
 object)
 {
 //format differently for display,
 i.e. Thu, Mar 2
 return
 DateTime.getCartDateFormatString(object.toString());
 }
 });

 It simply loads a list of strings that are converted dates, they look
 like

 Fri, Mar 6, Sat, Mar 7, etc.

 

Re: [Wicket-user] Wicket manager resources inside Javascript and Css files

2007-04-16 Thread Matej Knopp
What do you mean in javascript file, can you make an example?

-Matej

On 4/16/07, Paolo Di Tommaso [EMAIL PROTECTED] wrote:
 Really .. I didn't know that. Great!

 But how to do with resource path in javascript file ?


 Thanks, Paolo


 On 4/16/07, Matej Knopp  [EMAIL PROTECTED] wrote:
 
  If you the css is a packagedresource, you don't need to do anything
  special. Just use relative url for the image and have the image in
  same folder than css.
 
 
 -
  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
 


 -
 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



-
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] wicket-contrib-tinymce-examples download

2007-04-16 Thread Igor Vaynberg

http://wicket-stuff.svn.sourceforge.net/viewvc/wicket-stuff/branches/wicket-1.3/

see wicket-contrib-tinymce as well as wicket-contrib-tinymce-examples

-igor


On 4/16/07, Andrew Moore [EMAIL PROTECTED] wrote:



I've downloaded wicket tinymce from sourceforge, but cannot find anywhere
that the download of the examples is available. The wicket stuff wiki
points
at a view of cvs, but it doesn't I just get a page not found error. (I
also
can't connect using cvs to check it out as described at the page here
http://cwiki.apache.org/WICKET/wicket-stuff.html)

Does anyone know where the examples can be downloaded from, or does anyone
have an example of what's needed to get tinymce working in place of a
textarea?

Cheers
Andrew
--
View this message in context:
http://www.nabble.com/wicket-contrib-tinymce-examples-download-tf3584332.html#a10015677
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

-
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] Wicket manager resources inside Javascript and Css files

2007-04-16 Thread Paolo Di Tommaso

Yes, for example in a JavaScript could be common to have something like
that:

document.getElementById('a-image-element').src =
'/path-to-image/resource.gif';

Anyway I've solved using in the JavaScript a CSS class, so reconducing the
the previous case.

Thanks Paolo


On 4/16/07, Matej Knopp [EMAIL PROTECTED] wrote:


What do you mean in javascript file, can you make an example?

-Matej

On 4/16/07, Paolo Di Tommaso [EMAIL PROTECTED] wrote:
 Really .. I didn't know that. Great!

 But how to do with resource path in javascript file ?


 Thanks, Paolo


 On 4/16/07, Matej Knopp  [EMAIL PROTECTED] wrote:
 
  If you the css is a packagedresource, you don't need to do anything
  special. Just use relative url for the image and have the image in
  same folder than css.
 
 

-
  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
 



-
 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



-
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

-
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] Problem setting selected value in DropDownChoice

2007-04-16 Thread Igor Vaynberg

set a breakpoint in

protected boolean isSelected(final Object object, int index, String
selected)

and see why true is not being returned.

-igor


On 4/16/07, V. Jenks [EMAIL PROTECTED] wrote:



Yeah, I've tried that also, it just isn't working...no idea why.

Here's what I have, using your suggestion...and I've walked through the
debugger to make sure the date is there, the value is definitely not null.
I must be missing something obvious and simple because it doesn't select
the
correct date:

public class CheckoutPanel extends Panel
{
public CheckoutPanel(String id)
{
super(id);

//get cart from session
final ShoppingCartLocal cart =
((UserSession)getSession()).getCart();

Date arrivalDate = null;

if (cart.getOrder().getEstArrivalDate() != null)
arrivalDate = cart.getOrder().getEstArrivalDate();

CheckoutInput input = new CheckoutInput();
input.setArrivalDate(arrivalDate);

//create form
add(new CheckoutForm(checkoutForm, cart, input));
}

private final class CheckoutForm extends Form
{
private CheckoutForm(String id, final ShoppingCartLocal
cart,
CheckoutInput input)
{
super(id, new CompoundPropertyModel(input));

//create dropdown w/ days List
DropDownChoice arrivalChoices = new
DropDownChoice(arrivalDate, days)
{
protected String getDefaultChoice(final
Object selected)
{
return ; //get rid of Choose
One default
}
};

//override key/value in dropdown
arrivalChoices.setChoiceRenderer(new
IChoiceRenderer()
{
public String getIdValue(Object object,
int index)
{
return object.toString();
}

public String getDisplayValue(Object
object)
{
//format differently for display,
i.e. Thu, Mar 2
return
DateTime.getCartDateFormatString(object.toString());
}
});

//add dropdown to form
add(arrivalChoices);
}
}
}


ptrthomas wrote:

 Instead of pre-loading in the input field, try pre-loading the property
in
 your form backing object (model) - so call setArrivalDate() or just
ensure
 that PaymentInfoInput.arrivalDate is not null

 On 4/7/07, V. Jenks [EMAIL PROTECTED] wrote:


 I feel like I've asked this question before...but here I am again.  I'm
 simply trying to set a selected value for a DropDownChoice when a page
is
 loaded.

 I've tried pre-loading it into the input class, setting it in
 getDefaultChoice, and also by trying to pass a model into the control
w/
 the
 value in the getObject method.  I'm sure it's a simple thing but the
 DropDownChoice is tricky at times...for me anyhow.

 Here's my control:

 //get calendar days (buffer by 2 days  go 1
 month
 ahead)
 ListString days =
 DateTime.getDaysListForward(2,
 1, true);

 //create dropdown w/ days List
 DropDownChoice arrivalChoices = new
 DropDownChoice(arrivalDate, days)
 {
 protected String getDefaultChoice(final
 Object selected)
 {
 return ; //get rid of Choose
 One default
 }
 };

 //override key/value in dropdown
 arrivalChoices.setChoiceRenderer(new
 IChoiceRenderer()
 {
 public String getIdValue(Object object,
 int index)
 {
 return object.toString();
 }

 public String getDisplayValue(Object
 object)
 {
 //format differently for
display,
 i.e. Thu, Mar 2
 return
 DateTime.getCartDateFormatString(object.toString());
 }
 });

 It simply loads a list of strings that are converted dates, they look
 like

 Fri, Mar 6, Sat, Mar 7, etc.

 The form input class looks like this:

 public class PaymentInfoInput implements 

Re: [Wicket-user] Wicket manager resources inside Javascript and Css files

2007-04-16 Thread Eelco Hillenius
 document.getElementById('a-image-element').src =
 '/path-to-image/resource.gif';

Also by relatively addressing those images. There are quite a few
components that do this (for instance wicket-datetime's DatePicker
component).

Eelco

-
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] Wicket manager resources inside Javascript and Css files

2007-04-16 Thread Paolo Di Tommaso

Really ?! .. but in which version has been implemented.

I'm using Wicket 1.2.3 and adding a javascript using the following code:

add( new JavaScriptReference(sortable_js, new
ResourceReference(getClass(),sortable/sortabletable.js)))

Is not translating the path for relative resources ..


Thanks, Paolo



On 4/16/07, Eelco Hillenius [EMAIL PROTECTED] wrote:


 document.getElementById('a-image-element').src =
 '/path-to-image/resource.gif';

Also by relatively addressing those images. There are quite a few
components that do this (for instance wicket-datetime's DatePicker
component).

Eelco

-
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

-
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] Two-panel selector component?

2007-04-16 Thread BPnwn

Do any of the wicket libraries or extensions have a two-panel selector
component? This is also known as a list builder. It consists of two
side-by-side lists and buttons to move items from one list to the other.

A simple example (not mine) can be seen at:

http://www-opale.inrialpes.fr/sinus/cast/manual/Images/parameterFile.gif 

Here's another example from Outlook:

http://www.nabble.com/file/7896/two%20panel%20selector%20from%20outlook.PNG 

Any pointers as to how to create such a component would be appreciated.
Thanks,
Julian

-- 
View this message in context: 
http://www.nabble.com/Two-panel-selector-component--tf3585965.html#a10020921
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] Two-panel selector component?

2007-04-16 Thread Nick Heudecker

I think this component exists in wicket-extensions.  I believe it's called
Pallet.

On 4/16/07, BPnwn [EMAIL PROTECTED] wrote:



Do any of the wicket libraries or extensions have a two-panel selector
component? This is also known as a list builder. It consists of two
side-by-side lists and buttons to move items from one list to the other.

A simple example (not mine) can be seen at:

http://www-opale.inrialpes.fr/sinus/cast/manual/Images/parameterFile.gif

Here's another example from Outlook:


http://www.nabble.com/file/7896/two%20panel%20selector%20from%20outlook.PNG

Any pointers as to how to create such a component would be appreciated.
Thanks,
Julian

--
View this message in context:
http://www.nabble.com/Two-panel-selector-component--tf3585965.html#a10020921
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





--
Nick Heudecker
Professional Wicket Training  Consulting
http://www.systemmobile.com

Eventful - Intelligent Event Management
http://www.eventfulhq.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] Wicket manager resources inside Javascript and Css files

2007-04-16 Thread Igor Vaynberg

in wicket 1.2.3 we do not allow default access to packaged resources without
explicitly adding a shared resource do we? i think that is the problem. his
css is a shared resource, but everything alongside it is not. so this would
for in 1.3 but not in 1.2.3.

in 1.2.3 he has to manually add all the files to shared resources.

-igor


On 4/16/07, Eelco Hillenius [EMAIL PROTECTED] wrote:


I guess I assumed to much then, and CSS really is the supported case.
It doesn't make much sense to me why CSS would and JavaScript wouldn't
work though. I haven't investigated this very deeply tbh. Maybe we
should create a test case or quick start for this and see what we can
do.

Eelco


On 4/16/07, Paolo Di Tommaso [EMAIL PROTECTED] wrote:
 This is very strange because I've all files (css, js, and images) all in
the
 same path.

 From the CSS I'm referencing two images using the url(..) attribute with
a
 relative path. This works fine.

 From the JS I'm referencing another image in the same path of the
 javascript, so using a:

 image.src = 'relative-image.jpg'


 But in this case the image is broke, looking at the server log I can see
 that the image path is not translated under the wicket 'resource/...'
path.

 Both the css and js are added in the same way ..

 add( new StyleSheetReference(sortable_css, new
 ResourceReference(WorkflowListPage.class
,sortable/sortabletable.css)));

 add( new JavaScriptReference(sortable_js, new
 ResourceReference(
 WorkflowListPage.class,sortable/sortabletable.js)));



 Thanks, Paolo



 On 4/16/07, Eelco Hillenius  [EMAIL PROTECTED] wrote:
 
   Really ?! .. but in which version has been implemented.
  
   I'm using Wicket 1.2.3 and adding a javascript using the following
code:
 
  That's a very old version. But look at the datepicker in extensions
  for that project, as that uses relative images from JavaScript.
 
   add( new JavaScriptReference(sortable_js, new
  
 ResourceReference(getClass(),sortable/sortabletable.js)))
 
  Be *very* careful using getClass() there. Are you sure the actual
  class isn't a subclass of the class you really want? Try to use
  MyClass.class in resource references.
 
   Is not translating the path for relative resources ..
 
  If your javascript file is served from /resources/... then everything
  that is declared relatively should go through that as weell.
 
 

-
  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
 



-
 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



-
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

-
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] Wicket manager resources inside Javascript and Css files

2007-04-16 Thread Eelco Hillenius
On 4/16/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
 in wicket 1.2.3 we do not allow default access to packaged resources without
 explicitly adding a shared resource do we? i think that is the problem. his
 css is a shared resource, but everything alongside it is not. so this would
 for in 1.3 but not in 1.2.3.

Duh! Indeed. I completely forgot about that.

Eelco

-
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] null model object for custom form component

2007-04-16 Thread Carlos Pita
Hi all,

I'm getting a null model object error when submitting a form that
includes a date form macro-component that is a composite of simple
drop down fields for year, month and day. This custom component model
is initialized to be a compound model of a (not null) date passed as
argument:

  public DateComponent(String id, Date date) {
super(id, new CompoundPropertyModel(date));
 
  }

The sub components are then created as:

new DropDownChoice(day, getRange(...), renderer);
new DropDownChoice(month, getRange(...), renderer);
new DropDownChoice(year, getRange(...), renderer);

But during form submission I get the error trace quoted below, as if
the compound model is not being taken into account for the children
updateModel():

WicketMessage: Null object setting value: 16 with expression: day

Root cause:

org.apache.wicket.WicketRuntimeException: Null object setting value:
16 with expression: day
at 
org.apache.wicket.util.lang.PropertyResolver.setValue(PropertyResolver.java:123)
at 
org.apache.wicket.model.AbstractPropertyModel.setObject(AbstractPropertyModel.java:152)
at org.apache.wicket.Component.setModelObject(Component.java:2057)
at 
org.apache.wicket.markup.html.form.FormComponent.updateModel(FormComponent.java:724)
at org.apache.wicket.markup.html.form.Form$10.validate(Form.java:982)
at 
org.apache.wicket.markup.html.form.Form$ValidationVisitor.formComponent(Form.java:167)
at org.apache.wicket.markup.html.form.Form$4.component(Form.java:542)
at org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:793)
at org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:808)

Am I missing something?

TIA.
Cheers,
Carlos

-
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] null model object for custom form component

2007-04-16 Thread Carlos Pita
Sorry, now I see what was happening, I had to get rid of the outer
updateModel because it was changing the date model to null:

public void updateModel() {}

Cheers,
Carlos

On 4/16/07, Carlos Pita [EMAIL PROTECTED] wrote:
 Hi all,

 I'm getting a null model object error when submitting a form that
 includes a date form macro-component that is a composite of simple
 drop down fields for year, month and day. This custom component model
 is initialized to be a compound model of a (not null) date passed as
 argument:

   public DateComponent(String id, Date date) {
 super(id, new CompoundPropertyModel(date));
  
   }

 The sub components are then created as:

 new DropDownChoice(day, getRange(...), renderer);
 new DropDownChoice(month, getRange(...), renderer);
 new DropDownChoice(year, getRange(...), renderer);

 But during form submission I get the error trace quoted below, as if
 the compound model is not being taken into account for the children
 updateModel():

 WicketMessage: Null object setting value: 16 with expression: day

 Root cause:

 org.apache.wicket.WicketRuntimeException: Null object setting value:
 16 with expression: day
 at 
 org.apache.wicket.util.lang.PropertyResolver.setValue(PropertyResolver.java:123)
 at 
 org.apache.wicket.model.AbstractPropertyModel.setObject(AbstractPropertyModel.java:152)
 at org.apache.wicket.Component.setModelObject(Component.java:2057)
 at 
 org.apache.wicket.markup.html.form.FormComponent.updateModel(FormComponent.java:724)
 at org.apache.wicket.markup.html.form.Form$10.validate(Form.java:982)
 at 
 org.apache.wicket.markup.html.form.Form$ValidationVisitor.formComponent(Form.java:167)
 at org.apache.wicket.markup.html.form.Form$4.component(Form.java:542)
 at org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:793)
 at org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:808)

 Am I missing something?

 TIA.
 Cheers,
 Carlos


-
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] Two-panel selector component?

2007-04-16 Thread JulianS


Nick Heudecker wrote:
 
 I think this component exists in wicket-extensions.  I believe it's called
 Pallet.
 

Excellent, thank you. The problem is the name: I would never associate the
name Palette with such a component.

Julian

-- 
View this message in context: 
http://www.nabble.com/Two-panel-selector-component--tf3585965.html#a10021925
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] have wicket ignoring compononts/tags

2007-04-16 Thread Sven Meier
Take a look on IComponentResolver.
If your Page implements this interface, it can serve optional components 
requested by the markup or it can serve hidden components in case you 
want to exclude something from some targets.

Sven

Jan Kriesten wrote:
 hi,

 is it possible to have wicket configured to ignore references which can't be
 resolved?

 e.g. trying to add a component which doesn't exist in the markup (ok, this 
 could
 be done by catching the thrown exception, but only if the 'add'-method is 
 used)
 or not adding a component which is referenced in the markup.

 background: i have different targets to publish from the same content system.
 not all targets need all information displayed, so some markup files miss
 certain id's (same classes are used, markup used is decided by the target to
 publish to).

 another use-case would be having generic markup files which are used as
 'default', containing more wicket-tags than actually served by the 
 corresponding
 class.

 optimal would be a page-based property

 greets from sunny hamburg! :-)

 --- jan.



 -
 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

   


-
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] Wicket (1.2.4) TabbedPanel Guidance Question

2007-04-16 Thread Igor Vaynberg

make the thing that presents the result a panel

then just

class MyTab extends AbstractTab {
 private final char start,end;
 public MyTab(char start, char end) {
this.start=start;this.end=end;
super(new Model(start+-+end));
  }
  public Panel getPanel(String id) {
  return new ResultsPanel(id, start, end);
   }
}


List tabs=new ArrayList();
tabs.add(new MyTab('a','k'));
tabs.add(new MyTab('l','z'));
add(new TabbedPanel(tabs, tabs));

and yer done

-igor


On 4/16/07, pwillemann [EMAIL PROTECTED] wrote:



Hello everyone:

I have a MySQL database with names of people.  I have created a facade
class
which will retrieve all the people whose last name starts with a
particular
letter or group of letters .  I have all this working just fine.   I can
get
all of this to come to a web page and display in a table with no problem

What I want to do is create a tabbed panel with several tabs.  Each tab
would represent a group of letters (A-K, L-R for example) for the people's
last name in my database.  My confusion comes when I have to create the
classes and html files for the tabs.  I want to create one Java class (the
one I already have) and hook it to one html page template.   Then simply
pass in the range of letters for each tab and display the tabs.

I don't want to have x number of html files for x number of tabs.   I also
don't want to have to create a separate class for each tab.  The examples
I
see seem to do this and I believe this is a maintenance nightmare.

Does any one I have any guidance?  I am currently looking at fragments.
This seems like it might make it easier to do one html class, but I don't
think it addresses my desire for one Java class

Thanks

Phil Willemann


--
View this message in context:
http://www.nabble.com/Wicket-%281.2.4%29-TabbedPanel-Guidance-Question-tf3587043.html#a10024104
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

-
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] Two-panel selector component?

2007-04-16 Thread Thomas R. Corbin
On Monday, 16 April 2007 01:46 pm, Al Maw escreveu:
 JulianS wrote:
  I think this component exists in wicket-extensions.  I believe it's
  called Pallet.
 
  Excellent, thank you. The problem is the name: I would never associate
  the name Palette with such a component.

 And what would you call it?

ShuttleList.

But that's because that's what someone else called a swing widget like 
that 
which we used.


 TwoPanelSelectorComponent is, IMHO, even less obvious. :)

 Besides, it apparently means one of these:
   - http://designinginterfaces.com/Two-Panel_Selector

 You may find it useful to look at the wicket-examples project.

 It does have sample code for all this stuff, which should make it
 somewhat discoverable:
 http://www.wicket-library.com/wicket-examples/compref?wicket:bookmarkablePa
ge=:wicket.examples.compref.PalettePage

 Best regards,

 Al Maw

 -
 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

-
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] More than one wicket:child

2007-04-16 Thread Daniel Stoch




Thanks for your suggestions.
I have only one question to your answer: I don't understand why you are
talking about multiple inheritance in java? I don't think it is
necessary here (all wicket:child tags are placed in the same
parent class and each of these tags exists in different leaf of
component hierarchy tree or maybe I am misunderstood how does these
things work ;)). 

Daniel

Igor Vaynberg wrote:
since markup inheritance is closely tied to component
hieararchy and java does not support multiple inhertance we will not
either.
  
what you can do is easily done with panels or fragments.
  
the basepage can expose two or more factory methods and derived pages
can override them to swap in their own panels.
  
  
-igor
  
  
  On 4/16/07, Daniel Stoch [EMAIL PROTECTED] wrote:
  Ok,
I can use panels in this example but this is not a case here (maybe
I shouldn't use leftPanel and rightPanel names, which can suggest that I
should use Panels in this example ;)).

I am talking about markup inheritance

(http://wicket.sourceforge.net/ExampleMarkupInheritance.html):
"This is done using two special Wicket tags: wicket:child and
wicket:extend. In the super markup you define where the child
markup
should be put, and in the sub markup you delineate where the child
markup starts and ends."
But in all examples and in documentation there is possibilty to define

only one wicket:child tag per page. The use of murkup
inheritance will
be much more flexible, when I can define more than one "child" section.
It is something similar to concept of templates (eg. templates in

Dreamweaver where you can define editable regions): you make a base
template where you define several editable regions (child sections) and
then you can fill these regions with some content (by
wicket:exted) in

pages derived from this template.

Why I don't want to use panels? Because I am talking about situation
when usage of wicket:child and wicket:extend tags is
more natural
than usage of panels.

I hope now it is a little more clear :).

Daniel

Marc-Andre Houle wrote:
 Maybe what you are searching would be panel?Is there something
you
 that make that make panels not work for you?

 Maybe I just don't understand the question, but from what I seen,
 Panel is the way you should go... :)

 Marc


--

Dzwon za granice z komorki - 1,28 zl/min.
 http://link.interia.pl/f1a4c


-
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
  
  
  
  

-
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
  





--

Plan to po³owa sukcesu.

Sprawdz na  http://link.interia.pl/f1a41


-
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] More than one wicket:child

2007-04-16 Thread Igor Vaynberg

markup inheritance is tied to the class hieararchy of the component.

-igor


On 4/16/07, Daniel Stoch [EMAIL PROTECTED] wrote:


 Thanks for your suggestions.
I have only one question to your answer: I don't understand why you are
talking about multiple inheritance in java? I don't think it is necessary
here (all wicket:child tags are placed in the same parent class and each
of these tags exists in different leaf of component hierarchy tree or maybe
I am misunderstood how does these things work ;)).

Daniel

Igor Vaynberg wrote:

since markup inheritance is closely tied to component hieararchy and java
does not support multiple inhertance we will not either.

what you can do is easily done with panels or fragments.

the basepage can expose two or more factory methods and derived pages can
override them to swap in their own panels.

-igor


On 4/16/07, Daniel Stoch [EMAIL PROTECTED] wrote:

 Ok, I can use panels in this example but this is not a case here (maybe
 I shouldn't use leftPanel and rightPanel names, which can suggest that I
 should use Panels in this example ;)).

 I am talking about markup inheritance
 (http://wicket.sourceforge.net/ExampleMarkupInheritance.html):
 This is done using two special Wicket tags: wicket:child and
 wicket:extend. In the super markup you define where the child markup
 should be put, and in the sub markup you delineate where the child
 markup starts and ends.
 But in all examples and in documentation there is possibilty to define
 only one wicket:child tag per page. The use of murkup inheritance will
 be much more flexible, when I can define more than one child section.
 It is something similar to concept of templates (eg. templates in
 Dreamweaver where you can define editable regions): you make a base
 template where you define several editable regions (child sections) and
 then you can fill these regions with some content (by wicket:exted) in

 pages derived from this template.

 Why I don't want to use panels? Because I am talking about situation
 when usage of wicket:child and wicket:extend tags is more natural
 than usage of panels.
 I hope now it is a little more clear :).

 Daniel

 Marc-Andre Houle wrote:
  Maybe what you are searching would be panel?  Is there something you
  that make that make panels not work for you?
 
  Maybe I just don't understand the question, but from what I seen,
  Panel is the way you should go... :)
 
  Marc


 --
 Dzwon za granice z komorki - 1,28 zl/min.
  http://link.interia.pl/f1a4c



 -
 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


--

-
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
[EMAIL PROTECTED]://lists.sourceforge.net/lists/listinfo/wicket-user


 --
Plan to po³owa sukcesu.
Sprawdz na  http://link.interia.pl/f1a41
-
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


-
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] Issue with redirection to intro page after logout

2007-04-16 Thread ZedroS Schwart
Hi all

I've been struggling for a few hours to do a redirection after a logout.

I've looked at many places, including this one :
http://www.nabble.com/how-to-display-login-page-after-logout--tf2135329.html#a5892867

However, nothing works.

Indeed, my line urlFor(IntroPage.class, null).toString() ; returns
../public/IntroPage and not the full path
http://localhost:8080/test/app/public/IntroPage;.

I didn't find a way to grab the full path, but clearly I'm missing
something. Could you please show me what.

Thanks in advance
ZedroS

-
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] Wicket (1.2.4) TabbedPanel Guidance Question

2007-04-16 Thread pwillemann

I have the following:

1.)  TabbedPanelPage.java panel page with 4 tabs (in my case PlayersTab)
2.)  PlayersTab.java file which will do a getPanel to return a PlayersPanel. 
PlayersPanel is derived from Panel.  
3.)  PlayersPanel.java file which is the facade class to my MySQL database. 
I use a line like this 

add(new ListView(rows,players) {  ... to attach the database data to the
wicket:id rows

4.)  PlayersPanel.html which is essentially just a wicket:panel wrapper
around a table of data
5.)  TabbledPanelPage.html whose main part is:
 wicket:extend
p
div wicket:id=tabs class=tabpanel[tabbed panel will be
here]/div
/p
/wicket:extend 

I expect the TabbedPanelPage to have 4 tabs - each tab being constructed
from the PlayersPanel etc,..
I believe all this is correct however when I navigate to the TabbedPanelPage
html page it is unable to get access to rows

I get an error message that says basically this:

...but that you either did not add the component to your page at all, or
that the hierarchy does not match.

There is obviously a disconnect.  I don't believe TabbedPanelPage should
have to know about rows (the reason why I did the facade in the first
place.), however how can I get the TabbedPanelPage to let PlayersPanel do
the work?

Thanks

Phil





 
-- 
View this message in context: 
http://www.nabble.com/Wicket-%281.2.4%29-TabbedPanel-Guidance-Question-tf3587043.html#a10028146
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] Listview listitem onchange

2007-04-16 Thread wicketmarsh

Hi

I am using Listview  to render a list of TextField.  I would like to add
onchnage event on textfield so that any change in textfield value would make
other components invisible which are  part the form.

Inside the form I tried to access the children of listview component but it
return null. 


thanks in advance.
pradip


-- 
View this message in context: 
http://www.nabble.com/Listview-listitem-onchange-tf3588422.html#a10028153
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] Wicket (1.2.4) TabbedPanel Guidance Question

2007-04-16 Thread Igor Vaynberg

show us all the relevant sources and markup, i cant really tell what exactly
is going on from your description.

one thing i can think of is maybe you are not creating the panel with the
right id

as in Panel ITab.getPanel(String panelId) {
 // make sure you are creating the tabpanel with the proper id that is
passed in
 return new MyPanel(panelId); }

-igor


On 4/16/07, pwillemann [EMAIL PROTECTED] wrote:



I have the following:

1.)  TabbedPanelPage.java panel page with 4 tabs (in my case PlayersTab)
2.)  PlayersTab.java file which will do a getPanel to return a
PlayersPanel.
PlayersPanel is derived from Panel.
3.)  PlayersPanel.java file which is the facade class to my MySQL
database.
I use a line like this

add(new ListView(rows,players) {  ... to attach the database data to the
wicket:id rows

4.)  PlayersPanel.html which is essentially just a wicket:panel wrapper
around a table of data
5.)  TabbledPanelPage.html whose main part is:
wicket:extend
p
div wicket:id=tabs class=tabpanel[tabbed panel will
be
here]/div
/p
/wicket:extend

I expect the TabbedPanelPage to have 4 tabs - each tab being constructed
from the PlayersPanel etc,..
I believe all this is correct however when I navigate to the
TabbedPanelPage
html page it is unable to get access to rows

I get an error message that says basically this:

...but that you either did not add the component to your page at all, or
that the hierarchy does not match.

There is obviously a disconnect.  I don't believe TabbedPanelPage should
have to know about rows (the reason why I did the facade in the first
place.), however how can I get the TabbedPanelPage to let PlayersPanel do
the work?

Thanks

Phil






--
View this message in context:
http://www.nabble.com/Wicket-%281.2.4%29-TabbedPanel-Guidance-Question-tf3587043.html#a10028146
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

-
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] Listview listitem onchange

2007-04-16 Thread Igor Vaynberg

you should do this through javascript, it would be kinda insane to do a
roundtrip in textfield.onchange to do something like this.

-igor


On 4/16/07, wicketmarsh [EMAIL PROTECTED] wrote:



Hi

I am using Listview  to render a list of TextField.  I would like to add
onchnage event on textfield so that any change in textfield value would
make
other components invisible which are  part the form.

Inside the form I tried to access the children of listview component but
it
return null.


thanks in advance.
pradip


--
View this message in context:
http://www.nabble.com/Listview-listitem-onchange-tf3588422.html#a10028153
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

-
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] Wicket (1.2.4) TabbedPanel Guidance Question

2007-04-16 Thread pwillemann

Here is the code from the relevant java and html files.


TabbedPanelPage.java  as follows:

public class TabbedPanelPage extends BasePage {
   
public TabbedPanelPage() {
setModel(new Model(tabpanel));

//  A-G,  H-N,  O-S,   T-Z
// create a list of ITab objects used to feed the tabbed panel

List tabs = new ArrayList();
tabs.add(new PlayersTab(A,G));
tabs.add(new PlayersTab(H,N));
tabs.add(new PlayersTab(O,S));
tabs.add(new PlayersTab(T,Z));

   // add the tabbed panel to the webpage
add(new TabbedPanel(tabs,tabs));
}

**

PlayersTab.java as follows

public class PlayersTab extends AbstractTab {
private final String start;
private final String end;

public PlayersTab(String start, String end) {
super(new Model(start+-+end));
this.start = start;
this.end = end;

}
public Panel getPanel(String id) {
return new PlayersPanel(id,start,end);
}
 
**

PlayersPanel.java as follows:

public class PlayersPanel extends Panel {
private static Log log = LogFactory.getLog(PlayersPanel.class);
List players = null;
private HibernatePlayerFacade facade = new HibernatePlayerFacade();

public PlayersPanel(String id, String start, String end) {
super(id);
try {
players = facade.listPlayers(start, end);

add(new ListView(rows,players) {   

protected void populateItem(ListItem item) {
final Player player = (Player)item.getModelObject();
item.add(new Label(ID,player.getID().toString())); 
item.add(new Label(FirstName,player.getFirstName()));
item.add(new Label(LastName,player.getLastName()));
item.add(new Label(Suffix,player.getSuffix()));
}
});
  

} catch (DatabaseException ex) {
ex.printStackTrace();
}
}
**


TabbedPanelPage.html  as follows:

**
html xmlns=http://www.w3.org/1999/xhtml;
head
typical style sheets.
/head
body
wicket:extend
p
div wicket:id=tabs class=tabpanel[tabbed panel will be
here]/div
/p
/wicket:extend  
/body 
/html

**
PlayersPanel.html
**
wicket:panel
table frame=box 
thead
tr
thID/th
thFirst Name /th
thLast Name/th
thSuffix/th
/tr
/thead
tbody
tr wicket:id=rows id=rows 
tdID/td
tdFirst Name/td
tdLast Name/td
tdSuffix/td
/tr
/tbody
/table  
/wicket:panel 
-- 
View this message in context: 
http://www.nabble.com/Wicket-%281.2.4%29-TabbedPanel-Guidance-Question-tf3587043.html#a10028634
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] Wicket (1.2.4) TabbedPanel Guidance Question

2007-04-16 Thread Igor Vaynberg

you never reference the labels you add to the listviewitem in the markup.

-igor


On 4/16/07, pwillemann [EMAIL PROTECTED] wrote:



Here is the code from the relevant java and html files.


TabbedPanelPage.java  as follows:

public class TabbedPanelPage extends BasePage {

public TabbedPanelPage() {
setModel(new Model(tabpanel));

//  A-G,  H-N,  O-S,   T-Z
// create a list of ITab objects used to feed the tabbed panel

List tabs = new ArrayList();
tabs.add(new PlayersTab(A,G));
tabs.add(new PlayersTab(H,N));
tabs.add(new PlayersTab(O,S));
tabs.add(new PlayersTab(T,Z));

   // add the tabbed panel to the webpage
add(new TabbedPanel(tabs,tabs));
}

**

PlayersTab.java as follows

public class PlayersTab extends AbstractTab {
private final String start;
private final String end;

public PlayersTab(String start, String end) {
super(new Model(start+-+end));
this.start = start;
this.end = end;

}
public Panel getPanel(String id) {
return new PlayersPanel(id,start,end);
}

**

PlayersPanel.java as follows:

public class PlayersPanel extends Panel {
private static Log log = LogFactory.getLog(PlayersPanel.class);
List players = null;
private HibernatePlayerFacade facade = new HibernatePlayerFacade();

public PlayersPanel(String id, String start, String end) {
super(id);
try {
players = facade.listPlayers(start, end);

add(new ListView(rows,players) {

protected void populateItem(ListItem item) {
final Player player = (Player)item.getModelObject();
item.add(new Label(ID,player.getID().toString()));
item.add(new Label(FirstName,player.getFirstName
()));
item.add(new Label(LastName,player.getLastName()));
item.add(new Label(Suffix,player.getSuffix()));
}
});


} catch (DatabaseException ex) {
ex.printStackTrace();
}
}
**


TabbedPanelPage.html  as follows:

**
html xmlns=http://www.w3.org/1999/xhtml;
head
typical style sheets.
/head
body
wicket:extend
p
div wicket:id=tabs class=tabpanel[tabbed panel will
be
here]/div
/p
/wicket:extend
/body
/html

**
PlayersPanel.html
**
wicket:panel
table frame=box 
thead
tr
thID/th
thFirst Name /th
thLast Name/th
thSuffix/th
/tr
/thead
tbody
tr wicket:id=rows id=rows 
tdID/td
tdFirst Name/td
tdLast Name/td
tdSuffix/td
/tr
/tbody
/table
/wicket:panel
--
View this message in context:
http://www.nabble.com/Wicket-%281.2.4%29-TabbedPanel-Guidance-Question-tf3587043.html#a10028634
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

-
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] Wicket (1.2.4) TabbedPanel Guidance Question

2007-04-16 Thread pwillemann

I posted the correct file however the forum is having problems with the span
command.  I changed span to sspan so you could see what I was doing:

wicket:panel
table frame=box 
thead
tr
thID/th
thFirst Name /th
thLast Name/th
thSuffix/th
/tr
/thead
tbody
tr wicket:id=rows id=rows 
tdsspan wicket:id=IDID/sspan/td
tdsspan wicket:id=FirstNameFirst Name/sspan/td
tdsspan wicket:id=LastNameLast Name/sspan/td
tdsspan wicket:id=SuffixSuffix/sspan/td
/tr
/tbody
/table  
/wicket:panel 

-- 
View this message in context: 
http://www.nabble.com/Wicket-%281.2.4%29-TabbedPanel-Guidance-Question-tf3587043.html#a10028735
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] Wicket (1.2.4) TabbedPanel Guidance Question

2007-04-16 Thread Igor Vaynberg

then all looks good to the naked eye. maybe the problem is elsewhere. that
error page should tell you which component did not render, no?

-igor


On 4/16/07, pwillemann [EMAIL PROTECTED] wrote:



I posted the correct file however the forum is having problems with the
span
command.  I changed span to sspan so you could see what I was doing:

wicket:panel
table frame=box 
thead
tr
thID/th
thFirst Name /th
thLast Name/th
thSuffix/th
/tr
/thead
tbody
tr wicket:id=rows id=rows 
tdsspan wicket:id=IDID/sspan/td
tdsspan wicket:id=FirstNameFirst Name/sspan/td
tdsspan wicket:id=LastNameLast Name/sspan/td
tdsspan wicket:id=SuffixSuffix/sspan/td
/tr
/tbody
/table
/wicket:panel

--
View this message in context:
http://www.nabble.com/Wicket-%281.2.4%29-TabbedPanel-Guidance-Question-tf3587043.html#a10028735
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

-
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