Re: How to support multiple themes in Wicket application.

2010-06-15 Thread wicketyan
I have not try it.but wicket component doc say supporting:

Style - The style (skin) for a component is available through getStyle(), 
which is equivalent to getSession().getStyle(). Styles are intended to give a 
particular look to a Component or Resource that is independent of its Locale. 
For example, a style might be a set of resources, including images and markup 
files, which gives the design look of ocean to the user. If the Session's 
style is set to ocean and these resources are given names suffixed with 
_ocean, Wicket's resource management logic will prefer these resources to 
other resources, such as default resources, which are not as good of a match. 


2010-06-15 



wicketyan 



发件人: Duy Do 
发送时间: 2010-06-15  12:05:59 
收件人: users 
抄送: 
主题: How to support multiple themes in Wicket application. 
 
Hi all,
I would like to support multiple themes in Wicket application like
Wordpress, Drupal. Could you please give me suggestion?
Thanks and regards,
Duy


Re: DataTable in DataTable

2010-06-15 Thread midikem

columns.add(new LinkPropertyColumntest(new StringResourceModel(one, this,
null), ONE, one){
private static final long serialVersionUID = 1L;

@Override
public void onClick(Item item, String componentId, IModeltest model) {
try {
new SubRowPage(getDao(), model.getObject());
} catch (ApplicationException e) {
error(e);
}
}
});

I am still a little bit confused on this. Any tips on witch method to use or
how to add the new datatable below the line that i am clicking on? 
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DataTable-in-DataTable-tp2242922p2255547.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: How to support multiple themes in Wicket application.

2010-06-15 Thread Chris Colman
It depends on whether your themes can be purely defined by styles or
whether some layout changes are also required to support different
themes. Often our themes have required some layout changes in
combination with style changes and so we use markup 'variations' to
handle that.

-Original Message-
From: Duy Do [mailto:doquoc...@gmail.com]
Sent: Tuesday, 15 June 2010 2:05 PM
To: users@wicket.apache.org
Subject: How to support multiple themes in Wicket application.

Hi all,

I would like to support multiple themes in Wicket application like
Wordpress, Drupal. Could you please give me suggestion?

Thanks and regards,
Duy

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



RE: How to support multiple themes in Wicket application.

2010-06-15 Thread Alex Rass
You guys should check out this site:
http://www.csszengarden.com/

Note the links on the right. Click them - they'll turn same site into a
completely different themes (not even close) by using nothing but CSS.

So if you code your site right for CSS, swapping/adding themes should be a
no-brainer!

- Alex

-Original Message-
From: Chris Colman [mailto:chr...@stepaheadsoftware.com] 
Sent: Tuesday, June 15, 2010 4:56 AM
To: users@wicket.apache.org
Subject: RE: How to support multiple themes in Wicket application.

It depends on whether your themes can be purely defined by styles or whether
some layout changes are also required to support different themes. Often our
themes have required some layout changes in combination with style changes
and so we use markup 'variations' to handle that.

-Original Message-
From: Duy Do [mailto:doquoc...@gmail.com]
Sent: Tuesday, 15 June 2010 2:05 PM
To: users@wicket.apache.org
Subject: How to support multiple themes in Wicket application.

Hi all,

I would like to support multiple themes in Wicket application like 
Wordpress, Drupal. Could you please give me suggestion?

Thanks and regards,
Duy

-
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



is this a bug in ModelT?

2010-06-15 Thread Alex Rass
Hi.

Was writing some code and encountered that 
org.apache.wicket.model.Model T

Always uses direct references to 'object' variable directly. And never as
getObject().
This may hinder overriding methods.

(I found this cause I overwrote getObject() and NOTHING changed :)  
I then looked at the source and knew how to fix it)

Bug or feature?

This is Wicket 1.4.7

- Alex 


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



Re: is this a bug in ModelT?

2010-06-15 Thread Martin Makundi
I did something similar and it works.

**
Martin

2010/6/15 Alex Rass a...@itbsllc.com:
 Hi.

 Was writing some code and encountered that
 org.apache.wicket.model.Model T

 Always uses direct references to 'object' variable directly. And never as
 getObject().
 This may hinder overriding methods.

 (I found this cause I overwrote getObject() and NOTHING changed :)
 I then looked at the source and knew how to fix it)

 Bug or feature?

 This is Wicket 1.4.7

 - Alex


 -
 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: Creating and zipping binary files for download

2010-06-15 Thread Alex Rass
You should consider that 2 users can be doing it at the same time.
Which will lead to serious errors.
I would suggest using a random file name (or one with session hash in the
filename) so you avoid userA downloading userB's download.zip

I would think that you should be able to just stream it right back to the
client as a redirect or smth. This temporary file thing seems very improper.

- Alex 

-Original Message-
From: Alex Zeit [mailto:zeita...@googlemail.com] 
Sent: Sunday, May 30, 2010 7:30 AM
To: users@wicket.apache.org
Subject: Re: Creating and zipping binary files for download

Thank you very much Jeremy for your help. As you suggested I create
temporary dir and place files there.
Wicket is really great! The solution to my problem was just in couple of
lines of code:

org.apache.wicket.util.file.File wdir = new
org.apache.wicket.util.file.File(createTempDirectory());
ZipResourceStream zrs = new ZipResourceStream(wdir);
ResourceStreamRequestTarget target = new
ResourceStreamRequestTarget(zrs, download.zip);
RequestCycle.get().setRequestTarget(target);


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



RE: is this a bug in ModelT?

2010-06-15 Thread Alex Rass
No, Martin, it can't work.
Look at the implementation.

ALL other methods use object directly.
SO if you just override getObject you'll endup with a broken:
equals(), hashCode(), toString() methods (which breaks any form of caching)
detach() would also be broken.

So no, it can't work.
You HAVE to super.setObject() or setObject() directly and use internal
object to use ModelT class.
Which is not deadly, but a need to know.

Hence: is it a bug or a feature?
Igor? :)

- Alex 


-Original Message-
From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] 
Sent: Tuesday, June 15, 2010 6:11 AM
To: users@wicket.apache.org
Subject: Re: is this a bug in ModelT?

I did something similar and it works.

**
Martin

2010/6/15 Alex Rass a...@itbsllc.com:
 Hi.

 Was writing some code and encountered that 
 org.apache.wicket.model.Model T

 Always uses direct references to 'object' variable directly. And never 
 as getObject().
 This may hinder overriding methods.

 (I found this cause I overwrote getObject() and NOTHING changed :) I 
 then looked at the source and knew how to fix it)

 Bug or feature?

 This is Wicket 1.4.7

 - Alex


 -
 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: is this a bug in ModelT?

2010-06-15 Thread Martin Makundi
I concur.

**
Martin

2010/6/15 Alex Rass a...@itbsllc.com:
 No, Martin, it can't work.
 Look at the implementation.

 ALL other methods use object directly.
 SO if you just override getObject you'll endup with a broken:
 equals(), hashCode(), toString() methods (which breaks any form of caching)
 detach() would also be broken.

 So no, it can't work.
 You HAVE to super.setObject() or setObject() directly and use internal
 object to use ModelT class.
 Which is not deadly, but a need to know.

 Hence: is it a bug or a feature?
 Igor? :)

 - Alex


 -Original Message-
 From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com]
 Sent: Tuesday, June 15, 2010 6:11 AM
 To: users@wicket.apache.org
 Subject: Re: is this a bug in ModelT?

 I did something similar and it works.

 **
 Martin

 2010/6/15 Alex Rass a...@itbsllc.com:
 Hi.

 Was writing some code and encountered that
 org.apache.wicket.model.Model T

 Always uses direct references to 'object' variable directly. And never
 as getObject().
 This may hinder overriding methods.

 (I found this cause I overwrote getObject() and NOTHING changed :) I
 then looked at the source and knew how to fix it)

 Bug or feature?

 This is Wicket 1.4.7

 - Alex


 -
 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: How to support multiple themes in Wicket application.

2010-06-15 Thread Russell Simpkins

 I would like to support multiple themes in Wicket application like 
 Wordpress, Drupal. Could you please give me suggestion?
I would make sure that every element has class set. I would also recommend 
always setting component.setMarkupId(String id) for your components so that you 
can style on ID and Class. Then you can play around with setting the name of 
the selected stylesheet in the application session store.
Russ

 

  
_
The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail.
http://www.windowslive.com/campaign/thenewbusy?tile=multiaccountocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4

wicketstuff-repo

2010-06-15 Thread Marc Ende
Hi,

is there another wicketstuff-repo (a mirror for example)? Wicketstuff is now
down for some days and
I'll need some artifacts from the repo.

marc


Re: wicketstuff-repo

2010-06-15 Thread nino martinez wael
someone mentioned sonatype..Search the list for sonatype..

2010/6/15 Marc Ende mli...@e-beyond.de

 Hi,

 is there another wicketstuff-repo (a mirror for example)? Wicketstuff is
 now
 down for some days and
 I'll need some artifacts from the repo.

 marc



Re: wicketstuff-repo

2010-06-15 Thread Marc Ende
Ah, I've found it:
http://repo1.maven.org/maven2/org/wicketstuff/

Thanks

marc

2010/6/15 nino martinez wael nino.martinez.w...@gmail.com

 someone mentioned sonatype..Search the list for sonatype..

 2010/6/15 Marc Ende mli...@e-beyond.de

  Hi,
 
  is there another wicketstuff-repo (a mirror for example)? Wicketstuff is
  now
  down for some days and
  I'll need some artifacts from the repo.
 
  marc
 



Re: wicketstuff-repo

2010-06-15 Thread Michael O'Cleirigh

Hello,

The release artifacts for wicketstuff-core since 1.4.7 have been 
deployed through sonatype and are available through maven central.


http://repo2.maven.org/maven2/org/wicketstuff/

This is only for the projects in wicketstuff-core directory structure, 
if you are looking at one of the other projects you will have to 
download the source and compile it right now until wicketstuff.org is 
back up.


Regards,

Mike

someone mentioned sonatype..Search the list for sonatype..

2010/6/15 Marc Endemli...@e-beyond.de

   

Hi,

is there another wicketstuff-repo (a mirror for example)? Wicketstuff is
now
down for some days and
I'll need some artifacts from the repo.

marc

 
   



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



Re: Creating and zipping binary files for download

2010-06-15 Thread Jeremy Thomerson
On Tue, Jun 15, 2010 at 5:24 AM, Alex Rass a...@itbsllc.com wrote:

 You should consider that 2 users can be doing it at the same time.
 Which will lead to serious errors.
 I would suggest using a random file name (or one with session hash in the
 filename) so you avoid userA downloading userB's download.zip

 I would think that you should be able to just stream it right back to the
 client as a redirect or smth. This temporary file thing seems very
 improper.

 - Alex


You don't even have to do all that random naming stuff yourself.  Just use a
Resource that's local to the user's session and Wicket will create the URL
for you.  That also saves him from having to write it out to a file at all -
he can just stream it back if desired.

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


Wicket wins in mobile site performance

2010-06-15 Thread Joachim F. Kainz
Fellow Wicket Users,

Just in case anybody here needs more help with arguing for Wicket in
their companies:

Not only is Walmart Mobile (http://mobile.walmart.com) using Wicket, but
it also helped the site to be ranked No. 1 in performance by Gomez:
(http://www.mobilemarketer.com/cms/news/research/6542.html)

Best regards,

Joachim
http://www.jolira.com



Question about markup inheritance and page layouts

2010-06-15 Thread Brown, Berlin [GCG-PFS]
I was a little confused about page layouts and markup inheritance.  I
was thinking that a I could take a piece of HTML markup and reuse that
component when I need to, and use it multiple times within page without
ever having to create the content.  
 
I was not able to do this.  What I have now, it seems I can only use
parent child inheritance with one sub-component.

Pseudo Code 
 
BasePage.java:
 
public abstract class BasePage extends WebPage {
 
public BasePage(final PageParameters parameters) {
}   
}
 
BasePage.html:
 
html 
  wicket:child /
/html
 

 
SomePage.java
 
public class SomePage extends BasePage {
 
public SomePage(final PageParameters parameters) {
}   
}
 
SomePage.html:
wicket:extend
div
  div wicket:id=myPanel/div
  div wicket:id=myPanel1/div
/div
/wicket:extend
 

 
BasePanel.java 
...
 
BasePanel.html
div
   wicket:child /
/div
 
MyPanel1.java extends BasePanel
...
 
MyPane1l.html
wicket:extend  
div   
/div
/wicket:extend
 

 
Basically:
 
BasePage has child page - Some Page ... Some Page has child panels
BasePanel - My Panel and My Panel1
...
 
I don't get the output I would expect.  It looks like the markup
inheritance stops at SomePage and doesn't recognize
 the BasePanel HTML child code.
 
My intended goal is to avoid duplicating HTML content, what is the best
way to achieve that.  Maybe I should use markup inheritance for the
panel instead of the page?
 
 


Re: Question about markup inheritance and page layouts

2010-06-15 Thread Jeremy Thomerson
On Tue, Jun 15, 2010 at 10:07 AM, Brown, Berlin [GCG-PFS] 
berlin.br...@primerica.com wrote:

 I was a little confused about page layouts and markup inheritance.  I
 was thinking that a I could take a piece of HTML markup and reuse that
 component when I need to, and use it multiple times within page without
 ever having to create the content.

 I was not able to do this.  What I have now, it seems I can only use
 parent child inheritance with one sub-component.

 Pseudo Code 

 BasePage.java:

 public abstract class BasePage extends WebPage {

public BasePage(final PageParameters parameters) {
}
 }

 BasePage.html:

 html
  wicket:child /
 /html

 

 SomePage.java

 public class SomePage extends BasePage {

public SomePage(final PageParameters parameters) {
}
 }

 SomePage.html:
 wicket:extend
 div
  div wicket:id=myPanel/div
  div wicket:id=myPanel1/div
 /div
 /wicket:extend

 

 BasePanel.java
 ...

 BasePanel.html
 div
   wicket:child /
 /div

 MyPanel1.java extends BasePanel
 ...

 MyPane1l.html
 wicket:extend
 div
 /div
 /wicket:extend

 

 Basically:

 BasePage has child page - Some Page ... Some Page has child panels
 BasePanel - My Panel and My Panel1
 ...

 I don't get the output I would expect.  It looks like the markup
 inheritance stops at SomePage and doesn't recognize
  the BasePanel HTML child code.

 My intended goal is to avoid duplicating HTML content, what is the best
 way to achieve that.  Maybe I should use markup inheritance for the
 panel instead of the page?



Where did you place the wicket:panel tags in your markup?

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


Re: Wicket and mobile browsers

2010-06-15 Thread Joachim F. Kainz
Giovanni,

I am one of the developers of mobile.walmart.com. We are using Wicket to
support all types of cell phones, but most of our traffic is from smart
phones. If you point to our site using iPhone, Blackberry, and Motorola
Razor you get three different experience. All three experiences are
backed by the same Java code.

We have nothing to do with visural wicket (even though at first glance
it looks interesting). Our opensource components are at
http://code.google.com/p/jolira-tools/ 

Best regards,

Joachim
http://www.jolira.com

On Sun, 2010-04-18 at 13:02 -0500, Jeremy Thomerson wrote: 

 There are many classes of smart phones available.  Some support n JS, some
 very limited, while others support just about anything you can put in a
 regular browser.  Because of this, you may use the same java code with three
 or four different styles of markup so that each browser class has its own
 markup.
 
 Search the list for mobile.walmart.com and see the post made by the guys
 that created that site.  It talked about this.  They also released some open
 source components - visural wicket.
 
 --
 Jeremy Thomerson
 http://www.wickettraining.com
 
 
 
 On Sun, Apr 18, 2010 at 3:17 AM, Giovanni pino_o...@yahoo.com wrote:
 
  I need to write a web application which will be accessed via mobile
  browsers from smartphones.
 
  What are the smartphone browsers which work well with Wicket?
 
  What kind of attention should I pay during the development of Wicket
  applications for mobile devices?
 
  Is there any tutorial about developing Wicket applications for mobile
  target browsers?
 
  Thanks in advance for any help.
 
  giovanni
 
 
 
 


RE: Question about markup inheritance and page layouts

2010-06-15 Thread Brown, Berlin [GCG-PFS]
 

-Original Message-
From: Jeremy Thomerson [mailto:jer...@wickettraining.com] 
Sent: Tuesday, June 15, 2010 11:26 AM
To: users@wicket.apache.org
Cc: Berlin Brown
Subject: Re: Question about markup inheritance and page layouts

On Tue, Jun 15, 2010 at 10:07 AM, Brown, Berlin [GCG-PFS] 
berlin.br...@primerica.com wrote:

 I was a little confused about page layouts and markup inheritance.  I 
 was thinking that a I could take a piece of HTML markup and reuse that

 component when I need to, and use it multiple times within page 
 without ever having to create the content.

 I was not able to do this.  What I have now, it seems I can only use 
 parent child inheritance with one sub-component.

 Pseudo Code 

 BasePage.java:

 public abstract class BasePage extends WebPage {

public BasePage(final PageParameters parameters) {
}
 }

 BasePage.html:

 html
  wicket:child /
 /html

 

 SomePage.java

 public class SomePage extends BasePage {

public SomePage(final PageParameters parameters) {
}
 }

 SomePage.html:
 wicket:extend
 div
  div wicket:id=myPanel/div
  div wicket:id=myPanel1/div
 /div
 /wicket:extend

 

 BasePanel.java
 ...

 BasePanel.html
 div
   wicket:child /
 /div

 MyPanel1.java extends BasePanel
 ...

 MyPane1l.html
 wicket:extend
 div
 /div
 /wicket:extend

 

 Basically:

 BasePage has child page - Some Page ... Some Page has child panels 
 BasePanel - My Panel and My Panel1 ...

 I don't get the output I would expect.  It looks like the markup 
 inheritance stops at SomePage and doesn't recognize  the BasePanel

 HTML child code.

 My intended goal is to avoid duplicating HTML content, what is the 
 best way to achieve that.  Maybe I should use markup inheritance for 
 the panel instead of the page?



Where did you place the wicket:panel tags in your markup?

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


They are in the SomePage:

 SomePage.html:
 wicket:extend
 div
  div wicket:id=myPanel/div
  div wicket:id=myPanel1/div
 /div
 /wicket:extend



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



Re: Wicket and mobile browsers

2010-06-15 Thread Jeremy Thomerson
On Tue, Jun 15, 2010 at 10:26 AM, Joachim F. Kainz j...@jolira.com wrote:

 We have nothing to do with visural wicket


Oops - my bad.  Jolira / Visural - all the names jumble in my head after a
while.

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


Re: Question about markup inheritance and page layouts

2010-06-15 Thread Jeremy Thomerson

 
 Where did you place the wicket:panel tags in your markup?

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


 They are in the SomePage:

  SomePage.html:
  wicket:extend
  div
   div wicket:id=myPanel/div
   div wicket:id=myPanel1/div
  /div
  /wicket:extend


No, the wicket:panel tags that must appear in the panel html files - where
are they?

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


Re: Wicket and mobile browsers

2010-06-15 Thread Martin Funk
Hi Giovanni,

on what basis do you do the device recognition and classification?

Currently we are looking into wurfl http://wurfl.sourceforge.net/
Any opion on tha? Or do you know of an alternative to wurfl?

mf

2010/6/15 Joachim F. Kainz j...@jolira.com

 Giovanni,

 I am one of the developers of mobile.walmart.com. We are using Wicket to
 support all types of cell phones, but most of our traffic is from smart
 phones. If you point to our site using iPhone, Blackberry, and Motorola
 Razor you get three different experience. All three experiences are
 backed by the same Java code.

 We have nothing to do with visural wicket (even though at first glance
 it looks interesting). Our opensource components are at
 http://code.google.com/p/jolira-tools/

 Best regards,

 Joachim
 http://www.jolira.com

 On Sun, 2010-04-18 at 13:02 -0500, Jeremy Thomerson wrote:

  There are many classes of smart phones available.  Some support n JS,
 some
  very limited, while others support just about anything you can put in a
  regular browser.  Because of this, you may use the same java code with
 three
  or four different styles of markup so that each browser class has its own
  markup.
 
  Search the list for mobile.walmart.com and see the post made by the
 guys
  that created that site.  It talked about this.  They also released some
 open
  source components - visural wicket.
 
  --
  Jeremy Thomerson
  http://www.wickettraining.com
 
 
 
  On Sun, Apr 18, 2010 at 3:17 AM, Giovanni pino_o...@yahoo.com wrote:
 
   I need to write a web application which will be accessed via mobile
   browsers from smartphones.
  
   What are the smartphone browsers which work well with Wicket?
  
   What kind of attention should I pay during the development of Wicket
   applications for mobile devices?
  
   Is there any tutorial about developing Wicket applications for mobile
   target browsers?
  
   Thanks in advance for any help.
  
   giovanni
  
  
  
  



RE: Question about markup inheritance and page layouts

2010-06-15 Thread Brown, Berlin [GCG-PFS]
 

-Original Message-
From: Jeremy Thomerson [mailto:jer...@wickettraining.com] 
Sent: Tuesday, June 15, 2010 11:34 AM
To: users@wicket.apache.org
Cc: Berlin Brown
Subject: Re: Question about markup inheritance and page layouts


 
 Where did you place the wicket:panel tags in your markup?

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


 They are in the SomePage:

  SomePage.html:
  wicket:extend
  div
   div wicket:id=myPanel/div
   div wicket:id=myPanel1/div
  /div
  /wicket:extend


No, the wicket:panel tags that must appear in the panel html files -
where are they?

Ooops, I got it working now and all the inheritance works as expected:

In my base panel, I didn't include the wicket:panel (but I did put it in
the implemeting panel html)

Base Panel.html:

wicket:panel
...
/wicket:panel

That change above, fixed the problem.
--
Jeremy Thomerson
http://www.wickettraining.com


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



RE: is this a bug in ModelT?

2010-06-15 Thread Rodolfo Hansen
Are you sure you want to override Model in the first place?
Di you see LoadableDetachableModel ?

Model is not ment to be an abstract class, 
I would argue its not a bug, but that would be a whole other debate...

On Tue, 2010-06-15 at 06:56 -0400, Alex Rass wrote:

 No, Martin, it can't work.
 Look at the implementation.
 
 ALL other methods use object directly.
 SO if you just override getObject you'll endup with a broken:
 equals(), hashCode(), toString() methods (which breaks any form of caching)
 detach() would also be broken.
 
 So no, it can't work.
 You HAVE to super.setObject() or setObject() directly and use internal
 object to use ModelT class.
 Which is not deadly, but a need to know.
 
 Hence: is it a bug or a feature?
 Igor? :)
 
 - Alex 
 
 
 -Original Message-
 From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] 
 Sent: Tuesday, June 15, 2010 6:11 AM
 To: users@wicket.apache.org
 Subject: Re: is this a bug in ModelT?
 
 I did something similar and it works.
 
 **
 Martin
 
 2010/6/15 Alex Rass a...@itbsllc.com:
  Hi.
 
  Was writing some code and encountered that 
  org.apache.wicket.model.Model T
 
  Always uses direct references to 'object' variable directly. And never 
  as getObject().
  This may hinder overriding methods.
 
  (I found this cause I overwrote getObject() and NOTHING changed :) I 
  then looked at the source and knew how to fix it)
 
  Bug or feature?
 
  This is Wicket 1.4.7
 
  - Alex
 
 
  -
  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: is this a bug in ModelT?

2010-06-15 Thread Igor Vaynberg
it is a bug, open a jira issue

-igor

On Tue, Jun 15, 2010 at 9:03 AM, Rodolfo Hansen kry...@gmail.com wrote:
 Are you sure you want to override Model in the first place?
 Di you see LoadableDetachableModel ?

 Model is not ment to be an abstract class,
 I would argue its not a bug, but that would be a whole other debate...

 On Tue, 2010-06-15 at 06:56 -0400, Alex Rass wrote:

 No, Martin, it can't work.
 Look at the implementation.

 ALL other methods use object directly.
 SO if you just override getObject you'll endup with a broken:
 equals(), hashCode(), toString() methods (which breaks any form of caching)
 detach() would also be broken.

 So no, it can't work.
 You HAVE to super.setObject() or setObject() directly and use internal
 object to use ModelT class.
 Which is not deadly, but a need to know.

 Hence: is it a bug or a feature?
 Igor? :)

 - Alex


 -Original Message-
 From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com]
 Sent: Tuesday, June 15, 2010 6:11 AM
 To: users@wicket.apache.org
 Subject: Re: is this a bug in ModelT?

 I did something similar and it works.

 **
 Martin

 2010/6/15 Alex Rass a...@itbsllc.com:
  Hi.
 
  Was writing some code and encountered that
  org.apache.wicket.model.Model T
 
  Always uses direct references to 'object' variable directly. And never
  as getObject().
  This may hinder overriding methods.
 
  (I found this cause I overwrote getObject() and NOTHING changed :) I
  then looked at the source and knew how to fix it)
 
  Bug or feature?
 
  This is Wicket 1.4.7
 
  - Alex
 
 
  -
  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: is this a bug in ModelT?

2010-06-15 Thread avrahamr

Another option would be to directly implement IModelT.

On Tue, Jun 15, 2010 at 7:04 PM, Rodolfo Hansen [via Apache Wicket] 
ml-node+2256139-803998731-293...@n4.nabble.comml-node%2b2256139-803998731-293...@n4.nabble.com
 wrote:

 Are you sure you want to override Model in the first place?
 Di you see LoadableDetachableModel ?

 Model is not ment to be an abstract class,
 I would argue its not a bug, but that would be a whole other debate...

 On Tue, 2010-06-15 at 06:56 -0400, Alex Rass wrote:

  No, Martin, it can't work.
  Look at the implementation.
 
  ALL other methods use object directly.
  SO if you just override getObject you'll endup with a broken:
  equals(), hashCode(), toString() methods (which breaks any form of
 caching)
  detach() would also be broken.
 
  So no, it can't work.
  You HAVE to super.setObject() or setObject() directly and use internal
  object to use ModelT class.
  Which is not deadly, but a need to know.
 
  Hence: is it a bug or a feature?
  Igor? :)
 
  - Alex
 
 
  -Original Message-
  From: Martin Makundi [mailto:[hidden 
  email]http://user/SendEmail.jtp?type=nodenode=2256139i=0]

  Sent: Tuesday, June 15, 2010 6:11 AM
  To: [hidden email]http://user/SendEmail.jtp?type=nodenode=2256139i=1
  Subject: Re: is this a bug in ModelT?
 
  I did something similar and it works.
 
  **
  Martin
 
  2010/6/15 Alex Rass [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=2256139i=2:

   Hi.
  
   Was writing some code and encountered that
   org.apache.wicket.model.Model T
  
   Always uses direct references to 'object' variable directly. And never
   as getObject().
   This may hinder overriding methods.
  
   (I found this cause I overwrote getObject() and NOTHING changed :) I
   then looked at the source and knew how to fix it)
  
   Bug or feature?
  
   This is Wicket 1.4.7
  
   - Alex
  
  
   -
   To unsubscribe, e-mail: [hidden 
   email]http://user/SendEmail.jtp?type=nodenode=2256139i=3
   For additional commands, e-mail: [hidden 
   email]http://user/SendEmail.jtp?type=nodenode=2256139i=4
  
  
 
  -
  To unsubscribe, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=2256139i=5
  For additional commands, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=2256139i=6
 
 
 
  -
  To unsubscribe, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=2256139i=7
  For additional commands, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=2256139i=8
 




 --
  View message @
 http://apache-wicket.1842946.n4.nabble.com/is-this-a-bug-in-Model-T-tp2255650p2256139.html
 To start a new topic under Wicket - User, email
 ml-node+1842947-1647783149-293...@n4.nabble.comml-node%2b1842947-1647783149-293...@n4.nabble.com
 To unsubscribe from Wicket - User, click 
 herehttp://apache-wicket.1842946.n4.nabble.com/subscriptions/Unsubscribe.jtp?code=YXZyYWhhbXJAZ21haWwuY29tfDE4NDI5NDd8LTEwNzY0NzQ1ODc=.





-- 
[]'s
Avraham Rosenzweig
avrah...@gmail.com

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/is-this-a-bug-in-Model-T-tp2255650p2256282.html
Sent from the Wicket - User mailing list archive at Nabble.com.


WebResponse ContentLength 2G

2010-06-15 Thread Louis Letourneau
I'm trying to send a file 2G using ResourceStreamRequestTarget +
FileResourceStream, but the content-type is always set to a big negative
value typical of a long(2G) to int conversion.
This is non-standard and the proxy we use refuses it (most browser just
ignore it, but the RFC states that the value must be 0).

After looking deeper in the code I see that, in wicket, longs are used
for the content length across the board, but when this is transfered to
a HttpServletResponse there is an (int) cast.

Shouldn't wicket use ints to remove the confusion, or if not (and I
think this is the best course), shouldn't a test be made
if  Integer.MAX_VALUE
  httpServletResponse.addHeader(Content-Length, Long.toString(length));

instead
?

I tried the last approach overriding newWebResponse on WebApplication
with my custom WebResponse and it fixed my problem.

Should I open a bug?

Thanks
Louis

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



Re: WebResponse ContentLength 2G

2010-06-15 Thread Igor Vaynberg
yes, and attach your fix.

-igor

On Tue, Jun 15, 2010 at 10:47 AM, Louis Letourneau
louis.letourn...@mail.mcgill.ca wrote:
 I'm trying to send a file 2G using ResourceStreamRequestTarget +
 FileResourceStream, but the content-type is always set to a big negative
 value typical of a long(2G) to int conversion.
 This is non-standard and the proxy we use refuses it (most browser just
 ignore it, but the RFC states that the value must be 0).

 After looking deeper in the code I see that, in wicket, longs are used
 for the content length across the board, but when this is transfered to
 a HttpServletResponse there is an (int) cast.

 Shouldn't wicket use ints to remove the confusion, or if not (and I
 think this is the best course), shouldn't a test be made
 if  Integer.MAX_VALUE
  httpServletResponse.addHeader(Content-Length, Long.toString(length));

 instead
 ?

 I tried the last approach overriding newWebResponse on WebApplication
 with my custom WebResponse and it fixed my problem.

 Should I open a bug?

 Thanks
 Louis

 -
 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: WebResponse ContentLength 2G

2010-06-15 Thread Jeremy Thomerson
On Tue, Jun 15, 2010 at 12:47 PM, Louis Letourneau 
louis.letourn...@mail.mcgill.ca wrote:

 I'm trying to send a file 2G using ResourceStreamRequestTarget +
 FileResourceStream, but the content-type is always set to a big negative
 value typical of a long(2G) to int conversion.
 This is non-standard and the proxy we use refuses it (most browser just
 ignore it, but the RFC states that the value must be 0).

 After looking deeper in the code I see that, in wicket, longs are used
 for the content length across the board, but when this is transfered to
 a HttpServletResponse there is an (int) cast.

 Shouldn't wicket use ints to remove the confusion, or if not (and I
 think this is the best course), shouldn't a test be made
 if  Integer.MAX_VALUE
  httpServletResponse.addHeader(Content-Length, Long.toString(length));

 instead
 ?

 I tried the last approach overriding newWebResponse on WebApplication
 with my custom WebResponse and it fixed my problem.

 Should I open a bug?

 Thanks
 Louis

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


yes, please open a jira

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


Re: WebResponse ContentLength 2G

2010-06-15 Thread Jeremy Thomerson
I wonder - would there be any problem just changing that to *always* set the
header to Long.toString(foo)?

On Tue, Jun 15, 2010 at 12:57 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 yes, and attach your fix.

 -igor

 On Tue, Jun 15, 2010 at 10:47 AM, Louis Letourneau
 louis.letourn...@mail.mcgill.ca wrote:
  I'm trying to send a file 2G using ResourceStreamRequestTarget +
  FileResourceStream, but the content-type is always set to a big negative
  value typical of a long(2G) to int conversion.
  This is non-standard and the proxy we use refuses it (most browser just
  ignore it, but the RFC states that the value must be 0).
 
  After looking deeper in the code I see that, in wicket, longs are used
  for the content length across the board, but when this is transfered to
  a HttpServletResponse there is an (int) cast.
 
  Shouldn't wicket use ints to remove the confusion, or if not (and I
  think this is the best course), shouldn't a test be made
  if  Integer.MAX_VALUE
   httpServletResponse.addHeader(Content-Length, Long.toString(length));
 
  instead
  ?
 
  I tried the last approach overriding newWebResponse on WebApplication
  with my custom WebResponse and it fixed my problem.
 
  Should I open a bug?
 
  Thanks
  Louis
 
  -
  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




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


Re: Wicket and mobile browsers

2010-06-15 Thread Joachim F. Kainz
Martin,

WURFL is a great solution, but there are some problems with keeping it
up-to-date for commercial applications.

http://www.mobileaware.com/ is a good commercial vendor I have used for
m.wellsfarg.com and other sites. They have an extensive
device-repository and a lot of other useful features for building MWeb
sites. Downside: $$$

Best regards,

Joachim

On Tue, 2010-06-15 at 17:36 +0200, Martin Funk wrote: 

 Hi Giovanni,
 
 on what basis do you do the device recognition and classification?
 
 Currently we are looking into wurfl http://wurfl.sourceforge.net/
 Any opion on tha? Or do you know of an alternative to wurfl?
 
 mf
 
 2010/6/15 Joachim F. Kainz j...@jolira.com
 
  Giovanni,
 
  I am one of the developers of mobile.walmart.com. We are using Wicket to
  support all types of cell phones, but most of our traffic is from smart
  phones. If you point to our site using iPhone, Blackberry, and Motorola
  Razor you get three different experience. All three experiences are
  backed by the same Java code.
 
  We have nothing to do with visural wicket (even though at first glance
  it looks interesting). Our opensource components are at
  http://code.google.com/p/jolira-tools/
 
  Best regards,
 
  Joachim
  http://www.jolira.com
 
  On Sun, 2010-04-18 at 13:02 -0500, Jeremy Thomerson wrote:
 
   There are many classes of smart phones available.  Some support n JS,
  some
   very limited, while others support just about anything you can put in a
   regular browser.  Because of this, you may use the same java code with
  three
   or four different styles of markup so that each browser class has its own
   markup.
  
   Search the list for mobile.walmart.com and see the post made by the
  guys
   that created that site.  It talked about this.  They also released some
  open
   source components - visural wicket.
  
   --
   Jeremy Thomerson
   http://www.wickettraining.com
  
  
  
   On Sun, Apr 18, 2010 at 3:17 AM, Giovanni pino_o...@yahoo.com wrote:
  
I need to write a web application which will be accessed via mobile
browsers from smartphones.
   
What are the smartphone browsers which work well with Wicket?
   
What kind of attention should I pay during the development of Wicket
applications for mobile devices?
   
Is there any tutorial about developing Wicket applications for mobile
target browsers?
   
Thanks in advance for any help.
   
giovanni
   
   
   
   
 


Newbie question anti-patterns and wicket, constructor component building

2010-06-15 Thread Brown, Berlin [GCG-PFS]
I am sorry, am just getting used to Wicket but I notice a lot of use of
calling a lot of code in the constructor.  Does it really matter?  I
mention it because this kind of style makes it difficult to test code
because code in the constructor may fail and the object won't be
created.
 
Should I just create a method and call that method in the constructor?


Re: Newbie question anti-patterns and wicket, constructor component building

2010-06-15 Thread Jeremy Thomerson
On Tue, Jun 15, 2010 at 2:11 PM, Brown, Berlin [GCG-PFS] 
berlin.br...@primerica.com wrote:

 I am sorry, am just getting used to Wicket but I notice a lot of use of
 calling a lot of code in the constructor.  Does it really matter?  I
 mention it because this kind of style makes it difficult to test code
 because code in the constructor may fail and the object won't be
 created.

 Should I just create a method and call that method in the constructor?


The constructor is supposed to construct the object.  In Wicket, this also
(typically) means constructing the component hierarchy.  So, your
constructor should be doing things like add(new FooPanel(foo, new
SomeModel()));  It should NOT be doing things like:

ListFoo foos = SomeDao.loadAll();
new FooPanel(foo, foos);

That's the kind of code I see newbs putting in their constructor all the
time - and it should NOT be there.

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


RE: Newbie question anti-patterns and wicket, constructor component building

2010-06-15 Thread Brown, Berlin [GCG-PFS]
 

-Original Message-
From: Jeremy Thomerson [mailto:jer...@wickettraining.com] 
Sent: Tuesday, June 15, 2010 3:25 PM
To: users@wicket.apache.org
Subject: Re: Newbie question anti-patterns and wicket, constructor
component building

On Tue, Jun 15, 2010 at 2:11 PM, Brown, Berlin [GCG-PFS] 
berlin.br...@primerica.com wrote:

 I am sorry, am just getting used to Wicket but I notice a lot of use 
 of calling a lot of code in the constructor.  Does it really matter?  
 I mention it because this kind of style makes it difficult to test 
 code because code in the constructor may fail and the object won't be 
 created.

 Should I just create a method and call that method in the constructor?


The constructor is supposed to construct the object.  In Wicket, this
also
(typically) means constructing the component hierarchy.  So, your
constructor should be doing things like add(new FooPanel(foo, new
SomeModel()));  It should NOT be doing things like:

ListFoo foos = SomeDao.loadAll();
new FooPanel(foo, foos);

That's the kind of code I see newbs putting in their constructor all the
time - and it should NOT be there.

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

-

Well, the second version uses constructer injection.  Some frameworks
prefer that approach.

But, I see your point.


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



Re: Newbie question anti-patterns and wicket, constructor component building

2010-06-15 Thread Jeremy Thomerson


 Well, the second version uses constructer injection.  Some frameworks
 prefer that approach.

 But, I see your point.


You should not be calling a service or dao directly in your constructor,
regardless of whether you are using dependency injection or not.  This is
bad.  That's what models are for.  Load data in models - not while
constructing an object.

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


Re: Newbie question anti-patterns and wicket, constructor component building

2010-06-15 Thread Jeremy Thomerson


 Well, the second version uses constructer injection.  Some frameworks
 prefer that approach.

 But, I see your point.


You should not be calling a service or dao directly in your constructor,
regardless of whether you are using dependency injection or not.  This is
bad.  That's what models are for.  Load data in models - not while
constructing an object.

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


back button and page expiration

2010-06-15 Thread Ray Weidner
Hi all,

The web app I've been working on has some issues with the back button.  For
instance, when using DefaultDataView, if a user goes back a page after
clicking a column heading, and then clicks a different link on the page, it
would cause an error.  This problem was easily solved manually by refreshing
the page, so my objective was to force the browser to reload a page upon
using the back button.  This was accomplished by directing the browser to
cache/store nothing with the following code:

@Override
protected void configureResponse() {
super.configureResponse();
final WebResponse response = getWebRequestCycle().getWebResponse();
response.setHeader(Cache-Control, no-cache, max-age=0,
must-revalidate, no-store);
}

Basically, the equivalent of certain meta tags in the html header.

However, now I'm running into a different issue.  When hitting back and
revisiting an old page, users now get the message that the page has expired.
 While this is much better than displaying a runtime exception stack trace,
I'd like to actually just refresh certain pages in this case, rather than
expiring them.  In fact, it would be good to flag some pages as expired,
while reloading others.

So how can I do this?  And why are stale pages now showing up as expired in
the first place, when previously, reloading a stale page worked fine?

Ray Weidner


Easy fast question, properties ´file for validation....

2010-06-15 Thread Victor_Trapiello

I do not know wghy is not rendering my property field, I was doing a king
prove of concept, and I ahve this 2 files:  ( I do not have border and
nothing, can you see a anything¿?

**Home.java***
 */
public class HomePage extends WebPage {

private static final long serialVersionUID = 1L;

 */
public HomePage(final PageParameters parameters) {

// Add the simplest type of label
add(new Label(message, If you see this message wicket is properly
configured and running));
FeedbackPanel fbp=new FeedbackPanel(fbp);
Model campoModel=new Model();
TextField campo =new TextField(campo, campoModel);
campo.setRequired(true);

Form formulario=new Form(formulario);
formulario.add(campo);
add(formulario);
add(fbp);
// TODO Add your page's components here
}
}

***Home.properties*** at the same level as the other one
Required=my custom messages ${label}
formulario.campo.Required=my custome message for my form!!!



thank you very much guy
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Easy-fast-question-properties-file-for-validation-tp2256542p2256542.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: Easy fast question, properties ´file for valida tion....

2010-06-15 Thread Jeremy Thomerson
On Tue, Jun 15, 2010 at 4:03 PM, Victor_Trapiello vic...@trapiello.netwrote:


 I do not know wghy is not rendering my property field, I was doing a king
 prove of concept, and I ahve this 2 files:  ( I do not have border and
 nothing, can you see a anything¿?

 **Home.java***
  */
 public class HomePage extends WebPage {

private static final long serialVersionUID = 1L;

 */
public HomePage(final PageParameters parameters) {

// Add the simplest type of label
add(new Label(message, If you see this message wicket is properly
 configured and running));
FeedbackPanel fbp=new FeedbackPanel(fbp);
Model campoModel=new Model();
TextField campo =new TextField(campo, campoModel);
campo.setRequired(true);

Form formulario=new Form(formulario);
formulario.add(campo);
add(formulario);
add(fbp);
// TODO Add your page's components here
}
 }

 ***Home.properties*** at the same level as the other one
 Required=my custom messages ${label}
 formulario.campo.Required=my custome message for my form!!!



 thank you very much guy
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Easy-fast-question-properties-file-for-validation-tp2256542p2256542.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


Are you asking why your Required strings are not being rendered?  If so,
please check that your properties file has the same name as your java file.
 There are some inconsistencies in your email - not sure if this is just a
typo in the email or what

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


Re: Easy fast question, prope rties ´file for validation....

2010-06-15 Thread Victor_Trapiello

Hello mate, thank you very much for your fast reply

I´m asking why my messages (the ones that I put in my property file are not
appearing), as you can see I have put the same name in both files,
Home.java and Home.properties I´m doing somethiong wrong... I know but..
what¿?

cheersss
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Easy-fast-question-properties-file-for-validation-tp2256542p2256573.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



got no pages from a data provider

2010-06-15 Thread Fernando Wermus
Hi all,

For some reason *dataView* always passed first=0 and count=0.

This is my code
 add(new DataView(amistades, new AmistadesProvider()) {
private static final long serialVersionUID = 5328267159730501362L;

public void populateItem(Item item) {
User user=(User)item.getModelObject();
item.add(new ContextImage(avatar,new Model(user.getPicture(;
item.add(new Label(nombre, user.getName()));
item.add(new Label(origen,user.getAbout()));

}
});
add(new AjaxPagingNavigator(navigator, getDataView()));
getDataView().setItemsPerPage(7);

This is my dataview
...
@Override
public Iterator iterator(int first, int count) {
ListUser users=null;
Sesion sesion=Sesion.get();
try {
 FacebookClient fbClient = new DefaultFacebookClient(sesion.getFbToken());
ConnectionUser myFriends =
fbClient.
fetchConnection(me/friends, User.class,
Parameter.with(fields, id, name, picture),
Parameter.with(limit, String.valueOf(count)),
Parameter.with(offset, String.valueOf(first)));
users=myFriends.getData();
} catch (FacebookException e) {
log.error(e);
sesion.error(te desconectaste de facebook);
}
this.size=users.size();
return users.iterator();
}
...
Any idea?

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: got no pages from a data provider

2010-06-15 Thread Jeremy Thomerson
On Tue, Jun 15, 2010 at 4:30 PM, Fernando Wermus
fernando.wer...@gmail.comwrote:

 Hi all,

 For some reason *dataView* always passed first=0 and count=0.

 This is my code
  add(new DataView(amistades, new AmistadesProvider()) {
 private static final long serialVersionUID = 5328267159730501362L;

 public void populateItem(Item item) {
 User user=(User)item.getModelObject();
 item.add(new ContextImage(avatar,new Model(user.getPicture(;
item.add(new Label(nombre, user.getName()));
item.add(new Label(origen,user.getAbout()));

}
});
 add(new AjaxPagingNavigator(navigator, getDataView()));
 getDataView().setItemsPerPage(7);

 This is my dataview
 ...
 @Override
 public Iterator iterator(int first, int count) {
 ListUser users=null;
 Sesion sesion=Sesion.get();
 try {
  FacebookClient fbClient = new DefaultFacebookClient(sesion.getFbToken());
 ConnectionUser myFriends =
 fbClient.
 fetchConnection(me/friends, User.class,
 Parameter.with(fields, id, name, picture),
 Parameter.with(limit, String.valueOf(count)),
 Parameter.with(offset, String.valueOf(first)));
 users=myFriends.getData();
 } catch (FacebookException e) {
 log.error(e);
 sesion.error(te desconectaste de facebook);
 }
 this.size=users.size();
 return users.iterator();
 }
 ...
 Any idea?

 --
 Fernando Wermus.

 www.linkedin.com/in/fernandowermus



What is size() returning?

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


Re: Easy fast question, properties ´file for valida tion....

2010-06-15 Thread Jeremy Thomerson
On Tue, Jun 15, 2010 at 4:25 PM, Victor_Trapiello vic...@trapiello.netwrote:


 Hello mate, thank you very much for your fast reply

 I´m asking why my messages (the ones that I put in my property file are not
 appearing), as you can see I have put the same name in both files,
 Home.java and Home.properties I´m doing somethiong wrong... I know
 but..
 what¿?

 cheersss
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Easy-fast-question-properties-file-for-validation-tp2256542p2256573.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


What I'm saying is that somewhere you have an error in naming - either in
your code, or in the email.  You say that your file is named Home.java,
but the code is for the HomePage class.  This would create a compile
error.  So, it seems possible that your file is actually HomePage.java, in
which case your properties file should be HomePage.properties.

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


Validation

2010-06-15 Thread Brian Mulholland
I have two validations on a textbox.  One is extended from the
EmailValidation class that comes with wicket and works fine.  The
other is an extension of AbstractValidator.  That one never gets
called.  It never gets to the onValidate().  Why would one validator
get invoked and function perfectly while the other got ignored?  Both
were added to the component.

Brian Mulholland

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



Re: Easy fast question, prope rties ´file for validation....

2010-06-15 Thread Victor_Trapiello

hahahhaha true, that was my mistake, I had the same mistake in my source
code! it is HomePage, and I my property file I just put Home.properties, now
It should work fine!! thank you very much guys, and sorry for this stupid
mistake, bus sometimes it is good to talk with someone!!


-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Easy-fast-question-properties-file-for-validation-tp2256542p2256611.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: Validation

2010-06-15 Thread Jeremy Thomerson
On Tue, Jun 15, 2010 at 4:57 PM, Brian Mulholland blmulholl...@gmail.comwrote:

 I have two validations on a textbox.  One is extended from the
 EmailValidation class that comes with wicket and works fine.  The
 other is an extension of AbstractValidator.  That one never gets
 called.  It never gets to the onValidate().  Why would one validator
 get invoked and function perfectly while the other got ignored?  Both
 were added to the component.

 Brian Mulholland

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


IIRC, a second validator will not get called if the first fails.  Does the
second one get called when the first succeeds?

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


Re: got no pages from a data provider

2010-06-15 Thread Fernando Wermus
thanks

On Tue, Jun 15, 2010 at 6:38 PM, Jeremy Thomerson jer...@wickettraining.com
 wrote:

 On Tue, Jun 15, 2010 at 4:30 PM, Fernando Wermus
 fernando.wer...@gmail.comwrote:

  Hi all,
 
  For some reason *dataView* always passed first=0 and count=0.
 
  This is my code
   add(new DataView(amistades, new AmistadesProvider()) {
  private static final long serialVersionUID = 5328267159730501362L;
 
  public void populateItem(Item item) {
  User user=(User)item.getModelObject();
  item.add(new ContextImage(avatar,new Model(user.getPicture(;
 item.add(new Label(nombre, user.getName()));
 item.add(new Label(origen,user.getAbout()));
 
 }
 });
  add(new AjaxPagingNavigator(navigator, getDataView()));
  getDataView().setItemsPerPage(7);
 
  This is my dataview
  ...
  @Override
  public Iterator iterator(int first, int count) {
  ListUser users=null;
  Sesion sesion=Sesion.get();
  try {
   FacebookClient fbClient = new
 DefaultFacebookClient(sesion.getFbToken());
  ConnectionUser myFriends =
  fbClient.
  fetchConnection(me/friends, User.class,
  Parameter.with(fields, id, name, picture),
  Parameter.with(limit, String.valueOf(count)),
  Parameter.with(offset, String.valueOf(first)));
  users=myFriends.getData();
  } catch (FacebookException e) {
  log.error(e);
  sesion.error(te desconectaste de facebook);
  }
  this.size=users.size();
  return users.iterator();
  }
  ...
  Any idea?
 
  --
  Fernando Wermus.
 
  www.linkedin.com/in/fernandowermus
 


 What is size() returning?

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




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Validation

2010-06-15 Thread Brian Mulholland
The two are added to the same component, but have no direct
relationship to each other.  It IS true that the non-working one is
added 2nd.  However in the test where I am trying to get control to
the 2nd one, I typed input that did not evoke a message from the first
validator.

But could you elaborate on that point?  Do you mean that the order in
which I add validators dictates the order in which they execute and
that when a validator fails, others are not executed?  Does that rule
only apply within the component?  And do form validators run if a
field validator fails?

I've been looking around for details like this, and all I see are
highly simplistic examples about required checks.  I never seem to
find an in depth discussion about when validators fire, how they
interact and so forth.  Where is this info discussed?

Brian Mulholland




On Tue, Jun 15, 2010 at 6:12 PM, Jeremy Thomerson
jer...@wickettraining.com wrote:
 On Tue, Jun 15, 2010 at 4:57 PM, Brian Mulholland 
 blmulholl...@gmail.comwrote:

 I have two validations on a textbox.  One is extended from the
 EmailValidation class that comes with wicket and works fine.  The
 other is an extension of AbstractValidator.  That one never gets
 called.  It never gets to the onValidate().  Why would one validator
 get invoked and function perfectly while the other got ignored?  Both
 were added to the component.

 Brian Mulholland

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


 IIRC, a second validator will not get called if the first fails.  Does the
 second one get called when the first succeeds?

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


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



Re: Validation

2010-06-15 Thread Jeremy Thomerson
On Tue, Jun 15, 2010 at 5:24 PM, Brian Mulholland blmulholl...@gmail.comwrote:

 The two are added to the same component, but have no direct
 relationship to each other.  It IS true that the non-working one is
 added 2nd.  However in the test where I am trying to get control to
 the 2nd one, I typed input that did not evoke a message from the first
 validator.

 But could you elaborate on that point?  Do you mean that the order in
 which I add validators dictates the order in which they execute and
 that when a validator fails, others are not executed?  Does that rule
 only apply within the component?  And do form validators run if a
 field validator fails?

 I've been looking around for details like this, and all I see are
 highly simplistic examples about required checks.  I never seem to
 find an in depth discussion about when validators fire, how they
 interact and so forth.  Where is this info discussed?

 Brian Mulholland




 On Tue, Jun 15, 2010 at 6:12 PM, Jeremy Thomerson
 jer...@wickettraining.com wrote:
  On Tue, Jun 15, 2010 at 4:57 PM, Brian Mulholland 
 blmulholl...@gmail.comwrote:
 
  I have two validations on a textbox.  One is extended from the
  EmailValidation class that comes with wicket and works fine.  The
  other is an extension of AbstractValidator.  That one never gets
  called.  It never gets to the onValidate().  Why would one validator
  get invoked and function perfectly while the other got ignored?  Both
  were added to the component.
 
  Brian Mulholland
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
  IIRC, a second validator will not get called if the first fails.  Does
 the
  second one get called when the first succeeds?
 
  --
  Jeremy Thomerson
  http://www.wickettraining.com
 

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


Validators are added sequentially and run sequentially.  When the first
fails, the other does not get called.  A simple test will prove this for
you:

add(new FeedbackPanel(feedback)); Form form = new Form(form); final
TextField tf = new TextField(text, new ModelString());
tf.add(StringValidator.minimumLength(4)); tf.add(new
PatternValidator(^T.*)); form.add(tf); add(form);

div wicket:id=feedback/div form wicket:id=form input type=text
wicket:id=text / input type=submit / /form


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


NEW wicket-powered football portal lauched... http://football4all.net

2010-06-15 Thread Jens Zastrow

:-)

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



Re: NEW wicket-powered football portal lauched... http://football4all.net

2010-06-15 Thread Jens Zastrow

sorry the URL is http://football4all.net

Am 16.06.2010 00:56, schrieb Jens Zastrow:

:-)

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



--
dipl. inform jens zastrow

phone | +49.152.04840108
mail  | m...@jens-zastrow.de
web   | http://jens-zastrow.de
xing  | http://www.xing.com/profile/Jens_Zastrow


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



Re: NEW wicket-powered football portal lauched... http://football4all.net

2010-06-15 Thread Jens Zastrow

it's also still a beta-version !

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



How to create a Popup Button

2010-06-15 Thread jammyjohn

Could anybody suggest how to create a popup button. I read in the forum that
a link can be attached to a button. But it did not help me.

Not sure, where is the mistake in the below code.

html code
--
//having a link id inside a button..

 input type=button  wicket:id=mawbNotes  value='Mawb Notes' / #  

java code.
---

PopupSettings popupSettings = new PopupSettings(PopupSettings.LOCATION_BAR |
PopupSettings.RESIZABLE |
PopupSettings.SCROLLBARS).setHeight(300).setWidth(730).setTop(300).setLeft(180);

//Link
Link notesLink = new Link(notesLink) {
@Override
public void onClick() {

}
};

notesLink.setPopupSettings(popupSettings);

//Button
Button mawbNotes = new Button(mawbNotes) {
@Override
public void onSubmit() {

 setResponsePage(getPage())
}
};


//adding link to a button   
mawbNotes.add(notesLink);

//adding button to the from
mawbForm.add(mawbNotes.setDefaultFormProcessing(false));


The above code does not pop up.. rather opens the page in the same window.

Thanks in advance for your help.

Jamuna.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-create-a-Popup-Button-tp2256714p2256714.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: How to create a Popup Button

2010-06-15 Thread James Carman
Try button wicket:id=mawbNotesMawb Notes/button

On Tue, Jun 15, 2010 at 7:42 PM, jammyjohn jchinnas...@yahoo.com wrote:

 Could anybody suggest how to create a popup button. I read in the forum that
 a link can be attached to a button. But it did not help me.

 Not sure, where is the mistake in the below code.

 html code
 --
 //having a link id inside a button..

  input type=button  wicket:id=mawbNotes  value='Mawb Notes' / #

 java code.
 ---

 PopupSettings popupSettings = new PopupSettings(PopupSettings.LOCATION_BAR |
 PopupSettings.RESIZABLE |
 PopupSettings.SCROLLBARS).setHeight(300).setWidth(730).setTop(300).setLeft(180);

 //Link
            Link notesLink = new Link(notesLink) {
               �...@override
                public void onClick() {

                }
            };

                notesLink.setPopupSettings(popupSettings);

 //Button
                Button mawbNotes = new Button(mawbNotes) {
                       �...@override
                        public void onSubmit() {
                         setResponsePage(getPage())
                        }
                };


 //adding link to a button
                mawbNotes.add(notesLink);

 //adding button to the from
 mawbForm.add(mawbNotes.setDefaultFormProcessing(false));


 The above code does not pop up.. rather opens the page in the same window.

 Thanks in advance for your help.

 Jamuna.
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/How-to-create-a-Popup-Button-tp2256714p2256714.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: How to create a Popup Button

2010-06-15 Thread Jeremy Thomerson
On Tue, Jun 15, 2010 at 6:42 PM, jammyjohn jchinnas...@yahoo.com wrote:


 Could anybody suggest how to create a popup button. I read in the forum
 that
 a link can be attached to a button. But it did not help me.

 Not sure, where is the mistake in the below code.

 html code
 --
 //having a link id inside a button..

  input type=button  wicket:id=mawbNotes  value='Mawb Notes' / #

 java code.
 ---

 PopupSettings popupSettings = new PopupSettings(PopupSettings.LOCATION_BAR
 |
 PopupSettings.RESIZABLE |

 PopupSettings.SCROLLBARS).setHeight(300).setWidth(730).setTop(300).setLeft(180);

 //Link
Link notesLink = new Link(notesLink) {
@Override
public void onClick() {

}
};

notesLink.setPopupSettings(popupSettings);

 //Button
Button mawbNotes = new Button(mawbNotes) {
@Override
public void onSubmit() {
 setResponsePage(getPage())
}
};


 //adding link to a button
mawbNotes.add(notesLink);

 //adding button to the from
 mawbForm.add(mawbNotes.setDefaultFormProcessing(false));


 The above code does not pop up.. rather opens the page in the same window.

 Thanks in advance for your help.

 Jamuna.
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/How-to-create-a-Popup-Button-tp2256714p2256714.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


Your code works fine for me:

input type=button value=button wicket:id=link /

PopupSettings popupSettings = new PopupSettings(PopupSettings.LOCATION_BAR |
PopupSettings.RESIZABLE | PopupSettings.SCROLLBARS).setHeight(
300).setWidth(730).setTop(300).setLeft(180);

Link link = new Link(link) {
@Override
public void onClick() {
System.out.println(clicked);
setResponsePage(HomePage.class);
}
};

link.setPopupSettings(popupSettings);
add(link);

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


[announce] wicketstuff-core 1.4.9.1 released

2010-06-15 Thread Michael O'Cleirigh

Hello,

I've staged and promoted a new release of wicketstuff-core version 
1.4.9.1.  It is available in maven central now.


All of the artifacts are available from maven central like this:

dependency
 groupIdorg.wicketstuff/groupId
 artifactIddatatable-autocomplete/artifactId
 version1.4.9.1/version
/dependency

Each module has its own artifact ID which is used to retrieve it 
specifically from the set of all modules deployed as wicketstuff-core.


Tag: 
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/tags/wicketstuff-core-1.4.9.1


I needed to do this point release because of some work related releases 
that needed new features to be included in a non snapshot release.


Even though I announced the intent to do this release no once committed 
against the 1.4.9 branch.  Because for my purposes I needed changes from 
trunk, I merged trunk against the 1.4.9 branch to bring in all of the 
changes.


I don't have an exact set of changes from 1.4.9 but here are the main items:
1. Apache Shiro related artifacts are in.  The shiro dependencies were 
released to central which allowed this to happen.
2. Jasper Reports artifact is included (It was formerly outside of 
wicketstuff core).
3. The tinymce jazzy spellcheck plugin was changed from the wicketstuff 
maven repository to the version that was deployed into central on May 2, 
2010.
4. All changes in trunk between the wicketstuff-core 1.4.9 branch being 
created and June 12, 2010.


Below is a summary of the modules included in this release for reference.

I will plan on cutting the 1.4.9.2 release in about one month from today 
unless there is demand for a release sooner.


Regards,

Mike

[INFO]
[INFO] 


[INFO] Reactor Summary:
[INFO] 

[INFO] WicketStuff Core Parent ... SUCCESS 
[14.110s]
[INFO] Wicket-Scala Parent ... SUCCESS 
[5.185s]
[INFO] Wicket-Scala .. SUCCESS 
[35.584s]
[INFO] Wicket-Scala Samples .. SUCCESS 
[19.020s]
[INFO] Wicket-Scala Archetype  SUCCESS 
[4.157s]
[INFO] Wicket Annotations  SUCCESS 
[14.356s]
[INFO] JSLibraries ... SUCCESS 
[47.600s]
[INFO] CalendarViews - Parent  SUCCESS 
[4.762s]
[INFO] CalendarViews . SUCCESS 
[39.675s]
[INFO] CalendarViews - Examples .. SUCCESS 
[49.158s]
[INFO] Client and Server Validation .. SUCCESS 
[16.310s]
[INFO] Datatable Autocomplete - Parent ... SUCCESS 
[1.922s]
[INFO] Datatable Autocomplete Common . SUCCESS 
[18.875s]
[INFO] Datatable Autocomplete  SUCCESS 
[30.678s]
[INFO] Datatable Autocomplete Examples ... SUCCESS 
[39.700s]
[INFO] DataTable Autocomplete Test ... SUCCESS 
[22.609s]
[INFO] GMap2 - Parent  SUCCESS 
[6.102s]
[INFO] GMap2 . SUCCESS 
[37.813s]
[INFO] GMap2 - Examples .. SUCCESS 
[45.032s]
[INFO] Google Charts - Parent  SUCCESS 
[3.860s]
[INFO] Google Charts . SUCCESS 
[35.019s]
[INFO] Google Charts - Examples .. SUCCESS 
[26.271s]
[INFO] InMethod Grid Parent .. SUCCESS 
[4.634s]
[INFO] InMethod Grid . SUCCESS 
[31.222s]
[INFO] InMethod Grid Examples  SUCCESS 
[42.279s]
[INFO] Input Events - Parent . SUCCESS 
[1.178s]
[INFO] Input Events .. SUCCESS 
[9.826s]
[INFO] Input Events - Examples ... SUCCESS 
[15.871s]
[INFO] JavaEE Inject - Parent  SUCCESS 
[1.264s]
[INFO] JavaEE Inject . SUCCESS 
[8.948s]
[INFO] JavaEE Inject - Examples .. SUCCESS 
[1.292s]
[INFO] JavaEE Inject - Example EJB Module  SUCCESS 
[10.918s]
[INFO] JavaEE Inject - Example Web Module  SUCCESS 
[19.977s]
[INFO] JavaEE Inject - Example EAR ... SUCCESS 
[12.394s]
[INFO] Wicket Contrib JasperReports - Parent . SUCCESS 
[1.020s]
[INFO] Wicket Contrib JasperReports .. SUCCESS 
[25.503s]
[INFO] Unnamed - org.wicketstuff:jasper-reports-examples:jar:1.4.9.1  
SUCCESS [12.717s]
[INFO] Misc .. SUCCESS 

How to remove css class from a component?

2010-06-15 Thread David Chang
Hello,

I add a CSS class to component dynamcially the following way:

inputComponent.add(new AttributeAppender(class, new 
ModelString(errorField),  ));

How can I remove this CSS class in java code?

Best!


  

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



Re: How to remove css class from a component?

2010-06-15 Thread Jeremy Thomerson
onComponentTag(...) {
tag.remove(class);
}

On Wed, Jun 16, 2010 at 12:37 AM, David Chang david_q_zh...@yahoo.comwrote:

 Hello,

 I add a CSS class to component dynamcially the following way:

 inputComponent.add(new AttributeAppender(class, new
 ModelString(errorField),  ));

 How can I remove this CSS class in java code?

 Best!




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




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


Re: How to remove css class from a component?

2010-06-15 Thread David Chang
Jeremy, glad to hear from you!

My situation is a little different. The CSS class is added in the following 
way. Please see the following code.

protected void onBeforeRender() {
super.onBeforeRender();
if (inputComponent.getFeedbackMessage() != null) {
inputComponent.add(new AttributeAppender(class, new 
ModelString(errorField),  ));
} else {
// how to remove CSS class here??   
}
}


Thanks!


--- On Wed, 6/16/10, Jeremy Thomerson jer...@wickettraining.com wrote:

 From: Jeremy Thomerson jer...@wickettraining.com
 Subject: Re: How to remove css class from a component?
 To: users@wicket.apache.org
 Cc: John Krasnay j...@krasnay.ca
 Date: Wednesday, June 16, 2010, 1:40 AM
 onComponentTag(...) {
 tag.remove(class);
 }
 
 On Wed, Jun 16, 2010 at 12:37 AM, David Chang david_q_zh...@yahoo.comwrote:
 
  Hello,
 
  I add a CSS class to component dynamcially the
 following way:
 
  inputComponent.add(new AttributeAppender(class, new
  ModelString(errorField),  ));
 
  How can I remove this CSS class in java code?
 
  Best!
 
 
 
 
 
 -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 -- 
 Jeremy Thomerson
 http://www.wickettraining.com
 


  

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



Re: How to remove css class from a component?

2010-06-15 Thread Jeremy Thomerson
On Wed, Jun 16, 2010 at 12:48 AM, David Chang david_q_zh...@yahoo.comwrote:

 Jeremy, glad to hear from you!

 My situation is a little different. The CSS class is added in the following
 way. Please see the following code.

protected void onBeforeRender() {
super.onBeforeRender();
if (inputComponent.getFeedbackMessage() != null) {
 inputComponent.add(new AttributeAppender(class,
 new ModelString(errorField),  ));
 } else {
// how to remove CSS class here??
}
}


 Thanks!


 --- On Wed, 6/16/10, Jeremy Thomerson jer...@wickettraining.com wrote:

  From: Jeremy Thomerson jer...@wickettraining.com
  Subject: Re: How to remove css class from a component?
  To: users@wicket.apache.org
  Cc: John Krasnay j...@krasnay.ca
  Date: Wednesday, June 16, 2010, 1:40 AM
  onComponentTag(...) {
  tag.remove(class);
  }
 
  On Wed, Jun 16, 2010 at 12:37 AM, David Chang david_q_zh...@yahoo.com
 wrote:
 
   Hello,
  
   I add a CSS class to component dynamcially the
  following way:
  
   inputComponent.add(new AttributeAppender(class, new
   ModelString(errorField),  ));
  
   How can I remove this CSS class in java code?
  
   Best!
  
  
  
  
  
  -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
 
 
  --
  Jeremy Thomerson
  http://www.wickettraining.com
 




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


Use a model like it's intended?

protected void onBeforeRender() {
super.onBeforeRender();
inputComponent.add(new SimpleAttributeModifier(class, true, new
AbstractReadOnlyModelString() {
public String getObject() {
return inputComponent.getFeedbackMessage() != null
? errorField : ;
}
});
}

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