Re: convert wicket pages html to excel

2010-05-06 Thread Zilvinas Vilutis
+1 for POI ;)


Žilvinas Vilutis

Mobile:   (+370) 652 38353
E-mail:   cika...@gmail.com



On Wed, May 5, 2010 at 10:36 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 +1 for poi, used it, worked great

 -igor

 On Wed, May 5, 2010 at 10:31 PM, Adrian Wiesmann awiesm...@somap.org wrote:
 On 5/6/10 3:42 AM, Jeremy Thomerson wrote:

 I've done this before.  I'd actually suggest not doing this.  Use jexcel
 [1]
 - it is much more reliable and you won't have users calling you saying
 this
 spreadsheet won't open.

 I've written CSV before but then changed to Apache POI because of all those
 spreadsheet apps out there interpreting the separator character differently
 by default...

 Cheers,
 Adrian

 -
 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



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



Re: convert wicket pages html to excel

2010-05-06 Thread Ernesto Reinaldo Barreiro
Sometime ago, I have used both POI and jexcelAPI and I do prefer the
later. At least at that time, they both had the same limitation: Excel
file had to be generated in memory, which could be costly in terms of
server side resources.

If I recalled it correctly the problem with CSV was MS Excel
interpretation of CSV was not the default CSV definition.  So, I
remember having implemented options to export content the MS way and
the default way.

Ernesto



 I've written CSV before but then changed to Apache POI because of all those
 spreadsheet apps out there interpreting the separator character differently
 by default...

 Cheers,
 Adrian

 -
 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: wicketstuff-minis status?

2010-05-06 Thread nino martinez wael
It don't think it's your IDE that are causing trouble, they probably
broke something between mootools 1.1.1 to 1.2.4.

Did you discover something else than mootips? As mentioned earlier I
don't think the latest mootip supports mootools 1.2.4.. Reason why I
chose mootip in first place was because it was easy to integrate with
ajax..

2010/5/6 nmetzger nmetz...@odu.edu:

 It works for me, but I like using the newest libraries that are out there. I 
 tried copying your code to my project and using the new mootools libs, but 
 couldn't run it. Probably it's my IDE again.

 In short, if you have time to update it, it would be greatly appreciated. But 
 if not, it's no big deal either.

 Thanks,
 Natalie
 
 From: nino martinez wael [via Apache Wicket] 
 [ml-node+2131419-210954253-229...@n4.nabble.com]
 Sent: Wednesday, May 05, 2010 2:19 PM
 To: Metzger, Natalie J.
 Subject: Re: wicketstuff-minis status?

 Well I have nothing planed but as I dont think it'll take me long I'll
 look into and see i can do it soon. Are you needing it right now or?

 2010/5/3 nmetzger [hidden 
 email]/user/SendEmail.jtp?type=nodenode=2131419i=0:


 Hi Nino,

 is there any update planned for mootools 1.2.4?

 Thanks,
 Natalie
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/wicketstuff-minis-status-tp1867557p2124092.html
 Sent from the Wicket - User mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: [hidden 
 email]/user/SendEmail.jtp?type=nodenode=2131419i=1
 For additional commands, e-mail: [hidden 
 email]/user/SendEmail.jtp?type=nodenode=2131419i=2



 -
 To unsubscribe, e-mail: [hidden 
 email]/user/SendEmail.jtp?type=nodenode=2131419i=3
 For additional commands, e-mail: [hidden 
 email]/user/SendEmail.jtp?type=nodenode=2131419i=4



 
 View message @ 
 http://apache-wicket.1842946.n4.nabble.com/wicketstuff-minis-status-tp1867557p2131419.html
 To unsubscribe from Re: wicketstuff-minis status?, click 
 herehttp://apache-wicket.1842946.n4.nabble.com/subscriptions/Unsubscribe.jtp?code=bm1ldHpnZXJAb2R1LmVkdXwyMTI0MDkyfDE0MzE4ODE3Njg=.


 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/wicketstuff-minis-status-tp1867557p2131911.html
 Sent from the Wicket - User 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



Anyone at Geecon next week?

2010-05-06 Thread nino martinez wael
Should we have a small meetup?

regards Nino

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



Re: Math captcha with Wicket?

2010-05-06 Thread nino martinez wael
http://java.sun.com/docs/books/tutorial/2d/overview/rendering.html

:)

2010/5/4 Thomas Götz t...@richmountain.de:
 Thanks for your input, Igor! Looks nice, but I'd also like to have that as a
 rendered image, rather than plain text (security risk?).

   -Tom

 Igor Vaynberg wrote:

 off the top of my head

 -
 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:Message DefaultValue is not working?

2010-05-06 Thread MattyDE

I try to use:

thwicket:message key=Material
NumberMaterialnummer/wicket:message/th

but Unexpected RuntimeException: WicketMessage: Property 'Material Number'
not found in property files.


i thought if no property has been found the Default Materialnummer would
be used?

https://cwiki.apache.org/WICKET/wickets-xhtml-tags.html tells the same.

thanks in advance!


-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Message-DefaultValue-is-not-working-tp2132484p2132484.html
Sent from the Wicket - User 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



New blog post Refactoring wicket Pages to Components

2010-05-06 Thread Erwin Bolwidt

Hi,

I created a new blog posted titled Refactoring wicket Pages to Components

http://blog.worldturner.com/worldturner/entry/refactoring_wicket_pages_to_components 



It describes some issues that we ran into doing this refactoring, and is 
a logical sequal to my previous post on Components versus Pages. I also 
introduce two new useful components: GenericPanel and ComponentLink. 
This is the second post on the topic of Components versus Pages and the 
last one for now; next article will be about models.


Regards,
  Erwin Bolwidt

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



Re: Wicket:Message DefaultValue is not working?

2010-05-06 Thread Ernesto Reinaldo Barreiro
See IResourceSettings.setThrowExceptionOnMissingResource(final boolean
throwExceptionOnMissingResource). I think by default it is set to
true.

Ernesto

On Thu, May 6, 2010 at 1:47 PM, MattyDE ufer.mar...@gmail.com wrote:

 I try to use:

 thwicket:message key=Material
 NumberMaterialnummer/wicket:message/th

 but Unexpected RuntimeException: WicketMessage: Property 'Material Number'
 not found in property files.


 i thought if no property has been found the Default Materialnummer would
 be used?

 https://cwiki.apache.org/WICKET/wickets-xhtml-tags.html tells the same.

 thanks in advance!


 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Wicket-Message-DefaultValue-is-not-working-tp2132484p2132484.html
 Sent from the Wicket - User 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



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



How to use a DropDownChoice along with another form in a WizardStep

2010-05-06 Thread hpellan


Hello,
I am new to wicket. I am using WizardStep. I need to define a panel where I
select a hostname, the second part of the page is form allowing to display and
set a list of properties for the selected hostname.

my hostname 1 gets a varList of A,B.
my hostname 2 gets a varList of C,D,E.

When I select hostname 1, I get the A,B parameters displayed.
Then I select hostname 2, and I get A,B,E displayed instead of C,D,E !

I checked that setHostSelector(hostname2) set the varsList properly when called
the second time. But apparently wicket override the values with A,B values.

When I trace with wireshark what is going back and forth between client and
server I see that there is a POST done with hostname 2 PLUS the parameters A,B,
which I didn't modified by the way. So it sounds like after
setHostSelector(hostname 2) get called, the modification done in this setter are
overriden by
wicket.

How should I design this to get the correct job done ?


Here is a snippet of my code

Thanks for your help,
Herve

private final class CSIParamStep extends WizardStep
  {
public CSIParamStep()
{
  super();
  setTitleModel(new Model(my service config wizard));
  setModel(new CompoundPropertyModel(ServiceDeployWizard.this));
  CompoundPropertyModel sel = new
CompoundPropertyModel(toBeDeployedContainerList);
  DropDownChoice hostSelector = new DropDownChoice(hostSelector, sel);
  add(hostSelector);
  add(new Button(select)
  {
@Override
public void onSubmit()
{
}
  });

  Form varsForm = new Form(paramsForm, new
CompoundPropertyModel(varsList));
  ListView varsView = new ListView(varList, varsList);
  varsView.setReuseItems(true);
  varsForm.add(varsView);
  add(varsForm);
}
}

public void setHostSelector(String name)
  {
...
  varsList.clear();
  varsList.addAll((PropertyList) getMyvarList());

}


Then the corresponding html code is
wicket:panel
br

table class=params
tr
td class=paramValueinput wicket:id=select type=submit
value=select//td
/tr
/table

form wicket:id=paramsForm
table class=params
span wicket:id=varList
tr class=optionalAttribute
td class=paramValueinput wicket:id=key type=text//td
td class=paramValueinput wicket:id=value 
type=text//td
/tr
/span

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



Re: Wicket:Message DefaultValue is not working?

2010-05-06 Thread MattyDE

Thanks a lot! This works so nice ;)
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Message-DefaultValue-is-not-working-tp2132484p2132553.html
Sent from the Wicket - User 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



Help on multiple users implementation

2010-05-06 Thread Mathias Nilsson
Hi, I'm designing a Mediabase for a lot of customers. The old one is php and
java server but we are planning to update this and use Wicket, Spring,
Hibernate.

I'm having some design questions. Our web administrator must be able to add
Customers at runtime. The customer should have variations and their own
properties files for translations.

We Would like to do something like this http://mysolution/mycustomer. Where
mycustomer is the name of the company in the mediabase. is it possible to
add properties and variations at runtime without having to restart the
application. Any pointers on how to do this?


Re: Help on multiple users implementation

2010-05-06 Thread Ernesto Reinaldo Barreiro
Is OSGi option to be considered?

Ernesto

On Thu, May 6, 2010 at 3:57 PM, Mathias Nilsson
wicket.program...@gmail.com wrote:
 Hi, I'm designing a Mediabase for a lot of customers. The old one is php and
 java server but we are planning to update this and use Wicket, Spring,
 Hibernate.

 I'm having some design questions. Our web administrator must be able to add
 Customers at runtime. The customer should have variations and their own
 properties files for translations.

 We Would like to do something like this http://mysolution/mycustomer. Where
 mycustomer is the name of the company in the mediabase. is it possible to
 add properties and variations at runtime without having to restart the
 application. Any pointers on how to do this?


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



Wicket, IntelliJ and xml resource bundles

2010-05-06 Thread Thomas Götz
Any IntelliJ users out there that use Wicket and xml resource bundle 
files? I have the problem, that whenever I use something like:


wicket:message key=foosome text/wicket:message

in an html file, IntelliJ complains about not being able to resolve the 
property key. It works when using *.properties resource files, but I 
prefer xml. Is there a solution/workaround for this?


   -Tom

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



Re: Math captcha with Wicket?

2010-05-06 Thread Thomas Götz

nino martinez wael schrieb:

http://java.sun.com/docs/books/tutorial/2d/overview/rendering.html


Well, tanks ;-)
I was hoping to find some ready-to-be-used library/components that 
already does that ...


   -Tom

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



Re: Math captcha with Wicket?

2010-05-06 Thread Josh Glassman
Take a look at

http://wicket.apache.org/docs/1.4/org/apache/wicket/extensions/markup/html/captcha/CaptchaImageResource.html

You might need to override some of it, or make your own customized version
to get the text and look you want.  Looks like a good starting point at
least.

On Thu, May 6, 2010 at 10:08 AM, Thomas Götz t...@richmountain.de wrote:

 nino martinez wael schrieb:

  http://java.sun.com/docs/books/tutorial/2d/overview/rendering.html


 Well, tanks ;-)
 I was hoping to find some ready-to-be-used library/components that already
 does that ...

   -Tom


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




Re: Wicket, IntelliJ and xml resource bundles

2010-05-06 Thread James Carman
Are you using a Wicket plugin?

On Thu, May 6, 2010 at 10:06 AM, Thomas Götz t...@richmountain.de wrote:
 Any IntelliJ users out there that use Wicket and xml resource bundle files?
 I have the problem, that whenever I use something like:

 wicket:message key=foosome text/wicket:message

 in an html file, IntelliJ complains about not being able to resolve the
 property key. It works when using *.properties resource files, but I prefer
 xml. Is there a solution/workaround for this?

   -Tom

 -
 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, IntelliJ and xml resource bundles

2010-05-06 Thread Nick Heudecker
The Wicket plugin for IDEA doesn't support XML property bundles.

On Thu, May 6, 2010 at 8:32 AM, James Carman
jcar...@carmanconsulting.comwrote:

 Are you using a Wicket plugin?

 On Thu, May 6, 2010 at 10:06 AM, Thomas Götz t...@richmountain.de wrote:
  Any IntelliJ users out there that use Wicket and xml resource bundle
 files?
  I have the problem, that whenever I use something like:
 
  wicket:message key=foosome text/wicket:message
 
  in an html file, IntelliJ complains about not being able to resolve the
  property key. It works when using *.properties resource files, but I
 prefer
  xml. Is there a solution/workaround for this?
 
-Tom
 



Re: DateTextField and DatePicker returning wrong date

2010-05-06 Thread Jeremy Thomerson
If you think it's a bug, create a quickstart and attach it to JIRA.  Is it
similar to this? https://issues.apache.org/jira/browse/WICKET-2767

--
Jeremy Thomerson
http://www.wickettraining.com



On Wed, May 5, 2010 at 12:35 PM, taygolf taylor.a.yo...@gmail.com wrote:


 anyone have any help here? I really think this is a bug inside wicket but I
 may be doing something wrong. Any opinions would be greatly appreciated

 T
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/DateTextField-and-DatePicker-returning-wrong-date-tp2126267p2131360.html
 Sent from the Wicket - User 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: DateTextField and DatePicker returning wrong date

2010-05-06 Thread taygolf

no that is not the issue although I did see that issue and I am happy that it
is fixed.

My issue is that dealing with the boolean applyTimeZoneDifference for
PatternDateConverter. It doesn't matter if I set applyTimeZoneDifference to
true or false. The difference is still applied. I would like to not apply
the difference but it does not seem to be working.

I wanted to make sure I was not doing something wrong before I officially
called it a bug.

Has anyone else had issues with applyTimeZoneDifference when they try and
set it to false?

T
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DateTextField-and-DatePicker-returning-wrong-date-tp2126267p2132868.html
Sent from the Wicket - User 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, IntelliJ and xml resource bundles

2010-05-06 Thread Thomas Götz

No, I'm not currently using any Wicket plugin.

   -Tom


Nick Heudecker schrieb:

The Wicket plugin for IDEA doesn't support XML property bundles.

On Thu, May 6, 2010 at 8:32 AM, James Carman
jcar...@carmanconsulting.comwrote:


Are you using a Wicket plugin?

On Thu, May 6, 2010 at 10:06 AM, Thomas Götzt...@richmountain.de  wrote:

Any IntelliJ users out there that use Wicket and xml resource bundle

files?

I have the problem, that whenever I use something like:

wicket:message key=foosome text/wicket:message

in an html file, IntelliJ complains about not being able to resolve the
property key. It works when using *.properties resource files, but I

prefer

xml. Is there a solution/workaround for this?

   -Tom





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



Re: Math captcha with Wicket?

2010-05-06 Thread Thomas Götz

Thanks for the pointer!

   -Tom


Josh Glassman schrieb:

Take a look at

http://wicket.apache.org/docs/1.4/org/apache/wicket/extensions/markup/html/captcha/CaptchaImageResource.html

You might need to override some of it, or make your own customized version
to get the text and look you want.  Looks like a good starting point at
least.


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



Re: Wicket, IntelliJ and xml resource bundles

2010-05-06 Thread James Carman
Then the stuff you're seeing doesn't have anything to do with Wicket.
It's IntelliJ's I18N for Java plugin, I believe.  I wouldn't expect
it to understand wicket-specific stuff.

On Thu, May 6, 2010 at 12:26 PM, Thomas Götz t...@richmountain.de wrote:
 No, I'm not currently using any Wicket plugin.

   -Tom


 Nick Heudecker schrieb:

 The Wicket plugin for IDEA doesn't support XML property bundles.

 On Thu, May 6, 2010 at 8:32 AM, James Carman
 jcar...@carmanconsulting.comwrote:

 Are you using a Wicket plugin?

 On Thu, May 6, 2010 at 10:06 AM, Thomas Götzt...@richmountain.de  wrote:

 Any IntelliJ users out there that use Wicket and xml resource bundle

 files?

 I have the problem, that whenever I use something like:

 wicket:message key=foosome text/wicket:message

 in an html file, IntelliJ complains about not being able to resolve the
 property key. It works when using *.properties resource files, but I

 prefer

 xml. Is there a solution/workaround for this?

   -Tom



 -
 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: Math captcha with Wicket?

2010-05-06 Thread nino martinez wael
I know it was a dry spirited answer.. But have a look at jcaptcha or
simplecaptcha.. Both are built around servlets as far as I can see,
but they might offer a question / image engine also (so you can use it
directly with wicket)..

regards Nino

2010/5/6 Thomas Götz t...@richmountain.de:
 nino martinez wael schrieb:

 http://java.sun.com/docs/books/tutorial/2d/overview/rendering.html

 Well, tanks ;-)
 I was hoping to find some ready-to-be-used library/components that already
 does that ...

   -Tom

 -
 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, IntelliJ and xml resource bundles

2010-05-06 Thread Thomas Götz
You are right, I just thought there might be a solution for this anyway, 
some plugin that I don't know yet maybe (be it Wicket specific or for 
general use with IntelliJ/I18N/xml-files).


   -Tom


James Carman schrieb:

Then the stuff you're seeing doesn't have anything to do with Wicket.
It's IntelliJ's I18N for Java plugin, I believe.  I wouldn't expect
it to understand wicket-specific stuff.

On Thu, May 6, 2010 at 12:26 PM, Thomas Götzt...@richmountain.de  wrote:

No, I'm not currently using any Wicket plugin.

   -Tom


Nick Heudecker schrieb:

The Wicket plugin for IDEA doesn't support XML property bundles.

On Thu, May 6, 2010 at 8:32 AM, James Carman
jcar...@carmanconsulting.comwrote:


Are you using a Wicket plugin?

On Thu, May 6, 2010 at 10:06 AM, Thomas Götzt...@richmountain.dewrote:

Any IntelliJ users out there that use Wicket and xml resource bundle

files?

I have the problem, that whenever I use something like:

wicket:message key=foosome text/wicket:message

in an html file, IntelliJ complains about not being able to resolve the
property key. It works when using *.properties resource files, but I

prefer

xml. Is there a solution/workaround for this?

   -Tom


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



Re: CheckGroup and ListView

2010-05-06 Thread msalman

Well, I have tried using ListModel as following:

selectableValues = new ListViewSelectableValue(selectableValuesList, new
ListModelSelectableValue(list))
{
..
}

and then:

selectableValues.getModelObject().add(new 
SelectableValue(newId, value 
+ newId++));


without any success.  

BTW, do I also need to set the model for the CheckGroup as following?

checkGroupSelectableValues = new
CheckGroupSelectableValue(selectedValues,  new
CollectionModelSelectableValue(list));


I did not need to do this in my other application but in this application if
I don't do it then I get the model is null exception.  I thought that when I
add the ListView Object to the CheckGroup object then the model object is
set for CheckGroup.

The bottom line is that I can not make this thing what ever I tried.

Please help.  Thanks.

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/CheckGroup-and-ListView-tp1886879p2133161.html
Sent from the Wicket - User 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



Combo Box (help!)

2010-05-06 Thread Brian Mulholland
This is a second asking, so sorry if I am being impatient, but I was
hoping to see a response to this.

I've got a combo box with the list in a List of string arrays (code
and decode).  The bean has the currently selected code.  I created a
DropDownChoice with a custom ChoceRenderer as below.  The CR interface
is invoked for both the acquisition of the bean value and for each row
of the list, which is why the below code checks the type of object
coming in.

This works great when displaying, but when the value comes back to the
server, it is loaded back into the bean as
[Ljava.lang.String;@3c6f3c6f.  It looks like the Object.toString().
What am I doing wrong here?

DropDownChoice ddc = new DropDownChoice(id, new PropertyModel(bean,
id), listOfStringArrays, new IChoiceRenderer(){
   @Override
   public Object getDisplayValue(Object array) {
   if(array instanceof String)
   return (String) array;
   else if(array.getClass().isArray()){
   String[] result = (String[]) array;
   return result[1];
   }
   else
   throw new RuntimeException(Huh?);
   }

   @Override
   public String getIdValue(Object array, int arg1) {
   if(array instanceof String)
   return (String) array;
   else if(array.getClass().isArray())
   {
   String[] result = (String[]) array;
   return result[0];
   }
   else
   throw new RuntimeException(Huh?);
   }
});


-- 
Brian Mulholland

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



Re: Combo Box (help!)

2010-05-06 Thread Josh Glassman
[Ljava.lang.String;@HEX looks like you are stuffing an Array of Strings into
a String.  So, it calls String[].toString() and stuffs that into your
String, like so...  System.out.println(new String[] {string, array});.

I'm not real familiar with the choice renderer, so I'm not sure how this
would happen when your string gets loaded back in to your model.  Maybe
someone else has an idea?


Re: Combo Box (help!)

2010-05-06 Thread Martin Grigorov
Try with

@Override
   public String getIdValue(Object array, int arg1) {
  return Integer.toString(arg1);
   }

On Thu, 2010-05-06 at 15:44 -0400, Brian Mulholland wrote:
 This is a second asking, so sorry if I am being impatient, but I was
 hoping to see a response to this.
 
 I've got a combo box with the list in a List of string arrays (code
 and decode).  The bean has the currently selected code.  I created a
 DropDownChoice with a custom ChoceRenderer as below.  The CR interface
 is invoked for both the acquisition of the bean value and for each row
 of the list, which is why the below code checks the type of object
 coming in.
 
 This works great when displaying, but when the value comes back to the
 server, it is loaded back into the bean as
 [Ljava.lang.String;@3c6f3c6f.  It looks like the Object.toString().
 What am I doing wrong here?
 
 DropDownChoice ddc = new DropDownChoice(id, new PropertyModel(bean,
 id), listOfStringArrays, new IChoiceRenderer(){
@Override
public Object getDisplayValue(Object array) {
if(array instanceof String)
return (String) array;
else if(array.getClass().isArray()){
String[] result = (String[]) array;
return result[1];
}
else
throw new RuntimeException(Huh?);
}
 
@Override
public String getIdValue(Object array, int arg1) {
if(array instanceof String)
return (String) array;
else if(array.getClass().isArray())
{
String[] result = (String[]) array;
return result[0];
}
else
throw new RuntimeException(Huh?);
}
 });
 
 



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



Re: Combo Box (help!)

2010-05-06 Thread Thomas Kappler
On 05/06/2010 09:44 PM, Brian Mulholland wrote:
 This is a second asking, so sorry if I am being impatient, but I was
 hoping to see a response to this.
 
 I've got a combo box with the list in a List of string arrays (code
 and decode).  The bean has the currently selected code.  I created a
 DropDownChoice with a custom ChoceRenderer as below.  The CR interface
 is invoked for both the acquisition of the bean value and for each row
 of the list, which is why the below code checks the type of object
 coming in.
 
 This works great when displaying, but when the value comes back to the
 server, it is loaded back into the bean as
 [Ljava.lang.String;@3c6f3c6f.  It looks like the Object.toString().
 What am I doing wrong here?
 

The ChoiceRenderer is only used for the display of the options on the
page, not for saving. The IModel's setObject() is called then, which in
that case is the PropertyModel calling setId() on the bean, with the
current Object as argument. So you need to implement an IModel that's a
little more intelligent and basically does what the renderer does: pick
the first element if it's an array, the whole String otherwise.

From a design point of view it looks like this logic should maybe be in
the bean, or at least in a helper class so you can use it from both the
Model and the ChoiceRenderer.

-- Thomas


 DropDownChoice ddc = new DropDownChoice(id, new PropertyModel(bean,
 id), listOfStringArrays, new IChoiceRenderer(){
@Override
public Object getDisplayValue(Object array) {
if(array instanceof String)
return (String) array;
else if(array.getClass().isArray()){
String[] result = (String[]) array;
return result[1];
}
else
throw new RuntimeException(Huh?);
}
 
@Override
public String getIdValue(Object array, int arg1) {
if(array instanceof String)
return (String) array;
else if(array.getClass().isArray())
{
String[] result = (String[]) array;
return result[0];
}
else
throw new RuntimeException(Huh?);
}
 });
 
 


-- 
---
  Thomas Kapplerthomas.kapp...@isb-sib.ch
  Swiss Institute of Bioinformatics Tel: +41 22 379 51 89
  CMU, rue Michel Servet 1
  1211 Geneve 4
  Switzerland  http://www.uniprot.org
---

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



Re: CheckGroup and ListView

2010-05-06 Thread nino martinez wael
When using ajax you do have to add the listview again..

2010/5/6 msalman mohammad_sal...@yahoo.com:

 Well, I have tried using ListModel as following:

 selectableValues = new ListViewSelectableValue(selectableValuesList, new
 ListModelSelectableValue(list))
 {
 ..
 }

 and then:

                selectableValues.getModelObject().add(new 
 SelectableValue(newId, value 
 + newId++));


 without any success.

 BTW, do I also need to set the model for the CheckGroup as following?

 checkGroupSelectableValues = new
 CheckGroupSelectableValue(selectedValues,  new
 CollectionModelSelectableValue(list));


 I did not need to do this in my other application but in this application if
 I don't do it then I get the model is null exception.  I thought that when I
 add the ListView Object to the CheckGroup object then the model object is
 set for CheckGroup.

 The bottom line is that I can not make this thing what ever I tried.

 Please help.  Thanks.

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/CheckGroup-and-ListView-tp1886879p2133161.html
 Sent from the Wicket - User 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



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



Re: Caching menu

2010-05-06 Thread nino martinez wael
Id go for at pojo dao provider which then can cache the menu, and
just use that from your wicket menu components.. You could then use
something like ehcache, for caching..

2010/5/5 Wolfgang wolfgang.bue...@exedio.com:

 I'm working on a web site that has a menu bar with sub-items, and
 sub-sub-items. The configuration of this menu is computed from hilariously
 complex SQL queries and needs quite some time to be established. The menu
 looks different for each user (session) but stays the same for the lifetime
 of the session. So it's time for caching as this menu shows up on most of
 the pages.

 From other posts on this site I've taken that it's not a good idea to share
 the components that represent the menu among different pages. Now I wonder
 on which level I can cache and re-use objects.

 Is it advisable to share models (in the Wicket sense), i.e. store the menu
 models on the session and construct the menu components according to their
 information for every page?

 Or do I have to create separate, Wicket-independent data structures that
 hold the menu structure information and store it on the session or in the
 database?

 Or am I on a complete wrong track and should look for caching of the
 rendered HTML code on a component basis?

 Thanks in advance for sharing your knowledge/experience.

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Caching-menu-tp2130813p2130813.html
 Sent from the Wicket - User 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



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



Re: CheckGroup and ListView

2010-05-06 Thread msalman

Well, I have tried removing and then adding the ListView to the CheckGroup,
but that does not work either.  

I have tried to debug this as much as I could and I do see that there are
the right values in the java objects of ListView and the wrapped list.   To
me it looks like that the code that creates the html or the script is not
clearing the old values.  But that is just my guess.  

But hopefully I am just not doing some thing right and some one would please
point that out to me.


-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/CheckGroup-and-ListView-tp1886879p2133543.html
Sent from the Wicket - User 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: Strip header contributors from Ajax response.

2010-05-06 Thread Apple Grew
Hi All,

Thanks for all the responses. I got this solved by making my behavior extend
AbstractHeaderContributor. In its getHeaderContributors() I return the list
of headers only if response is not ajax. In case of ajax I simply return
null.

Regards,
Apple Grew
my blog @ http://blog.applegrew.com/


On Fri, Apr 30, 2010 at 3:44 AM, DV danielavalero...@gmail.com wrote:


 Another more complicated way seems to be using SharedResources and
 DynamicWebResources, an example of this, you can find it on
 UploadStatusResource class of
 wicket.extensions.ajax.markup.html.form.upload package
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Strip-header-contributors-from-Ajax-response-tp2019993p2076272.html
 Sent from the Wicket - User 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: CheckGroup and ListView

2010-05-06 Thread Jeremy Thomerson
create a quickstart and post it somewhere where we can get to it and someone
will help you

--
Jeremy Thomerson
http://www.wickettraining.com



On Thu, May 6, 2010 at 7:12 PM, msalman mohammad_sal...@yahoo.com wrote:


 Well, I have tried removing and then adding the ListView to the CheckGroup,
 but that does not work either.

 I have tried to debug this as much as I could and I do see that there are
 the right values in the java objects of ListView and the wrapped list.   To
 me it looks like that the code that creates the html or the script is not
 clearing the old values.  But that is just my guess.

 But hopefully I am just not doing some thing right and some one would
 please
 point that out to me.


 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/CheckGroup-and-ListView-tp1886879p2133543.html
 Sent from the Wicket - User 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