Re: Submit form with ajax on enter

2009-06-24 Thread John Patterson

Actually, I have just found that hitting return in the text field fires the
AjaxButton in Safari but in IE6 the form is submitted and the url changed
i.e. not ajax.  I guess Safari finds the first submit button and invokes
submit() whereas IE seems to bypass the handler.

I could write some script to capture the enter key and... do something.

But is there an easy out of the box way?


John Patterson wrote:
> 
> Thanks, I can see now that the presence of the AjaxButton intercepts the
> form submit and does exactly what I need.
> 
> 
> vineet semwal wrote:
>> 
>> you can use AjaxButton,AjaxFallbackButton,IndicatingAjaxButton.
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Submit-form-with-ajax-on-enter-tp24196732p24197752.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: Submit form with ajax on enter

2009-06-24 Thread John Patterson

Thanks, I can see now that the presence of the AjaxButton intercepts the form
submit and does exactly what I need.


vineet semwal wrote:
> 
> you can use AjaxButton,AjaxFallbackButton,IndicatingAjaxButton.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Submit-form-with-ajax-on-enter-tp24196732p24197546.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: Submit form with ajax on enter

2009-06-24 Thread vineet semwal
you can use AjaxButton,AjaxFallbackButton,IndicatingAjaxButton.

regards,
Vineet Semwal

On Thu, Jun 25, 2009 at 9:47 AM, John Patterson wrote:

> Hi, I have a single text box which I wan to be submitted by ajax when
> either the enter key is pressed or a submit button clicked.  Is there an
> easy way to submit the form or just the input when the return key is hit?
>
> Thanks,
>
> John
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Html mail with WicketTester

2009-06-24 Thread Martin Makundi
I wonder if there is  another way to capture wicket stream but
definitely you can just capture the url stream:

  public static byte[] getRemoteData(String urlString) {
try {
  URL url = new URL(urlString);
  HttpURLConnection uc = (HttpURLConnection) url.openConnection();
  try {
final int size;

InputStream inputStream;
{
  int tmp = uc.getContentLength();

  if (tmp < 0) {
inputStream = new BufferedInputStream(uc.getInputStream());
inputStream.mark(Integer.MAX_VALUE);
while (0 <= inputStream.read()) {
  // read
}
inputStream.reset();
size = inputStream.available();
  } else {
size = tmp;
inputStream = uc.getInputStream();
  }
}

int filled = 0;
byte[] imageData = new byte[size];
do {
  byte[] tmpData = new byte[size-filled];
  int read = inputStream.read(tmpData);
  System.arraycopy(tmpData, 0, imageData, filled, read);
  filled += read;
} while (filled < size);
return imageData;
  } finally {
uc.getInputStream().close();
uc.disconnect();
  }
} catch (IOException e) {
  Utils.errorLog(MarkupUtils.class, "Failed to load remote data", e);
}

return new byte[] {};
  }

**
Martin

2009/6/25 Martin Makundi 
>
> In my experience WicketTester works in a single thread only ... at
> least when I tried load testing with it it did not work. Ended up
> using HTTPUnit. Maybe that works for you too?
>
> **
> Martin
>
> 2009/6/25 Mathias Nilsson :
> >
> > I must add
> >
> > I have managed to get it to work by loading the applicationContext but that
> > initiates hibernate mapping etc and I do not want to do that
> > every 10th second
> >
> > UploadApplication webApp = new UploadApplication(){
> >                                //note in this case the application context 
> > is in the default
> > package
> >                                ApplicationContext context = new 
> > ClassPathXmlApplicationContext(
> >                                        new String[] 
> > {"applicationContext.xml"});
> >                               �...@override
> >                                public void init() {
> >                                        addComponentInstantiationListener(new
> > SpringComponentInjector(this, context));
> >                                    }
> >                        };
> >
> >                        WicketTester tester = new WicketTester( webApp );
> > --
> > View this message in context: 
> > http://www.nabble.com/Html-mail-with-WicketTester-tp24196423p24196515.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



Submit form with ajax on enter

2009-06-24 Thread John Patterson
Hi, I have a single text box which I wan to be submitted by ajax when  
either the enter key is pressed or a submit button clicked.  Is there  
an easy way to submit the form or just the input when the return key  
is hit?


Thanks,

John

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



Re: Html mail with WicketTester

2009-06-24 Thread Martin Makundi
In my experience WicketTester works in a single thread only ... at
least when I tried load testing with it it did not work. Ended up
using HTTPUnit. Maybe that works for you too?

**
Martin

2009/6/25 Mathias Nilsson :
>
> I must add
>
> I have managed to get it to work by loading the applicationContext but that
> initiates hibernate mapping etc and I do not want to do that
> every 10th second
>
> UploadApplication webApp = new UploadApplication(){
>                                //note in this case the application context is 
> in the default
> package
>                                ApplicationContext context = new 
> ClassPathXmlApplicationContext(
>                                        new String[] 
> {"applicationContext.xml"});
>                               �...@override
>                                public void init() {
>                                        addComponentInstantiationListener(new
> SpringComponentInjector(this, context));
>                                    }
>                        };
>
>                        WicketTester tester = new WicketTester( webApp );
> --
> View this message in context: 
> http://www.nabble.com/Html-mail-with-WicketTester-tp24196423p24196515.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: Html mail with WicketTester

2009-06-24 Thread Mathias Nilsson

I must add

I have managed to get it to work by loading the applicationContext but that
initiates hibernate mapping etc and I do not want to do that
every 10th second

UploadApplication webApp = new UploadApplication(){
//note in this case the application context is 
in the default
package
ApplicationContext context = new 
ClassPathXmlApplicationContext(
new String[] 
{"applicationContext.xml"});
@Override
public void init() {
addComponentInstantiationListener(new
SpringComponentInjector(this, context));
}
};

WicketTester tester = new WicketTester( webApp );
-- 
View this message in context: 
http://www.nabble.com/Html-mail-with-WicketTester-tp24196423p24196515.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



Html mail with WicketTester

2009-06-24 Thread Mathias Nilsson
Hi,

I'm trying to generate a wicket page in a thread using spring
ScheduledTimerTask
Every 10th second a timertask checks new mail and sends them.

My problem is that when using the WicketTester class the @SpringBean does
not work. I have tried and googled it but haven't found any good answers.
I can generete the html page when submitting a form but it takes to long
time so it needs to be done in a separate thread.

Any pointers?


Re: Adding attribute to body tag

2009-06-24 Thread John Patterson

I can see what I was doing wrong now.  I simply needed to add a wicket:id
attribute to the body and create a webmarkup container for the body tag. 

For some unknown reason I assumed the body tag was already attached to the
Page.

JD
-- 
View this message in context: 
http://www.nabble.com/Adding-attribute-to-body-tag-tp24178694p24195461.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: Adding attribute to body tag

2009-06-24 Thread John Patterson



Martin Funk-3 wrote:
> 
> 
> not to my knowledge & it works in trunk just like that.
> 
> 

I have trunk and still cannot add an attribute to the body tag.

In my page constructor I have 


add(new BodyTagAttributeModifier("class", 
Model.of("johniscool"), this));

but the attribute modifier is not even being run - when I put a break point
in the behaviours onComponentTag is is never hit.

I must be missing something.
-- 
View this message in context: 
http://www.nabble.com/Adding-attribute-to-body-tag-tp24178694p24195360.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



Creating a pdf using iText of JFreeChart

2009-06-24 Thread Patrick Fong
Hi 

I¹m stuck at creating pdfs of my JFreeCharts using iText. I want to create a
pdf of my JFreeChart which is encapsulated using wicket¹s Image
(http://cwiki.apache.org/WICKET/jfreechart-and-wicket-example.html).

There are the following links which I¹ve tried to use for my purpose
* 
http://cwiki.apache.org/WICKET/displaying-content-eg-pdf-excel-word-in-an-if
rame.html 
* 
http://markmail.org/search/?q=wicket+list%3Aorg.apache.wicket.users+pdf+itex
t#query:wicket%20list%3Aorg.apache.wicket.users%20pdf%20itext+page:1+mid:gbg
zhkgdkmfhbsiw+state:results

I¹ve also downloaded the iText book (referring to page 143 and 536).

Here is my code - http://pastie.org/523696.

I launch a Modal window with a link on the Modal window which downloads the
JFreeChartImage as a pdf file. The variable jfreechartimage is the
JFreeChartImage which also has a method getImagecontent which is an accessor
which contains the image as an array of bytes. This property variable is set
in the getImageData method (refer to the first jfreechart and wicket example
link). 

Have a look at lines 27-29. I get a IllegalStateException when I click on
the link. How do you create a pdf with bytes of the image?

Cheers
Patrick


CompoundPropertyModel and nested DataView

2009-06-24 Thread Hubbard, Bobby
I am a Wicket newbie and am currently struggling with
CompoundPropertyModel. I have found a lot on the list about
CompoundPropertyModel but not regarding this specific issue. I am
building a shopping cart. I have placed the cart's form inside a panel
and the cart items (via DataView) are inside the form. ShoppingCart is a
model that I would like to use to represent the current state of the
entire cart. It contains a array of ShoppingCartItem 's. However, when
running this, cartItems never gets set on the ShoppingCart model. While
debugging, cartItems is a child of the panelForm, but never gets
populated on the ShoppingCart pojo via CompoundPropertyModel. The form
does persist and if I traverse the panelForm object I could figure out
how to get to the ShoppingCartItem's...but I'd rather not. J

 

What am I missing? Is there a better way to do this? See code attached
below.

 

Thanks!!

 



...

public CartPanel(String id) {

  super(id);

  Form panelForm = new Form("panelForm", new
CompoundPropertyModel(new ShoppingCart())) {

@Override

protected void onSubmit() {

  // need to rewrite cookie on update

  ShoppingCart cart = (ShoppingCart) getModelObject();

  System.out.println(cart.getCartItems());// check if
cart items got populated

}

  };

  add(panelForm);

 

  IDataProvider dataProvider = new ShoppingCartItemsProvider();

  DataView dataView = new DataView("cartItems", dataProvider) {

@Override

protected void populateItem(final Item item) {

  final ShoppingCartItem cartItem = (ShoppingCartItem)
item

.getModelObject();

  item.add(new Label("itemName", cartItem.getName()));

  item.add(new TextField("quantity", new
ShoppingCartItemModel(

new Model(cartItem),
ShoppingCartItemType.QUANTITY)));

}

  };

  // add general text labels and buttons to the cart

  addFieldsAndButtons(panelForm);

  panelForm.add(dataView);

}...



 

Thanks!!

 


--
This e-mail and any attachments may contain confidential material for the sole 
use of the intended recipient. If you are not the intended recipient, please be 
aware that any disclosure, copying, distribution or use of this e-mail or any 
attachment is prohibited. If you have received this e-mail in error, please 
contact the sender and delete all copies.
Thank you for your cooperation.


Re: [announce] Wicket 1.4-RC5 released

2009-06-24 Thread Martijn Dashorst
couple of hours

On Wed, Jun 24, 2009 at 10:24 PM, Jeremy
Thomerson wrote:
> How long does that take to go into effect?  It's not out there yet.
>
> Thanks!
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
>
> On Wed, Jun 24, 2009 at 2:42 PM, Martijn
> Dashorst wrote:
>> I've exported the whole space. I think infra might be doing some
>> stuff. Confluence hasn't been updated in 3 years or so. They had to
>> re-implement the export plugin and upgrade the whole bunch. Perhaps
>> they are migrating stuff... I dunno
>>
>> Martijn
>>
>> On Wed, Jun 24, 2009 at 6:59 PM, Jeremy
>> Thomerson wrote:
>>> The sync must not be working.  I think there is a page on apache's
>>> wiki somewhere that says how it runs.  We should look into that.  I
>>> can't today.
>>>
>>> You can download it from the mirrors (but the links on the site to the
>>> mirrors aren't working):
>>> http://www.apache.org/dyn/closer.cgi/wicket/1.4-rc5
>>>
>>> It's out on the Maven repos:
>>> http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/wicket/wicket/1.4-rc5/
>>>
>>>
>>> --
>>> Jeremy Thomerson
>>> http://www.wickettraining.com
>>>
>>>
>>>
>>>
>>> On Wed, Jun 24, 2009 at 11:57 AM, Igor Vaynberg 
>>> wrote:
 as far as i know there is a sync that happens every couple of hours,
 so nothing else to do but edit the wiki page and wait. martijn may be
 able to shed more light on the issue.

 -igor

 On Wed, Jun 24, 2009 at 9:49 AM, Jeremy
 Thomerson wrote:
> Any committers know why my updates haven't appeared?  I was in a hurry
> - but my updates are shown within Confluence:
> http://cwiki.apache.org/confluence/pages/recentlyupdated.action?key=WICKETxSITE
>
> Was there some final step I forgot?
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
>
> On Wed, Jun 24, 2009 at 9:17 AM, Jeremy
> Thomerson wrote:
>> I did update the site - not sure why it hasn't appeared.
>>
>> Jeremy Thomerson
>> http://www.wickettraining.com
>> -- sent from a wireless device
>>
>>
>> -Original Message-
>> From: Johan Compagner 
>> Sent: Wednesday, June 24, 2009 6:07 AM
>> To: users@wicket.apache.org
>> Subject: Re: [announce] Wicket 1.4-RC5 released
>>
>> you do reply on an email with the subject "[announce] Wicket 1.4-RC5
>> released"
>>
>> so what bad could be happend here?
>>
>> I guess the website isnt updated yet.
>>
>> On Wed, Jun 24, 2009 at 12:55, Marcin Palka  
>> wrote:
>>
>>>
>>> Hi all,
>>>
>>> Did anything bad happen to the RC5? I mean I cannot see any anouncement
>>> about the release on the wicket.apache.org. Was the release been 
>>> canceled
>>> or
>>> delayed?
>>>
>>> cheers,
>>> Marcin
>>> --
>>> View this message in context:
>>> http://www.nabble.com/-announce--Wicket-1.4-RC5-released-tp24101241p24182619.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
>
>

 -
 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
>>>
>>>
>>
>>
>>
>> --
>> Become a Wicket expert, learn from the best: http://wicketinaction.com
>> Apache Wicket 1.3.5 is released
>> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
>>
>> -
>> 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
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.5 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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



Re: [announce] Wicket 1.4-RC5 released

2009-06-24 Thread Jeremy Thomerson
How long does that take to go into effect?  It's not out there yet.

Thanks!

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




On Wed, Jun 24, 2009 at 2:42 PM, Martijn
Dashorst wrote:
> I've exported the whole space. I think infra might be doing some
> stuff. Confluence hasn't been updated in 3 years or so. They had to
> re-implement the export plugin and upgrade the whole bunch. Perhaps
> they are migrating stuff... I dunno
>
> Martijn
>
> On Wed, Jun 24, 2009 at 6:59 PM, Jeremy
> Thomerson wrote:
>> The sync must not be working.  I think there is a page on apache's
>> wiki somewhere that says how it runs.  We should look into that.  I
>> can't today.
>>
>> You can download it from the mirrors (but the links on the site to the
>> mirrors aren't working):
>> http://www.apache.org/dyn/closer.cgi/wicket/1.4-rc5
>>
>> It's out on the Maven repos:
>> http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/wicket/wicket/1.4-rc5/
>>
>>
>> --
>> Jeremy Thomerson
>> http://www.wickettraining.com
>>
>>
>>
>>
>> On Wed, Jun 24, 2009 at 11:57 AM, Igor Vaynberg 
>> wrote:
>>> as far as i know there is a sync that happens every couple of hours,
>>> so nothing else to do but edit the wiki page and wait. martijn may be
>>> able to shed more light on the issue.
>>>
>>> -igor
>>>
>>> On Wed, Jun 24, 2009 at 9:49 AM, Jeremy
>>> Thomerson wrote:
 Any committers know why my updates haven't appeared?  I was in a hurry
 - but my updates are shown within Confluence:
 http://cwiki.apache.org/confluence/pages/recentlyupdated.action?key=WICKETxSITE

 Was there some final step I forgot?

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




 On Wed, Jun 24, 2009 at 9:17 AM, Jeremy
 Thomerson wrote:
> I did update the site - not sure why it hasn't appeared.
>
> Jeremy Thomerson
> http://www.wickettraining.com
> -- sent from a wireless device
>
>
> -Original Message-
> From: Johan Compagner 
> Sent: Wednesday, June 24, 2009 6:07 AM
> To: users@wicket.apache.org
> Subject: Re: [announce] Wicket 1.4-RC5 released
>
> you do reply on an email with the subject "[announce] Wicket 1.4-RC5
> released"
>
> so what bad could be happend here?
>
> I guess the website isnt updated yet.
>
> On Wed, Jun 24, 2009 at 12:55, Marcin Palka  
> wrote:
>
>>
>> Hi all,
>>
>> Did anything bad happen to the RC5? I mean I cannot see any anouncement
>> about the release on the wicket.apache.org. Was the release been canceled
>> or
>> delayed?
>>
>> cheers,
>> Marcin
>> --
>> View this message in context:
>> http://www.nabble.com/-announce--Wicket-1.4-RC5-released-tp24101241p24182619.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


>>>
>>> -
>>> 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
>>
>>
>
>
>
> --
> Become a Wicket expert, learn from the best: http://wicketinaction.com
> Apache Wicket 1.3.5 is released
> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
>
> -
> 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: [announce] Wicket 1.4-RC5 released

2009-06-24 Thread Martijn Dashorst
I've exported the whole space. I think infra might be doing some
stuff. Confluence hasn't been updated in 3 years or so. They had to
re-implement the export plugin and upgrade the whole bunch. Perhaps
they are migrating stuff... I dunno

Martijn

On Wed, Jun 24, 2009 at 6:59 PM, Jeremy
Thomerson wrote:
> The sync must not be working.  I think there is a page on apache's
> wiki somewhere that says how it runs.  We should look into that.  I
> can't today.
>
> You can download it from the mirrors (but the links on the site to the
> mirrors aren't working):
> http://www.apache.org/dyn/closer.cgi/wicket/1.4-rc5
>
> It's out on the Maven repos:
> http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/wicket/wicket/1.4-rc5/
>
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
>
> On Wed, Jun 24, 2009 at 11:57 AM, Igor Vaynberg 
> wrote:
>> as far as i know there is a sync that happens every couple of hours,
>> so nothing else to do but edit the wiki page and wait. martijn may be
>> able to shed more light on the issue.
>>
>> -igor
>>
>> On Wed, Jun 24, 2009 at 9:49 AM, Jeremy
>> Thomerson wrote:
>>> Any committers know why my updates haven't appeared?  I was in a hurry
>>> - but my updates are shown within Confluence:
>>> http://cwiki.apache.org/confluence/pages/recentlyupdated.action?key=WICKETxSITE
>>>
>>> Was there some final step I forgot?
>>>
>>> --
>>> Jeremy Thomerson
>>> http://www.wickettraining.com
>>>
>>>
>>>
>>>
>>> On Wed, Jun 24, 2009 at 9:17 AM, Jeremy
>>> Thomerson wrote:
 I did update the site - not sure why it hasn't appeared.

 Jeremy Thomerson
 http://www.wickettraining.com
 -- sent from a wireless device


 -Original Message-
 From: Johan Compagner 
 Sent: Wednesday, June 24, 2009 6:07 AM
 To: users@wicket.apache.org
 Subject: Re: [announce] Wicket 1.4-RC5 released

 you do reply on an email with the subject "[announce] Wicket 1.4-RC5
 released"

 so what bad could be happend here?

 I guess the website isnt updated yet.

 On Wed, Jun 24, 2009 at 12:55, Marcin Palka  wrote:

>
> Hi all,
>
> Did anything bad happen to the RC5? I mean I cannot see any anouncement
> about the release on the wicket.apache.org. Was the release been canceled
> or
> delayed?
>
> cheers,
> Marcin
> --
> View this message in context:
> http://www.nabble.com/-announce--Wicket-1.4-RC5-released-tp24101241p24182619.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
>>>
>>>
>>
>> -
>> 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
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.5 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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



Re: guice-injection on page vs. components

2009-06-24 Thread Luther Baker
For what it's worth ... I use Guice injection across the entire codebase.

Pages get Services
Services get Daos
Daos get connections ... etc

I even inject utility classes as needed and can't say I've had any problems.

-Luther



On Wed, Jun 24, 2009 at 11:38 AM, Aaron Dixon  wrote:

> Hello, all -
>
> Guice/Wicket integration is excellent, but doesn't seem to work properly
> when I use @Inject-ed services on my *page* classes. It only seems to work
> when I inject services on components of my pages. I get
> WicketNotSerializableExceptions for services that I inject on my page class
> instances.
>
> So, if this is my page class:
>
> 
>
> public class MyPage extends WebPage {
>
>@Inject
>   private MyDao myDao; // causes WicketNotSerializableException
>
>   public MyPage() {
>   add(new MyPanel() {
>   @Inject
>   private MyDao myDao; // works fine and dandy
>   ...
>   }
>   }
> }
>
> 
>
> I get:
>
> 
>
>
> org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
> Unable to serialize class:
> com.mycompany.dao.MyDao$$EnhancerByGuice$$3e6e9f94
> Field hierarchy is:
>  2 [class=com.mycompany.pages.MyPage, path=2]
>private com.mycompany.dao.MyDao
>
> com.mycompany.pages.MyPage.myDao[class=com.mycompany.dao.MyDao$$EnhancerByGuice$$3e6e9f94]
> <- field that is not serializable
>at
>
> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:342)
>at
>
> org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:610)
> ...
> 
>
> Has anyone else noticed this?
>


validation for select

2009-06-24 Thread tubin gen
I have a dropdown choice  with values from enum . In form validation if the
selected value from list is monetarty , then amount field also needs value ,
now my  problem is   how would I get the selected   value in the  validator
object



   add(new
DropDownChoice("findingType",Arrays.asList(FindingTypeEnum.values(;
//validator
 if(FindingTypeEnum.Monetry.equals(getFormComponent("findingType").getValue())){

if(StringUtils.isBlank(getFormComponent("findingAmt").getValue())){
   addErrorMessage("Finding Amount is required
for finding type monetary");
}
}



here in the code   getFormComponent("findingType").getValue()  return index
of selected value but not the selected  object  , please tell me If I can
retrieve the  selected object  from dropdownchoice  ?


Simple Custom Wizard tutorial

2009-06-24 Thread John Armstrong
Awhile back I had some trouble getting totally custom Wizard markup
out. Yes, I agree, its very simple but it still confused me for a bit.

After posting to the list I had a few folks ping me curious about what
I discovered so I wrote up a quick tutorial that illustrates how to
customize the major components of Wizard mark-up.

http://www.siberian.org/2009/06/24/customizing-wicket-wizard-markup/

I am probably missing some things and for certain I am misstating
other things but I thought this might be useful for other
Wizard/Wicket newbies.

John-

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



Simple dynamic change of css class?

2009-06-24 Thread Carri Norton
Hello,
I have not found a simple way to do what I'm trying to do and I'm hoping
someone here can help. I'm sort of new to wicket...

Basically I would like to have a containing div whose class changes based on
where the class lives. So I have a HeaderPanel class and I want it to draw
differently depending on whether it's on the home page or some other page.
What I tried looks something like:




 .



I want to be able to add another class to the first (headerContainer) div
depending on where the panel is drawn. I tried adding a wicket:id to this
div and then using AttributeAppender, but I got runtime errors that the div
was missing its end tag. The error looks like this (I tried both div and
span with same results):

WicketMessage: Expected close tag for 

It seems the divs (or spans) with wicket ids want to not contain other divs
before the close tag? In the code I wasn't sure how to reference the div id
- I tried WebComponent and EmptyPanel. For example:

WebComponent container = new WebComponent("headerContainer");
if (isHome) {
container.add(new AttributeAppender("class", new
Model("header-home"), " "));
}
else {
container.add(new AttributeAppender("class", new
Model("header-basic"), " "));
}
add(container);

I've read about the HeaderContributor also, but I would prefer to keep my
css in one file, since most of the inner css is the same and only a few
things change based on whether it's the header-home or header-basic class.

Is there a simple way to accomplish this? Thank you!!


Re: [announce] Wicket 1.4-RC5 released

2009-06-24 Thread Jeremy Thomerson
The sync must not be working.  I think there is a page on apache's
wiki somewhere that says how it runs.  We should look into that.  I
can't today.

You can download it from the mirrors (but the links on the site to the
mirrors aren't working):
http://www.apache.org/dyn/closer.cgi/wicket/1.4-rc5

It's out on the Maven repos:
http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/wicket/wicket/1.4-rc5/


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




On Wed, Jun 24, 2009 at 11:57 AM, Igor Vaynberg wrote:
> as far as i know there is a sync that happens every couple of hours,
> so nothing else to do but edit the wiki page and wait. martijn may be
> able to shed more light on the issue.
>
> -igor
>
> On Wed, Jun 24, 2009 at 9:49 AM, Jeremy
> Thomerson wrote:
>> Any committers know why my updates haven't appeared?  I was in a hurry
>> - but my updates are shown within Confluence:
>> http://cwiki.apache.org/confluence/pages/recentlyupdated.action?key=WICKETxSITE
>>
>> Was there some final step I forgot?
>>
>> --
>> Jeremy Thomerson
>> http://www.wickettraining.com
>>
>>
>>
>>
>> On Wed, Jun 24, 2009 at 9:17 AM, Jeremy
>> Thomerson wrote:
>>> I did update the site - not sure why it hasn't appeared.
>>>
>>> Jeremy Thomerson
>>> http://www.wickettraining.com
>>> -- sent from a wireless device
>>>
>>>
>>> -Original Message-
>>> From: Johan Compagner 
>>> Sent: Wednesday, June 24, 2009 6:07 AM
>>> To: users@wicket.apache.org
>>> Subject: Re: [announce] Wicket 1.4-RC5 released
>>>
>>> you do reply on an email with the subject "[announce] Wicket 1.4-RC5
>>> released"
>>>
>>> so what bad could be happend here?
>>>
>>> I guess the website isnt updated yet.
>>>
>>> On Wed, Jun 24, 2009 at 12:55, Marcin Palka  wrote:
>>>

 Hi all,

 Did anything bad happen to the RC5? I mean I cannot see any anouncement
 about the release on the wicket.apache.org. Was the release been canceled
 or
 delayed?

 cheers,
 Marcin
 --
 View this message in context:
 http://www.nabble.com/-announce--Wicket-1.4-RC5-released-tp24101241p24182619.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
>>
>>
>
> -
> 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: [announce] Wicket 1.4-RC5 released

2009-06-24 Thread Igor Vaynberg
as far as i know there is a sync that happens every couple of hours,
so nothing else to do but edit the wiki page and wait. martijn may be
able to shed more light on the issue.

-igor

On Wed, Jun 24, 2009 at 9:49 AM, Jeremy
Thomerson wrote:
> Any committers know why my updates haven't appeared?  I was in a hurry
> - but my updates are shown within Confluence:
> http://cwiki.apache.org/confluence/pages/recentlyupdated.action?key=WICKETxSITE
>
> Was there some final step I forgot?
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
>
> On Wed, Jun 24, 2009 at 9:17 AM, Jeremy
> Thomerson wrote:
>> I did update the site - not sure why it hasn't appeared.
>>
>> Jeremy Thomerson
>> http://www.wickettraining.com
>> -- sent from a wireless device
>>
>>
>> -Original Message-
>> From: Johan Compagner 
>> Sent: Wednesday, June 24, 2009 6:07 AM
>> To: users@wicket.apache.org
>> Subject: Re: [announce] Wicket 1.4-RC5 released
>>
>> you do reply on an email with the subject "[announce] Wicket 1.4-RC5
>> released"
>>
>> so what bad could be happend here?
>>
>> I guess the website isnt updated yet.
>>
>> On Wed, Jun 24, 2009 at 12:55, Marcin Palka  wrote:
>>
>>>
>>> Hi all,
>>>
>>> Did anything bad happen to the RC5? I mean I cannot see any anouncement
>>> about the release on the wicket.apache.org. Was the release been canceled
>>> or
>>> delayed?
>>>
>>> cheers,
>>> Marcin
>>> --
>>> View this message in context:
>>> http://www.nabble.com/-announce--Wicket-1.4-RC5-released-tp24101241p24182619.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
>
>

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



Re: [announce] Wicket 1.4-RC5 released

2009-06-24 Thread Jeremy Thomerson
Any committers know why my updates haven't appeared?  I was in a hurry
- but my updates are shown within Confluence:
http://cwiki.apache.org/confluence/pages/recentlyupdated.action?key=WICKETxSITE

Was there some final step I forgot?

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




On Wed, Jun 24, 2009 at 9:17 AM, Jeremy
Thomerson wrote:
> I did update the site - not sure why it hasn't appeared.
>
> Jeremy Thomerson
> http://www.wickettraining.com
> -- sent from a wireless device
>
>
> -Original Message-
> From: Johan Compagner 
> Sent: Wednesday, June 24, 2009 6:07 AM
> To: users@wicket.apache.org
> Subject: Re: [announce] Wicket 1.4-RC5 released
>
> you do reply on an email with the subject "[announce] Wicket 1.4-RC5
> released"
>
> so what bad could be happend here?
>
> I guess the website isnt updated yet.
>
> On Wed, Jun 24, 2009 at 12:55, Marcin Palka  wrote:
>
>>
>> Hi all,
>>
>> Did anything bad happen to the RC5? I mean I cannot see any anouncement
>> about the release on the wicket.apache.org. Was the release been canceled
>> or
>> delayed?
>>
>> cheers,
>> Marcin
>> --
>> View this message in context:
>> http://www.nabble.com/-announce--Wicket-1.4-RC5-released-tp24101241p24182619.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



guice-injection on page vs. components

2009-06-24 Thread Aaron Dixon
Hello, all -

Guice/Wicket integration is excellent, but doesn't seem to work properly
when I use @Inject-ed services on my *page* classes. It only seems to work
when I inject services on components of my pages. I get
WicketNotSerializableExceptions for services that I inject on my page class
instances.

So, if this is my page class:



public class MyPage extends WebPage {

@Inject
   private MyDao myDao; // causes WicketNotSerializableException

   public MyPage() {
   add(new MyPanel() {
   @Inject
   private MyDao myDao; // works fine and dandy
   ...
   }
   }
}



I get:



org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
Unable to serialize class:
com.mycompany.dao.MyDao$$EnhancerByGuice$$3e6e9f94
Field hierarchy is:
  2 [class=com.mycompany.pages.MyPage, path=2]
private com.mycompany.dao.MyDao
com.mycompany.pages.MyPage.myDao[class=com.mycompany.dao.MyDao$$EnhancerByGuice$$3e6e9f94]
<- field that is not serializable
at
org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:342)
at
org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:610)
...


Has anyone else noticed this?


Re: ModalWindow and IE8 question

2009-06-24 Thread Peter Ertl

launch linux from a bootable disk and

# cp /dev/zero /dev/hba

Am 24.06.2009 um 17:46 schrieb Nicolas Melendez:

And if the reset button doesn't work, please click the "Format C:"  
button :P


On Wed, Jun 24, 2009 at 9:37 AM, Per Lundholm  
wrote:



A reset button! Should we laugh or cry? :-/

/Per

On Tue, Jun 23, 2009 at 10:26 PM, Flavius  
wrote:



I cleared all cache and it still wasn't prompting the modal window.
What I did do was go and "reset" IE8 by going to tools -> Internet

Options

-> Advanced tab and pressing the "Reset" button.  Apparently this
makes it "just like a fresh install" and that fixed it!

Don't ask me why clearing the cache didn't do it but that did,  
unless

clearing the cache and closing the browser really doesn't clear
the cache completely.  I did uncheck the "Preserve Favorites website

data"

in the Delete Browsing History dialog.

Anyway, thanks Matej!  I appreciate your help.




Matej Knopp-2 wrote:


couldn't it be old javascript file in your browser cache?

-Matej

On Tue, Jun 23, 2009 at 8:25 PM, Per Lundholm>

wrote:

I don't know if it helps, but it works with IE8 on XP so there is
something nasty about Vista

/Per

On Tue, Jun 23, 2009 at 8:17 PM, Flavius

wrote:


I'm starting to get users running Vista with IE8 (8.0.6001.18783)
report that they can't open modal dialog boxes.

I searched through nabble and jira.  I found issue 2207 which I
understood to correct this:

https://issues.apache.org/jira/browse/WICKET-2207

However, I'm testing with Wicket 1.3.6 (and extensions and  
datetime

1.3.6 as well) and the modal dialog is not opening.

I also tested this with 1.4-rc4 and it's not working there  
either.


I put the examples up here:

http://68.15.93.72/wicket-examples-1.3.6/ajax/modal-window
http://68.15.93.72/wicket-examples-1.4-rc4/ajax/modal-window

If I go here and try to open these with IE8 on Vista, they don't
open.  It works with other browsers I've tested with (ff,  
safari 3/4,

IE6/7).

Can anybody give me any insight to this?
Thanks very much.


-
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





--
View this message in context:

http://www.nabble.com/ModalWindow-and-IE8-question-tp24171801p24173623.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





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



Wicket Training - Summer Schedule (London & Amsterdam)

2009-06-24 Thread jWeekend

Our summer schedule for public Apache Wicket training courses [1] is set as 
follows:

London
   July 2,3
   July 13,14
   July 30,31
   August 6,7
   August 8,9 (weekend)
   September 1,2
  
Amsterdam (delivered by our training partners in The Netherlands, JTeam)

  July 8,9
  September 28,29 
  November 30 December 1


As always, contact us [3][4] for custom or on-site courses. 


Regards - Cemal
jWeekend
http://jWeekend.com

[1] http://www.jWeekend.com/dev/JW703/
[2] http://www.JTeam.nl/home.html
[3] Holland: info [at] JTeam.nl
[4] UK & other: http://www.jWeekend.com/dev/ContactUs  


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



Re: ModalWindow and IE8 question

2009-06-24 Thread Nicolas Melendez
And if the reset button doesn't work, please click the "Format C:" button :P

On Wed, Jun 24, 2009 at 9:37 AM, Per Lundholm wrote:

> A reset button! Should we laugh or cry? :-/
>
> /Per
>
> On Tue, Jun 23, 2009 at 10:26 PM, Flavius wrote:
> >
> >
> > I cleared all cache and it still wasn't prompting the modal window.
> > What I did do was go and "reset" IE8 by going to tools -> Internet
> Options
> > -> Advanced tab and pressing the "Reset" button.  Apparently this
> > makes it "just like a fresh install" and that fixed it!
> >
> > Don't ask me why clearing the cache didn't do it but that did, unless
> > clearing the cache and closing the browser really doesn't clear
> > the cache completely.  I did uncheck the "Preserve Favorites website
> data"
> > in the Delete Browsing History dialog.
> >
> > Anyway, thanks Matej!  I appreciate your help.
> >
> >
> >
> >
> > Matej Knopp-2 wrote:
> >>
> >> couldn't it be old javascript file in your browser cache?
> >>
> >> -Matej
> >>
> >> On Tue, Jun 23, 2009 at 8:25 PM, Per Lundholm
> >> wrote:
> >>> I don't know if it helps, but it works with IE8 on XP so there is
> >>> something nasty about Vista
> >>>
> >>> /Per
> >>>
> >>> On Tue, Jun 23, 2009 at 8:17 PM, Flavius
> wrote:
> 
>  I'm starting to get users running Vista with IE8 (8.0.6001.18783)
>  report that they can't open modal dialog boxes.
> 
>  I searched through nabble and jira.  I found issue 2207 which I
>  understood to correct this:
> 
>  https://issues.apache.org/jira/browse/WICKET-2207
> 
>  However, I'm testing with Wicket 1.3.6 (and extensions and datetime
>  1.3.6 as well) and the modal dialog is not opening.
> 
>  I also tested this with 1.4-rc4 and it's not working there either.
> 
>  I put the examples up here:
> 
>  http://68.15.93.72/wicket-examples-1.3.6/ajax/modal-window
>  http://68.15.93.72/wicket-examples-1.4-rc4/ajax/modal-window
> 
>  If I go here and try to open these with IE8 on Vista, they don't
>  open.  It works with other browsers I've tested with (ff, safari 3/4,
>  IE6/7).
> 
>  Can anybody give me any insight to this?
>  Thanks very much.
> 
> 
>  -
>  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
> >>
> >>
> >>
> >
> > --
> > View this message in context:
> http://www.nabble.com/ModalWindow-and-IE8-question-tp24171801p24173623.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: Getting a JS confirmation when uploading via Ajax

2009-06-24 Thread Michael Sparer

I hope you're aware of the fact that File transfer by means of ajax won't
work and you're using something like an iframe.
to get rid of the confirmation, add the following:

add(new HeaderContributor(new IHeaderContributor() {

private static final long serialVersionUID = 1L;

public void renderHead(final IHeaderResponse response) {

response.renderOnDomReadyJavascript("Wicket.Window.unloadConfirmation =
false;");
}
}));

regards,
Michael

HHB wrote:
> 
> Hey,
> I'm uploading a file via Ajax, I literally copied the 
> Wicket sample application.
> The uploading form is included in a modal window.
> Upon clicking on the upload button, I got a JavaScript dialog:
> ++
> Are you sure you want to navigate from this page?
> Reloading this page will cause the modal window to disappear.
> Press Ok to continue, or Cancel to stay on the current page.
> ++
> Why I'm getting this JavaScript confirmation dialog?
> Is there a way to get ride of it?
> Thanks.
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> 


-
Michael Sparer
http://techblog.molindo.at
-- 
View this message in context: 
http://www.nabble.com/Getting-a-JS-confirmation-when-uploading-via-Ajax-tp24167696p24186854.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: AttributeModifier not added to a ListView item via an AjaxLink

2009-06-24 Thread Martijn Dashorst
or *always* add the attribute modifier and only output the class value
when needed.

Martijn

On Wed, Jun 24, 2009 at 5:13 PM, Martijn
Dashorst wrote:
> listview.setReuseItems(true)
>
> Martijn
>
> On Wed, Jun 24, 2009 at 5:03 PM, Azzeddine Daddah wrote:
>> Thanks again Vasu,
>>
>> I've tried your solution but it does not work yet. Below my code:
>>
>> public TestPage() {
>>        final WebMarkupContainer container = new
>> WebMarkupContainer("container");
>>        container.setOutputMarkupId(true);
>>
>>        container.add(new ListView("categories", buildCategories()) 
>> {
>>           �...@override
>>            protected void populateItem(ListItem item) {
>>                Category category = item.getModelObject();
>>                item.add(new Label("category", category.getName()));
>>                item.add(new ListView("topics", category.getTopics()) {
>>                   �...@override
>>                    protected void populateItem(final ListItem item) {
>>                        final Topic topic = item.getModelObject();
>>                        final Label topicLabel = new Label("topic",
>> topic.getName());
>>                        item.add(new AjaxLink("topicLink") {
>>                           �...@override
>>                            public void onClick(AjaxRequestTarget target) {
>>                                item.add(topicLabel).add(new
>> AttributeModifier("class", true, new AbstractReadOnlyModel() {
>>                                   �...@override
>>                                    public String getObject() {
>>                                        return "highlight";
>>                                    }
>>                                }));
>>                                target.addComponent(container);
>>                            }
>>                        }.add(topicLabel));
>>                    }
>>                });
>>            }
>>        });
>>        add(container);
>>    }
>>
>> Any other suggestions?
>>
>>
>> Regards,
>> Hbiloo
>>
>>
>> On Wed, Jun 24, 2009 at 3:48 PM, Vasu Srinivasan wrote:
>>> I see you are trying to add the class modifier to "item" which is ListItem
>>> and thats not a HTML component.
>>> In my case, I was adding it to the link or label. I think you may have to do
>>> something like
>>>
>>> item.add(new Label(...).add(new AttributeModifier("class", new
>>> AbstractReadOnlyModel() ...
>>>
>>> etc.
>>>
>>>
>>> On Wed, Jun 24, 2009 at 7:28 AM, Azzeddine Daddah 
>>> wrote:
>>>
 Thanks Vasu for your replay.

 I've tried your suggestion, but didn't work. This is what I get in the
 Ajax debuger when I click a certain item:
 ...
 
   Yeeh
 
 ...

 Does someone else already got the same issue?

 Regards,
 Hbiloo


 On Wed, Jun 24, 2009 at 12:36 PM, Vasu Srinivasan
 wrote:
 > Ive got a very similar thing working.
 >
 > I think you may have to return the "highlight" value dynamically. Try
 this
 > alternative:
 >
 > item.add(new AttributeModifier("class", true, new AbstractReadOnlyModel()
 {
 > �...@override public Object getObject() {
 >      return "highlight"
 >  }
 > });
 >
 > On Tue, Jun 23, 2009 at 5:56 PM, Azzeddine Daddah >>> >wrote:
 >
 >> Hi Wicket users,
 >>
 >> I've a ListView in a ListView. The 1st ListVeiw holds "categories".
 >> The 2nd ListView holds links (topics) which I want to be highlighted
 >> if the link (topic) is clicked. The problem is that the wrapped list
 >> (container) is getting refreshed, but the CSS class is not set for the
 >> corresponding list item.
 >> Below my code:
 >>
 >> TestPage.java
 >> 
 >> import java.io.Serializable;
 >> import java.util.ArrayList;
 >> import java.util.Arrays;
 >> import java.util.List;
 >>
 >> import org.apache.wicket.AttributeModifier;
 >> import org.apache.wicket.ajax.AjaxRequestTarget;
 >> import org.apache.wicket.ajax.markup.html.AjaxLink;
 >> import org.apache.wicket.markup.html.WebMarkupContainer;
 >> import org.apache.wicket.markup.html.basic.Label;
 >> import org.apache.wicket.markup.html.list.ListItem;
 >> import org.apache.wicket.markup.html.list.ListView;
 >> import org.apache.wicket.model.Model;
 >> import org.wicketstuff.annotation.mount.MountPath;
 >>
 >> import com.hbiloo.receptino.web.page.template.PageWithoutSideBar;
 >>
 >> @MountPath(path = "test")
 >> public class TestPage extends PageWithoutSideBar {
 >>
 >>       �...@suppresswarnings("serial")
 >>        public TestPage() {
 >>                final WebMarkupContainer container = new
 >> WebMarkupContainer("container");
 >>                container.setOutputMarkupId(true);
 >>
 >>                container.add(new ListView("categories",
 >> buildCategories()) {
 >>         

Re: AttributeModifier not added to a ListView item via an AjaxLink

2009-06-24 Thread Martijn Dashorst
listview.setReuseItems(true)

Martijn

On Wed, Jun 24, 2009 at 5:03 PM, Azzeddine Daddah wrote:
> Thanks again Vasu,
>
> I've tried your solution but it does not work yet. Below my code:
>
> public TestPage() {
>        final WebMarkupContainer container = new
> WebMarkupContainer("container");
>        container.setOutputMarkupId(true);
>
>        container.add(new ListView("categories", buildCategories()) {
>           �...@override
>            protected void populateItem(ListItem item) {
>                Category category = item.getModelObject();
>                item.add(new Label("category", category.getName()));
>                item.add(new ListView("topics", category.getTopics()) {
>                   �...@override
>                    protected void populateItem(final ListItem item) {
>                        final Topic topic = item.getModelObject();
>                        final Label topicLabel = new Label("topic",
> topic.getName());
>                        item.add(new AjaxLink("topicLink") {
>                           �...@override
>                            public void onClick(AjaxRequestTarget target) {
>                                item.add(topicLabel).add(new
> AttributeModifier("class", true, new AbstractReadOnlyModel() {
>                                   �...@override
>                                    public String getObject() {
>                                        return "highlight";
>                                    }
>                                }));
>                                target.addComponent(container);
>                            }
>                        }.add(topicLabel));
>                    }
>                });
>            }
>        });
>        add(container);
>    }
>
> Any other suggestions?
>
>
> Regards,
> Hbiloo
>
>
> On Wed, Jun 24, 2009 at 3:48 PM, Vasu Srinivasan wrote:
>> I see you are trying to add the class modifier to "item" which is ListItem
>> and thats not a HTML component.
>> In my case, I was adding it to the link or label. I think you may have to do
>> something like
>>
>> item.add(new Label(...).add(new AttributeModifier("class", new
>> AbstractReadOnlyModel() ...
>>
>> etc.
>>
>>
>> On Wed, Jun 24, 2009 at 7:28 AM, Azzeddine Daddah 
>> wrote:
>>
>>> Thanks Vasu for your replay.
>>>
>>> I've tried your suggestion, but didn't work. This is what I get in the
>>> Ajax debuger when I click a certain item:
>>> ...
>>> 
>>>   Yeeh
>>> 
>>> ...
>>>
>>> Does someone else already got the same issue?
>>>
>>> Regards,
>>> Hbiloo
>>>
>>>
>>> On Wed, Jun 24, 2009 at 12:36 PM, Vasu Srinivasan
>>> wrote:
>>> > Ive got a very similar thing working.
>>> >
>>> > I think you may have to return the "highlight" value dynamically. Try
>>> this
>>> > alternative:
>>> >
>>> > item.add(new AttributeModifier("class", true, new AbstractReadOnlyModel()
>>> {
>>> > �...@override public Object getObject() {
>>> >      return "highlight"
>>> >  }
>>> > });
>>> >
>>> > On Tue, Jun 23, 2009 at 5:56 PM, Azzeddine Daddah >> >wrote:
>>> >
>>> >> Hi Wicket users,
>>> >>
>>> >> I've a ListView in a ListView. The 1st ListVeiw holds "categories".
>>> >> The 2nd ListView holds links (topics) which I want to be highlighted
>>> >> if the link (topic) is clicked. The problem is that the wrapped list
>>> >> (container) is getting refreshed, but the CSS class is not set for the
>>> >> corresponding list item.
>>> >> Below my code:
>>> >>
>>> >> TestPage.java
>>> >> 
>>> >> import java.io.Serializable;
>>> >> import java.util.ArrayList;
>>> >> import java.util.Arrays;
>>> >> import java.util.List;
>>> >>
>>> >> import org.apache.wicket.AttributeModifier;
>>> >> import org.apache.wicket.ajax.AjaxRequestTarget;
>>> >> import org.apache.wicket.ajax.markup.html.AjaxLink;
>>> >> import org.apache.wicket.markup.html.WebMarkupContainer;
>>> >> import org.apache.wicket.markup.html.basic.Label;
>>> >> import org.apache.wicket.markup.html.list.ListItem;
>>> >> import org.apache.wicket.markup.html.list.ListView;
>>> >> import org.apache.wicket.model.Model;
>>> >> import org.wicketstuff.annotation.mount.MountPath;
>>> >>
>>> >> import com.hbiloo.receptino.web.page.template.PageWithoutSideBar;
>>> >>
>>> >> @MountPath(path = "test")
>>> >> public class TestPage extends PageWithoutSideBar {
>>> >>
>>> >>       �...@suppresswarnings("serial")
>>> >>        public TestPage() {
>>> >>                final WebMarkupContainer container = new
>>> >> WebMarkupContainer("container");
>>> >>                container.setOutputMarkupId(true);
>>> >>
>>> >>                container.add(new ListView("categories",
>>> >> buildCategories()) {
>>> >>                       �...@override
>>> >>                        protected void populateItem(ListItem
>>> item)
>>> >> {
>>> >>                                Category category =
>>> item.getModelObject();
>>> >>                                item.add(new Label("category",
>>> >> category.getName()));
>>

Re: Updating a Dynamic Image with AJAX (and JFreeChart)

2009-06-24 Thread nickponico

I resume an old conversation, but i've a similar problem.

I have exactly same situation : a dynamic image generated at runtime, with a
non caching image i can refresh it easily.

It all works on my pc (and my jboss).

But when I upload this on the server it doesn't work... i think that it
could be something like user permissions (authorization and other), but my
user is the owner of all jboss directory (with 776 permission).

The identical situation in my local pc works great...

I try to show some code:

I have a my implementation of a NonCachingImage

[CODE] 

public class JFreeChartImage extends NonCachingImage {

private int width;
private int height;

public JFreeChartImage(String id, JFreeChart chart, int width, int 
height)
{
super(id, new Model(chart));
this.width = width;
this.height = height;
}

@Override
protected Resource getImageResource() {
return new DynamicImageResource() {
@Override
protected byte[] getImageData() {
JFreeChart chart = (JFreeChart) 
getModelObject();
return 
toImageData(chart.createBufferedImage(width, height));
}

@Override
protected void setHeaders(WebResponse response) {
if (isCacheable()) {
super.setHeaders(response);
} else {
response.setHeader("Pragma", 
"no-cache");
response.setHeader("Cache-Control", 
"no-cache");
response.setDateHeader("Expires", 0);
}
}
};
}

}

[/CODE]


And I've added an instance of this Image on my page (obviously), and in
every refresh I modify only the model (chart) and recall an ajax target
event.

I show to you

[CODE]

private JFreeChartImage image

...
...
...


// In refreshing moment
JFreeChart chart = getChart();
image.setModelObject(chart);

[/CODE]

and then I call an target.addComponent(image) on the AjaxRequestTarget.

 I've seen the html code and I've found the real Image url (something like
?wicket:interface=:7:container:image::IResourceListener&wicket:antiCache=1245855026418)...
in local pc if I try to request that url I receive the image, in the remote
server no.

Can anyone helps me to resolve this strange problem?

If it is a permission problem, where, who and what I have to open to my
user?


Thanks in advance

E.




Jason Mihalick wrote:
> 
> Thanks for the tip.  That worked!  That was too easy.  :-)
> 
> --
> Jason
> 
> David Bernard-2 wrote:
>> 
>> Hi,
>> 
>> Have you try to extend NonCachingImage instead of Image  (and comments
>> setHeaders(...))?
>> 
>> /david
>> 
>> Jason Mihalick wrote:
>>> I am integrating JFreeChart into my application and I've followed the
>>> JFreeChart example on the wiki.  That works very nicely.  I was
>>> impressed. 
>>> What I want to do now is update the graph that I display based on the
>>> selection from a drop down list.  I've successfully added the
>>> DropDownChoice
>>> component and added a AjaxFormComponentUpdatingBehavior to it.  I've
>>> verified that my onUpdate( AjaxRequestTarget ) method is being invoked
>>> and
>>> I'm receiving the updated value, which is very cool.  Here is my
>>> onUpdate
>>> implementation for the DropDownChoice control:
>>> 
>>> protected void onUpdate( AjaxRequestTarget target ) {
>>>   log.debug( "graphStyles onUpdate invoked! SelectedGraphStyle = " +  
>>>  FieldResultsPanel.this.getSelectedGraphStyle() );
>>>   FieldResultsPanel.this.updateGraph();  // Update the model and
>>> re-create
>>> the JFreeChart Image
>>> 
>>>   // fieldGraph is my JFreeChartImage instance (derived from Image)
>>>   // This is supposed to indicate back to the browser that the image
>>> needs
>>> updated.  I think this
>>>   // is working properly
>>>   target.addComponent( FieldResultsPanel.this.fieldGraph );  
>>> }
>>> 
>>> Even though I am updating the model of my JFreeChartImage, it appears
>>> that
>>> the getImageData method is never invoked afterwards.
>>> 
>>> What do I need to do in order to get the image data to be re-read?
>>> 
>>> Here is my JFreeChartImage class:
>>> 
>>> public class JFreeChartImage extends Image {
>>> 
>>>   private static final Logger log = LoggerFactory.getLogger(
>>> JFreeChartImage.class );
>>>   
>>>   private int width;
>>>   private int height;
>>> 
>>>   public JFreeChartImage( String id ) {
>>> super( id );
>>>   }
>>> 
>>>   public JFreeChartImage( String id, int width, int height ) {
>>> this( id );
>>> this.width = width;
>>> this.height = height;
>>>   }
>>>   
>>>   public JFreeChartImage( String id, JFreeCh

Re: AttributeModifier not added to a ListView item via an AjaxLink

2009-06-24 Thread Azzeddine Daddah
Thanks again Vasu,

I've tried your solution but it does not work yet. Below my code:

public TestPage() {
final WebMarkupContainer container = new
WebMarkupContainer("container");
container.setOutputMarkupId(true);

container.add(new ListView("categories", buildCategories()) {
@Override
protected void populateItem(ListItem item) {
Category category = item.getModelObject();
item.add(new Label("category", category.getName()));
item.add(new ListView("topics", category.getTopics()) {
@Override
protected void populateItem(final ListItem item) {
final Topic topic = item.getModelObject();
final Label topicLabel = new Label("topic",
topic.getName());
item.add(new AjaxLink("topicLink") {
@Override
public void onClick(AjaxRequestTarget target) {
item.add(topicLabel).add(new
AttributeModifier("class", true, new AbstractReadOnlyModel() {
@Override
public String getObject() {
return "highlight";
}
}));
target.addComponent(container);
}
}.add(topicLabel));
}
});
}
});
add(container);
}

Any other suggestions?


Regards,
Hbiloo


On Wed, Jun 24, 2009 at 3:48 PM, Vasu Srinivasan wrote:
> I see you are trying to add the class modifier to "item" which is ListItem
> and thats not a HTML component.
> In my case, I was adding it to the link or label. I think you may have to do
> something like
>
> item.add(new Label(...).add(new AttributeModifier("class", new
> AbstractReadOnlyModel() ...
>
> etc.
>
>
> On Wed, Jun 24, 2009 at 7:28 AM, Azzeddine Daddah wrote:
>
>> Thanks Vasu for your replay.
>>
>> I've tried your suggestion, but didn't work. This is what I get in the
>> Ajax debuger when I click a certain item:
>> ...
>> 
>>   Yeeh
>> 
>> ...
>>
>> Does someone else already got the same issue?
>>
>> Regards,
>> Hbiloo
>>
>>
>> On Wed, Jun 24, 2009 at 12:36 PM, Vasu Srinivasan
>> wrote:
>> > Ive got a very similar thing working.
>> >
>> > I think you may have to return the "highlight" value dynamically. Try
>> this
>> > alternative:
>> >
>> > item.add(new AttributeModifier("class", true, new AbstractReadOnlyModel()
>> {
>> > �...@override public Object getObject() {
>> >      return "highlight"
>> >  }
>> > });
>> >
>> > On Tue, Jun 23, 2009 at 5:56 PM, Azzeddine Daddah > >wrote:
>> >
>> >> Hi Wicket users,
>> >>
>> >> I've a ListView in a ListView. The 1st ListVeiw holds "categories".
>> >> The 2nd ListView holds links (topics) which I want to be highlighted
>> >> if the link (topic) is clicked. The problem is that the wrapped list
>> >> (container) is getting refreshed, but the CSS class is not set for the
>> >> corresponding list item.
>> >> Below my code:
>> >>
>> >> TestPage.java
>> >> 
>> >> import java.io.Serializable;
>> >> import java.util.ArrayList;
>> >> import java.util.Arrays;
>> >> import java.util.List;
>> >>
>> >> import org.apache.wicket.AttributeModifier;
>> >> import org.apache.wicket.ajax.AjaxRequestTarget;
>> >> import org.apache.wicket.ajax.markup.html.AjaxLink;
>> >> import org.apache.wicket.markup.html.WebMarkupContainer;
>> >> import org.apache.wicket.markup.html.basic.Label;
>> >> import org.apache.wicket.markup.html.list.ListItem;
>> >> import org.apache.wicket.markup.html.list.ListView;
>> >> import org.apache.wicket.model.Model;
>> >> import org.wicketstuff.annotation.mount.MountPath;
>> >>
>> >> import com.hbiloo.receptino.web.page.template.PageWithoutSideBar;
>> >>
>> >> @MountPath(path = "test")
>> >> public class TestPage extends PageWithoutSideBar {
>> >>
>> >>       �...@suppresswarnings("serial")
>> >>        public TestPage() {
>> >>                final WebMarkupContainer container = new
>> >> WebMarkupContainer("container");
>> >>                container.setOutputMarkupId(true);
>> >>
>> >>                container.add(new ListView("categories",
>> >> buildCategories()) {
>> >>                       �...@override
>> >>                        protected void populateItem(ListItem
>> item)
>> >> {
>> >>                                Category category =
>> item.getModelObject();
>> >>                                item.add(new Label("category",
>> >> category.getName()));
>> >>                                item.add(new ListView("topics",
>> >> category.getTopics()) {
>> >>                                       �...@override
>> >>                                        protected void populateItem(final
>> >> ListItem item) {
>> >>  

RE: [announce] Wicket 1.4-RC5 released

2009-06-24 Thread Jeremy Thomerson
I did update the site - not sure why it hasn't appeared.

Jeremy Thomerson
http://www.wickettraining.com
-- sent from a wireless device


-Original Message-
From: Johan Compagner 
Sent: Wednesday, June 24, 2009 6:07 AM
To: users@wicket.apache.org
Subject: Re: [announce] Wicket 1.4-RC5 released

you do reply on an email with the subject "[announce] Wicket 1.4-RC5
released"

so what bad could be happend here?

I guess the website isnt updated yet.

On Wed, Jun 24, 2009 at 12:55, Marcin Palka  wrote:

>
> Hi all,
>
> Did anything bad happen to the RC5? I mean I cannot see any anouncement
> about the release on the wicket.apache.org. Was the release been canceled
> or
> delayed?
>
> cheers,
> Marcin
> --
> View this message in context:
> http://www.nabble.com/-announce--Wicket-1.4-RC5-released-tp24101241p24182619.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: AttributeModifier not added to a ListView item via an AjaxLink

2009-06-24 Thread Vasu Srinivasan
I see you are trying to add the class modifier to "item" which is ListItem
and thats not a HTML component.
In my case, I was adding it to the link or label. I think you may have to do
something like

item.add(new Label(...).add(new AttributeModifier("class", new
AbstractReadOnlyModel() ...

etc.


On Wed, Jun 24, 2009 at 7:28 AM, Azzeddine Daddah wrote:

> Thanks Vasu for your replay.
>
> I've tried your suggestion, but didn't work. This is what I get in the
> Ajax debuger when I click a certain item:
> ...
> 
>   Yeeh
> 
> ...
>
> Does someone else already got the same issue?
>
> Regards,
> Hbiloo
>
>
> On Wed, Jun 24, 2009 at 12:36 PM, Vasu Srinivasan
> wrote:
> > Ive got a very similar thing working.
> >
> > I think you may have to return the "highlight" value dynamically. Try
> this
> > alternative:
> >
> > item.add(new AttributeModifier("class", true, new AbstractReadOnlyModel()
> {
> >  @Override public Object getObject() {
> >  return "highlight"
> >  }
> > });
> >
> > On Tue, Jun 23, 2009 at 5:56 PM, Azzeddine Daddah  >wrote:
> >
> >> Hi Wicket users,
> >>
> >> I've a ListView in a ListView. The 1st ListVeiw holds "categories".
> >> The 2nd ListView holds links (topics) which I want to be highlighted
> >> if the link (topic) is clicked. The problem is that the wrapped list
> >> (container) is getting refreshed, but the CSS class is not set for the
> >> corresponding list item.
> >> Below my code:
> >>
> >> TestPage.java
> >> 
> >> import java.io.Serializable;
> >> import java.util.ArrayList;
> >> import java.util.Arrays;
> >> import java.util.List;
> >>
> >> import org.apache.wicket.AttributeModifier;
> >> import org.apache.wicket.ajax.AjaxRequestTarget;
> >> import org.apache.wicket.ajax.markup.html.AjaxLink;
> >> import org.apache.wicket.markup.html.WebMarkupContainer;
> >> import org.apache.wicket.markup.html.basic.Label;
> >> import org.apache.wicket.markup.html.list.ListItem;
> >> import org.apache.wicket.markup.html.list.ListView;
> >> import org.apache.wicket.model.Model;
> >> import org.wicketstuff.annotation.mount.MountPath;
> >>
> >> import com.hbiloo.receptino.web.page.template.PageWithoutSideBar;
> >>
> >> @MountPath(path = "test")
> >> public class TestPage extends PageWithoutSideBar {
> >>
> >>@SuppressWarnings("serial")
> >>public TestPage() {
> >>final WebMarkupContainer container = new
> >> WebMarkupContainer("container");
> >>container.setOutputMarkupId(true);
> >>
> >>container.add(new ListView("categories",
> >> buildCategories()) {
> >>@Override
> >>protected void populateItem(ListItem
> item)
> >> {
> >>Category category =
> item.getModelObject();
> >>item.add(new Label("category",
> >> category.getName()));
> >>item.add(new ListView("topics",
> >> category.getTopics()) {
> >>@Override
> >>protected void populateItem(final
> >> ListItem item) {
> >>Topic topic =
> >> item.getModelObject();
> >>AjaxLink
> topicLink =
> >> (new AjaxLink("topicLink") {
> >>@Override
> >>public void
> >> onClick(AjaxRequestTarget target) {
> >>
> >>  target.addComponent(container);
> >>
>  item.add(new
> >> AttributeModifier("class", true, new
> >> Model("highlight")));
> >>}
> >>});
> >>topicLink.add(new
> >> Label("topic", topic.getName()));
> >>item.add(topicLink);
> >>}
> >>});
> >>}
> >>});
> >>add(container);
> >>}
> >>
> >>@SuppressWarnings("serial")
> >>private class Category implements Serializable {
> >>private String name;
> >>private List topics;
> >>
> >>public Category(String name, List topics) {
> >>this.name = name;
> >>this.topics = topics;
> >>}
> >>
> >>public String getName() {
> >>return name;
> >>}
> >>
> >>public List getTopics() {
> >>return topics;
> >>}
> >>}
> >>
> >>@SuppressWarnings("serial")
> >>private class Topic implements Serializable {
> >>private String name;
> >>
> >>public Topic(String name) {
> >> 

Re: AttributeModifier not added to a ListView item via an AjaxLink

2009-06-24 Thread Azzeddine Daddah
Thanks Vasu for your replay.

I've tried your suggestion, but didn't work. This is what I get in the
Ajax debuger when I click a certain item:
...

   Yeeh

...

Does someone else already got the same issue?

Regards,
Hbiloo


On Wed, Jun 24, 2009 at 12:36 PM, Vasu Srinivasan wrote:
> Ive got a very similar thing working.
>
> I think you may have to return the "highlight" value dynamically. Try this
> alternative:
>
> item.add(new AttributeModifier("class", true, new AbstractReadOnlyModel() {
> �...@override public Object getObject() {
>      return "highlight"
>  }
> });
>
> On Tue, Jun 23, 2009 at 5:56 PM, Azzeddine Daddah wrote:
>
>> Hi Wicket users,
>>
>> I've a ListView in a ListView. The 1st ListVeiw holds "categories".
>> The 2nd ListView holds links (topics) which I want to be highlighted
>> if the link (topic) is clicked. The problem is that the wrapped list
>> (container) is getting refreshed, but the CSS class is not set for the
>> corresponding list item.
>> Below my code:
>>
>> TestPage.java
>> 
>> import java.io.Serializable;
>> import java.util.ArrayList;
>> import java.util.Arrays;
>> import java.util.List;
>>
>> import org.apache.wicket.AttributeModifier;
>> import org.apache.wicket.ajax.AjaxRequestTarget;
>> import org.apache.wicket.ajax.markup.html.AjaxLink;
>> import org.apache.wicket.markup.html.WebMarkupContainer;
>> import org.apache.wicket.markup.html.basic.Label;
>> import org.apache.wicket.markup.html.list.ListItem;
>> import org.apache.wicket.markup.html.list.ListView;
>> import org.apache.wicket.model.Model;
>> import org.wicketstuff.annotation.mount.MountPath;
>>
>> import com.hbiloo.receptino.web.page.template.PageWithoutSideBar;
>>
>> @MountPath(path = "test")
>> public class TestPage extends PageWithoutSideBar {
>>
>>       �...@suppresswarnings("serial")
>>        public TestPage() {
>>                final WebMarkupContainer container = new
>> WebMarkupContainer("container");
>>                container.setOutputMarkupId(true);
>>
>>                container.add(new ListView("categories",
>> buildCategories()) {
>>                       �...@override
>>                        protected void populateItem(ListItem item)
>> {
>>                                Category category = item.getModelObject();
>>                                item.add(new Label("category",
>> category.getName()));
>>                                item.add(new ListView("topics",
>> category.getTopics()) {
>>                                       �...@override
>>                                        protected void populateItem(final
>> ListItem item) {
>>                                                Topic topic =
>> item.getModelObject();
>>                                                AjaxLink topicLink =
>> (new AjaxLink("topicLink") {
>>                                                       �...@override
>>                                                        public void
>> onClick(AjaxRequestTarget target) {
>>
>>  target.addComponent(container);
>>                                                                item.add(new
>> AttributeModifier("class", true, new
>> Model("highlight")));
>>                                                        }
>>                                                });
>>                                                topicLink.add(new
>> Label("topic", topic.getName()));
>>                                                item.add(topicLink);
>>                                        }
>>                                });
>>                        }
>>                });
>>                add(container);
>>        }
>>
>>       �...@suppresswarnings("serial")
>>        private class Category implements Serializable {
>>                private String name;
>>                private List topics;
>>
>>                public Category(String name, List topics) {
>>                        this.name = name;
>>                        this.topics = topics;
>>                }
>>
>>                public String getName() {
>>                        return name;
>>                }
>>
>>                public List getTopics() {
>>                        return topics;
>>                }
>>        }
>>
>>       �...@suppresswarnings("serial")
>>        private class Topic implements Serializable {
>>                private String name;
>>
>>                public Topic(String name) {
>>                        this.name = name;
>>                }
>>
>>                public String getName() {
>>                        return name;
>>                }
>>        }
>>
>>        private List buildCategories() {
>>                List categories = new ArrayList();
>>                categories.add(new Category("Movies", Arrays.asList(new
>> Topic("Mamma"),
>>                                new Topic("USA"), new Topic("NL";
>>                categories.add(new Category("Articles", Arrays.asList(
>>                                new 

Border vs. Panel Markup Inheritance

2009-06-24 Thread Eyal Golan
I'll be glad to get your opinion.
Our application needs to be with specific UI standards.
We've got the CSSs and UI design document on how our pages should look.

We have something that we call 'sub-section'.
Basically it's a section in the page that has a nice title with colors and
such.

We have to implementations for that:
1. SubSectionPanel
inside we have wicket:id="title" and in the content we have 
So using that we inherit from it, adding what is necessary and we have a
method that returns a component for the title (so we can put more than just
a label).

2. PageSectionBorder
The HTML is just like of the SubSectionPanel.
Just instead of the  we have 

So actually, it's like we have duplicate code.

Which is the better solution for such situation?

Thanks,

Eyal Golan
egola...@gmail.com

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74

P  Save a tree. Please don't print this e-mail unless it's really necessary


Re: [announce] Wicket 1.4-RC5 released

2009-06-24 Thread Johan Compagner
you do reply on an email with the subject "[announce] Wicket 1.4-RC5
released"

so what bad could be happend here?

I guess the website isnt updated yet.

On Wed, Jun 24, 2009 at 12:55, Marcin Palka  wrote:

>
> Hi all,
>
> Did anything bad happen to the RC5? I mean I cannot see any anouncement
> about the release on the wicket.apache.org. Was the release been canceled
> or
> delayed?
>
> cheers,
> Marcin
> --
> View this message in context:
> http://www.nabble.com/-announce--Wicket-1.4-RC5-released-tp24101241p24182619.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: [announce] Wicket 1.4-RC5 released

2009-06-24 Thread Marcin Palka

Hi all,

Did anything bad happen to the RC5? I mean I cannot see any anouncement
about the release on the wicket.apache.org. Was the release been canceled or
delayed?

cheers,
Marcin
-- 
View this message in context: 
http://www.nabble.com/-announce--Wicket-1.4-RC5-released-tp24101241p24182619.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: AttributeModifier not added to a ListView item via an AjaxLink

2009-06-24 Thread Vasu Srinivasan
Ive got a very similar thing working.

I think you may have to return the "highlight" value dynamically. Try this
alternative:

item.add(new AttributeModifier("class", true, new AbstractReadOnlyModel() {
  @Override public Object getObject() {
  return "highlight"
  }
});

On Tue, Jun 23, 2009 at 5:56 PM, Azzeddine Daddah wrote:

> Hi Wicket users,
>
> I've a ListView in a ListView. The 1st ListVeiw holds "categories".
> The 2nd ListView holds links (topics) which I want to be highlighted
> if the link (topic) is clicked. The problem is that the wrapped list
> (container) is getting refreshed, but the CSS class is not set for the
> corresponding list item.
> Below my code:
>
> TestPage.java
> 
> import java.io.Serializable;
> import java.util.ArrayList;
> import java.util.Arrays;
> import java.util.List;
>
> import org.apache.wicket.AttributeModifier;
> import org.apache.wicket.ajax.AjaxRequestTarget;
> import org.apache.wicket.ajax.markup.html.AjaxLink;
> import org.apache.wicket.markup.html.WebMarkupContainer;
> import org.apache.wicket.markup.html.basic.Label;
> import org.apache.wicket.markup.html.list.ListItem;
> import org.apache.wicket.markup.html.list.ListView;
> import org.apache.wicket.model.Model;
> import org.wicketstuff.annotation.mount.MountPath;
>
> import com.hbiloo.receptino.web.page.template.PageWithoutSideBar;
>
> @MountPath(path = "test")
> public class TestPage extends PageWithoutSideBar {
>
>@SuppressWarnings("serial")
>public TestPage() {
>final WebMarkupContainer container = new
> WebMarkupContainer("container");
>container.setOutputMarkupId(true);
>
>container.add(new ListView("categories",
> buildCategories()) {
>@Override
>protected void populateItem(ListItem item)
> {
>Category category = item.getModelObject();
>item.add(new Label("category",
> category.getName()));
>item.add(new ListView("topics",
> category.getTopics()) {
>@Override
>protected void populateItem(final
> ListItem item) {
>Topic topic =
> item.getModelObject();
>AjaxLink topicLink =
> (new AjaxLink("topicLink") {
>@Override
>public void
> onClick(AjaxRequestTarget target) {
>
>  target.addComponent(container);
>item.add(new
> AttributeModifier("class", true, new
> Model("highlight")));
>}
>});
>topicLink.add(new
> Label("topic", topic.getName()));
>item.add(topicLink);
>}
>});
>}
>});
>add(container);
>}
>
>@SuppressWarnings("serial")
>private class Category implements Serializable {
>private String name;
>private List topics;
>
>public Category(String name, List topics) {
>this.name = name;
>this.topics = topics;
>}
>
>public String getName() {
>return name;
>}
>
>public List getTopics() {
>return topics;
>}
>}
>
>@SuppressWarnings("serial")
>private class Topic implements Serializable {
>private String name;
>
>public Topic(String name) {
>this.name = name;
>}
>
>public String getName() {
>return name;
>}
>}
>
>private List buildCategories() {
>List categories = new ArrayList();
>categories.add(new Category("Movies", Arrays.asList(new
> Topic("Mamma"),
>new Topic("USA"), new Topic("NL";
>categories.add(new Category("Articles", Arrays.asList(
>new Topic("Test"), new
> Topic("Nederland";
>categories.add(new Category("Images", Arrays.asList(new
> Topic("Mag"),
>new Topic("Spullen"), new Topic("Mamma
> mia";
>categories.add(new Category("Links", Arrays.asList(new
> Topic("Ana"),
>new Topic("Smiti"), new Topic("Hbiloo"), new
> Topic("Yeeh";
>return categories

Re: ModalWindow and IE8 question

2009-06-24 Thread Per Lundholm
A reset button! Should we laugh or cry? :-/

/Per

On Tue, Jun 23, 2009 at 10:26 PM, Flavius wrote:
>
>
> I cleared all cache and it still wasn't prompting the modal window.
> What I did do was go and "reset" IE8 by going to tools -> Internet Options
> -> Advanced tab and pressing the "Reset" button.  Apparently this
> makes it "just like a fresh install" and that fixed it!
>
> Don't ask me why clearing the cache didn't do it but that did, unless
> clearing the cache and closing the browser really doesn't clear
> the cache completely.  I did uncheck the "Preserve Favorites website data"
> in the Delete Browsing History dialog.
>
> Anyway, thanks Matej!  I appreciate your help.
>
>
>
>
> Matej Knopp-2 wrote:
>>
>> couldn't it be old javascript file in your browser cache?
>>
>> -Matej
>>
>> On Tue, Jun 23, 2009 at 8:25 PM, Per Lundholm
>> wrote:
>>> I don't know if it helps, but it works with IE8 on XP so there is
>>> something nasty about Vista
>>>
>>> /Per
>>>
>>> On Tue, Jun 23, 2009 at 8:17 PM, Flavius wrote:

 I'm starting to get users running Vista with IE8 (8.0.6001.18783)
 report that they can't open modal dialog boxes.

 I searched through nabble and jira.  I found issue 2207 which I
 understood to correct this:

 https://issues.apache.org/jira/browse/WICKET-2207

 However, I'm testing with Wicket 1.3.6 (and extensions and datetime
 1.3.6 as well) and the modal dialog is not opening.

 I also tested this with 1.4-rc4 and it's not working there either.

 I put the examples up here:

 http://68.15.93.72/wicket-examples-1.3.6/ajax/modal-window
 http://68.15.93.72/wicket-examples-1.4-rc4/ajax/modal-window

 If I go here and try to open these with IE8 on Vista, they don't
 open.  It works with other browsers I've tested with (ff, safari 3/4,
 IE6/7).

 Can anybody give me any insight to this?
 Thanks very much.


 -
 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
>>
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/ModalWindow-and-IE8-question-tp24171801p24173623.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: Any examples of a multiselect box in Wicket

2009-06-24 Thread Mark Clarke

thanks Igor,

that helped.

Igor Vaynberg wrote:

ListMultipleChoice

or Select/SelectOption

these both allow you to select multiple items from the list, examples
to both can be found in component reference.

-igor

On Tue, Jun 23, 2009 at 1:17 PM,  wrote:
  

Hi all,

Ok done some test and it looks like wicket can't handle this use case. I
have tried the extensions select class and SelectOptions but it seems to
work the same as dropdownchoice.

There appears to be no example of a multi select for wicket on the net. I
am beginning to think I should abandon the attempt to use multi-select.
Any last minute pointers?

thanks


-
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