Re: Wicket HTML before graphics design with CSS ...

2009-10-28 Thread Jason Novotny


   My best experiences have been when the designer has full reign to do 
what they need on the CSS/HTML front on a blank canvas-- obviously after 
doing wireframes with something like OmniGraffle, Balsamiq or Fireworks. 
It helps if they add things like static error messages or a highlighted 
tab so the wicket developer gets a sense of when they will probably do 
some kind of onComponentTag override to change a class or HTML 
attribute, etc. Things that screw up designers IMO are repeaters... it's 
hard sometimes for them to know to what degree the layout structure is 
created on the server side. For instance I really like the DataBrowser 
component where it provides pagination, sorting, zebra stripes, etc, but 
the designer just sees a table wicket:id=sometable and thats it. 
Obviously they can still style it but the entire structure is hidden 
from them. OTOH ListViews and others expose more structure to the 
designer which makes them feel closer to home. It's all a tradeoff 
really. The biggest rule I give is to just know that any tag with 
wicket:id in it means that behavior to some extent is controlled on the 
server side so beware. I like this model as a developer since I really 
enjoy taking a nice looking static page and making it come alive, as 
opposed to my own crappy HTML since I can't design worth beans. I've 
also found subtleties where you really want the design up front, one 
concrete example was a tabbed pane. In one case the styles were applied

as

ul
li class=selectedaone/a/li
...
/ul

or another as

ul
li
a class=...one/a
/li

These are subtleties that the designer can change on the fly rather 
easily, but in wicket it makes a huge difference. I wouldn't want to 
force the decision on the designer, this should be their choice.


But this is just my 2 cents

   Jason

Igor Vaynberg wrote:

really? because we have quiet the opposite experience.

we take a wireframe prototype, build it, and have the designer go in
afterwards and pretty it up. with only a couple of hours of
wicket-related training the designers know what to touch and what not
to touch.

-igor

On Tue, Oct 27, 2009 at 9:15 PM, John Armstrong siber...@siberian.org wrote:
  

Its amazing what designers can screw up :)

Design can have a huge impact on code. This peaceful co-existence can
really only occur if you let the designers go first. If you start with
wicket you will either A) tell your designers to go to h*ll daily or
B) spend hours and hours re-factoring to meet their 'whims'.

The separation of html/code is wonderful in wicket and a key reason I
use it and advocate for it but its no substitute for good planning and
a 'design first' mentality.

John-

On Tue, Oct 27, 2009 at 8:18 PM, Dave B d...@davebolton.net wrote:



While my Wicket usage is very basic at the stage, one of the
attractive parts is the code and logic is completely separate to the
layout.  So your designers can do all the fine tuning and magic
without screwing up your work.

Cheers,
Dave
  

-
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: Wicket and JQuery

2009-10-28 Thread Jason Novotny


   Bingo!! I've been hitting this wall, and pulling my hair out-- in 
fact I may ditch jQuery for this very reason since I can't find a 
suitable workaround :-(


Martin Makundi wrote:

... and expect trouble with ajaxifying jquery plugins that skin html
components. They will not work properly if you replace your components
via ajax - or at least you might have to work hard on it.

**
Marin

2009/10/27 Jeremy Thomerson jer...@wickettraining.com:
  

I'd suggest only using jQuery for the UI effects and let Wicket do the AJAX.

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



On Tue, Oct 27, 2009 at 4:06 PM, Jeffrey Schneller 
jeffrey.schnel...@envisa.com wrote:



I am trying to determine how to use Wicket and JQuery.  I would prefer
not using wiQuery or similar.  I would like to just include the jQuery
libraries in my html and then use jQuery as javascript and not wrap
everything in java on the server side to generate the client code.



How would one go about doing this?  I assume the basic jQuery
functionality is straight forward.  However how would you implement
jQuery code that uses Ajax to communicate back to the server using
Wicket on the server?  Or would the recommendation be to let Wicket
handle the Ajax communication and only use jQuery for the UI components
such as Lightbox, Greybox, apple like sliders, etc.



Any ideas?



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



Re: urlFor(ResourceReference) strangeness

2009-10-28 Thread Alex Objelean

I am pretty sure, it is a bug. The reason why the urlFor(ResourceReference)
is not working properly is because you are using
BookmarkablePageRequestTargetUrlCodingStrategy for page mounting or a
similar strategy which encodes the params like this:
http://server/context/param1/value1/param2/value2 ... To prove that this is
a bug, try to change (just for test purpose) the mounting to
QueryStringUrlCodingStrategy, to make the url look like this: 
http://server/context?param1=value1. I suspect that when the url is built,
it depends on the page url from where the urlFor(ResourceReference) is
called... and wicket doesn't remove the parameters from the url and mess
this up... The real problem is when you are trying to build an absolute url
for a ResourceReference. If this is indeed the reason of the problem, we
should raise a jira issue... 

Alex Objelean  


pieter claassen-2 wrote:
 
 Ok, but I have a panel and I want to add an Image to the panel but when I
 log into my application I get the ../../.. prefix, and the
 ResourceReference
 then fails. However, once I click on any link, the prefix disappears and
 then my panel can find the ResourceReference. Am I misunderstanding how
 resource references should be used?
 
 Thanks,
 Pieter
 
 On Tue, Oct 27, 2009 at 4:21 PM, Ryan McKinley ryan...@gmail.com wrote:
 
 urlFor( ) uses the current request to get a relative path.  If the
 location
 you are calling urlFor() from changes, it will get a new location

 Note the only difference between the two urls is the ../../.. prefix


 On Oct 27, 2009, at 11:05 AM, pieter claassen wrote:

  WHen I start my application, my urlFor() returns a different URL than
 when
 I
 call it a second time?

   ResourceReference iconref = new ResourceReference(anchorclass,
 iconname);
   System.out.println(URL: +urlFor(iconref));

 First time it returns:
 URL:

 ../../../resources/com.musmato.wicket.pages.styles.option1.Option1StyleAnchor/document.png

 second time:
 URL:

 resources/com.musmato.wicket.pages.styles.option1.Option1StyleAnchor/document.png

 Any ideas?

 Thanks
 Pieter
 --



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


 
 
 -- 
 Pieter Claassen
 musmato.com
 
 

-- 
View this message in context: 
http://www.nabble.com/urlFor%28ResourceReference%29-strangeness-tp26079363p26089957.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: images not cached

2009-10-28 Thread Alex Objelean

You could add a shared resource to your application, like this:
Application.get().getSharedResources().add(name, WebResource)... in the
WebResource implementation you can control the response headers by adding
expire headers or etag.. This is pretty clean approach. 

Alex Objelean


Fernando Wermus-2 wrote:
 
 Hi all,
 I am testing an app in production and I have reached a problem you may
 help solve me. Like the war files were big, I decided to move all static
 images to a folder in production and add the following code to my
 Applicacion class.
 
 mount(new URIRequestTargetUrlCodingStrategy(/images) {
 
 @Override public IRequestTarget decode(RequestParameters
 requestParameters)
 {
 
 try {
 
 return serveStaticImages(getURI(requestParameters), );
 
 } catch (Exception e) {
 
 throw new WicketRuntimeException(e);
 
 }
 
 }
 
 });
 
 The problem is that each time that  someone calls a page, all the images
 are
 downloaded again. I know this isnt the best aproach and actually, it is
 awful in practices because of this issue. Why isnt caching the images and
 which would be the best approach?
 
 Thanks in advance
 
 
 -- 
 Fernando Wermus.
 
 www.linkedin.com/in/fernandowermus
 
 

-- 
View this message in context: 
http://www.nabble.com/images-not-cached-tp26087246p26089989.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



Question Wicket Pages and Directories

2009-10-28 Thread Lester Chua

Hi,

I think I'm the minority here but I like how wicket's default behaviour 
of placing html with the page.

I have a problem that I hope someone has encountered and solved before.

Basically, I current my source structure to be as follows

com/acme/web/HomePage.java
com/acme/web/HomePage.html
com/acme/web/SomePage.java
com/acme/web/SomePage.html
com/acme/panel/NavPanel.java
com/acme/panel/NavPanel.html

In my NavPanel.html, I have some links to HomePage.html as well as 
NavPanel.html. a href=SomePage.htmlSome Page/a
This works. The debug shows that Wicket is automatically figuring which 
page to link to link to.


But when I do the following

com/acme/proga/SomePage.java
com/acme/proga/SomePage.html
com/acme/home/HomePage.java
com/acme/home/HomePage.html
com/acme/panel/NavPanel.java
com/acme/panel/NavPanel.html

Wicket debug warning shows that it is unable to figure what Page class 
to give a href=SomePage.htmlSome Page/a.
WARN  org.apache.wicket.markup.resolver.AutoLinkResolver - Did not find 
corresponding java class: com.acme.home.SomePage


I am thinking that probably what I'm trying to do is wrong. If so, what 
is the proper way to make the pages available in a Navigator?
I tried building the links dynamically by iterating a list of pages and 
getting the paths from there BUT I am stuck trying get a list of Pages 
of my application.


Is there a way for me to resolve this?

Thanks in advance.

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



Re: wizard step window size / width

2009-10-28 Thread Sam Zilverberg
thanks, I did something similiar to this.
I used the wizard constructor with the false argument so that addDefaultCss
wouldnt be called, then in each wizard step I did
add(CSSPackageResource.getHeaderContribution(...
to add the appropiate css for the wizard step, basicly I just took the
original wizard.css and changed it a little for every step.

hope this helps someone in the future


On Mon, Oct 26, 2009 at 12:16 PM, Pedro Santos pedros...@gmail.com wrote:

 Hi, how are you using wizard? The addDefaultCssStyle method is to be
 overridden to add your own css. On it you configure the width properties to
 100%
 ex:
 .wicketExtensionsWizardOuterTable{
width: 100%;
 }
 .wicketExtensionsWizardInnerTable {
width: 100%;
 }

 On Sun, Oct 25, 2009 at 8:53 AM, Sam Zilverberg samzilverb...@gmail.com
 wrote:

  Hello,
 
  I've recently created a wizard , but the wizard steps are too small for
 the
  content I want to put in them.
  How can I change a wizardstep width? or the whole wizard width?
 
  I noticed I can override the addDefaultCssStyle method of Wizard, but am
  not
  sure how to use this method too
  make the width larger...
 
  Thanks,
  Sam
 



 --
 Pedro Henrique Oliveira dos Santos



Re: Question Wicket Pages and Directories

2009-10-28 Thread Martijn Dashorst
Use normal BookmarkablePageLinks instead of wicket:link. The latter
is just convenience and only supports the most basic stuff.

Martijn

On Wed, Oct 28, 2009 at 7:55 AM, Lester Chua cicowic...@gmail.com wrote:
 Hi,

 I think I'm the minority here but I like how wicket's default behaviour of
 placing html with the page.
 I have a problem that I hope someone has encountered and solved before.

 Basically, I current my source structure to be as follows

 com/acme/web/HomePage.java
 com/acme/web/HomePage.html
 com/acme/web/SomePage.java
 com/acme/web/SomePage.html
 com/acme/panel/NavPanel.java
 com/acme/panel/NavPanel.html

 In my NavPanel.html, I have some links to HomePage.html as well as
 NavPanel.html. a href=SomePage.htmlSome Page/a
 This works. The debug shows that Wicket is automatically figuring which page
 to link to link to.

 But when I do the following

 com/acme/proga/SomePage.java
 com/acme/proga/SomePage.html
 com/acme/home/HomePage.java
 com/acme/home/HomePage.html
 com/acme/panel/NavPanel.java
 com/acme/panel/NavPanel.html

 Wicket debug warning shows that it is unable to figure what Page class to
 give a href=SomePage.htmlSome Page/a.
 WARN  org.apache.wicket.markup.resolver.AutoLinkResolver - Did not find
 corresponding java class: com.acme.home.SomePage

 I am thinking that probably what I'm trying to do is wrong. If so, what is
 the proper way to make the pages available in a Navigator?
 I tried building the links dynamically by iterating a list of pages and
 getting the paths from there BUT I am stuck trying get a list of Pages of my
 application.

 Is there a way for me to resolve this?

 Thanks in advance.

 -
 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.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0

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



Re: urlFor(ResourceReference) strangeness

2009-10-28 Thread pieter claassen
Alex,

The problem went away. I had some pages mounted (I landed on a mounted page)
and others not so as soon as I removed all the mounted pages, the problem
went away).

Rgds,
Pieter

On Wed, Oct 28, 2009 at 7:31 AM, Alex Objelean alex_objel...@yahoo.comwrote:


 I am pretty sure, it is a bug. The reason why the urlFor(ResourceReference)
 is not working properly is because you are using
 BookmarkablePageRequestTargetUrlCodingStrategy for page mounting or a
 similar strategy which encodes the params like this:
 http://server/context/param1/value1/param2/value2 ... To prove that this
 is
 a bug, try to change (just for test purpose) the mounting to
 QueryStringUrlCodingStrategy, to make the url look like this:
 http://server/context?param1=value1. I suspect that when the url is built,
 it depends on the page url from where the urlFor(ResourceReference) is
 called... and wicket doesn't remove the parameters from the url and mess
 this up... The real problem is when you are trying to build an absolute url
 for a ResourceReference. If this is indeed the reason of the problem, we
 should raise a jira issue...

 Alex Objelean


 pieter claassen-2 wrote:
 
  Ok, but I have a panel and I want to add an Image to the panel but when I
  log into my application I get the ../../.. prefix, and the
  ResourceReference
  then fails. However, once I click on any link, the prefix disappears and
  then my panel can find the ResourceReference. Am I misunderstanding how
  resource references should be used?
 
  Thanks,
  Pieter
 
  On Tue, Oct 27, 2009 at 4:21 PM, Ryan McKinley ryan...@gmail.com
 wrote:
 
  urlFor( ) uses the current request to get a relative path.  If the
  location
  you are calling urlFor() from changes, it will get a new location
 
  Note the only difference between the two urls is the ../../.. prefix
 
 
  On Oct 27, 2009, at 11:05 AM, pieter claassen wrote:
 
   WHen I start my application, my urlFor() returns a different URL than
  when
  I
  call it a second time?
 
ResourceReference iconref = new ResourceReference(anchorclass,
  iconname);
System.out.println(URL: +urlFor(iconref));
 
  First time it returns:
  URL:
 
 
 ../../../resources/com.musmato.wicket.pages.styles.option1.Option1StyleAnchor/document.png
 
  second time:
  URL:
 
 
 resources/com.musmato.wicket.pages.styles.option1.Option1StyleAnchor/document.png
 
  Any ideas?
 
  Thanks
  Pieter
  --
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  --
  Pieter Claassen
  musmato.com
 
 

 --
 View this message in context:
 http://www.nabble.com/urlFor%28ResourceReference%29-strangeness-tp26079363p26089957.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




-- 
Pieter Claassen
musmato.com


Re: Wicket-stuff site down?

2009-10-28 Thread Martin Grigorov
hi Johan

this should be fixed with my first commit yesterday:
snapshotRepository
idwicketstuff-org-maven/id

urlscpexe://wicketstuff.org/home/wicket/tomcat/webapps/maven/repository/url
uniqueVersionfalse/uniqueVersion ADDED
/snapshotRepository


Here is a little Perl magic which should save you few hours next time
you need to delete such artefacts

this one will *only* print which files will be deleted:
find /tmp/m2repo/ -type f | xargs perl -e 'foreach $arg (@ARGV) {$arg =~
m/^(.*\/)+(\w+-\d\.\d+-\d+.*)$/; print $2\n}'

this one will actually delete them:
find /tmp/m2repo/ -type f | xargs perl -e 'foreach $arg (@ARGV) {$arg =~
m/^(.*\/)+(\w+-\d\.\d+-\d+.*)$/; unlink $arg if $2;}'

El mar, 27-10-2009 a las 18:03 +0100, Johan Compagner escribió:
 you can easily check it your self for example:
 
 http://www.wicketstuff.org/maven/repository/org/wicketstuff/annotation/1.4-SNAPSHOT/
 
 johan
 
 
 On Tue, Oct 27, 2009 at 11:59, Martin Grigorov mcgreg...@e-card.bg
 wrote:
 One more fixed: wicketstuff-animator/pom.xml
 
 According to
 http://maven.apache.org/pom.html#Distribution_Management
 these fixes should be enough.
 
 @Johan: if the build still produces unique versions of the
 snapshots
 please tell us which are the problematic projects.
 
 El mar, 27-10-2009 a las 12:48 +0200, Martin Grigorov
 escribió:
 
  There was only one distributionManagement in
 wicketstuff-core/pom.xml
  (and sub-modules) without the needed setting:
 
  snapshotRepository
idwicketstuff-org-maven/id
 
 
 
 urlscpexe://wicketstuff.org/home/wicket/tomcat/webapps/maven/repository/url
uniqueVersionfalse/uniqueVersion
  /snapshotRepository
 
  Now I'll check the projects which are not in
 wicketstuff-core.
 
  El mar, 27-10-2009 a las 10:41 +0100, Johan Compagner
 escribió:
   i already did that
   its up again but it was AGAIN disk full problems
   and that is because of that STUPID maven that generates
 unique snapshots
  
   Who is the maven expert here that will FIX that problems
 on all our pom
   files?
   i have been deleting stuff now for at least 1 hour!
  
   johan
  
  
   On Tue, Oct 27, 2009 at 10:23, nino martinez wael 
   nino.martinez.w...@gmail.com wrote:
  
Yeah it does look that way. Anyone around to take a look
 at the server?
   
2009/10/27 Brill Pappin br...@pappin.ca
   
 I don't think this is maintenance, unless they have an
 extremely long
 running SQL export or something.
 I'd say broken at this point.

 - Brill



 On 2009-10-26, at 7:26 PM, nino martinez wael wrote:

  Here aswell ? argh :
 http://wicketstuff.org/confluence/errors.jsp

 2009/10/26 Jeremy Thomerson
 jer...@wickettraining.com

  Yes

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



 On Mon, Oct 26, 2009 at 11:08 AM, Brill Pappin
 br...@pappin.ca
wrote:

  Is the Wicket-stuff site down for anyone else?

 - Brill


 -
 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: Question Wicket Pages and Directories

2009-10-28 Thread Lester Chua

Thanks Martijn,

I think I stumbled on the solution just before I saw your hint =).

Please help me take a look and see if the way I approached the problem 
is too cumbersome.


Basically my HTML, in my NavigationalPanel.html:

   span wicket:id=links
   a href=# wicket:id=linkspan 
wicket:id=displayName/span/abr/

   /span

Java, I have a NavigationPanel:

public class NavigationPanel extends Panel {

   public NavigationPanel(String id) {
   super(id);
  
   ListCustomLinkedPage links = new ArrayListCustomLinkedPage();

   links.add(new CustomLinkedPage(Home Page, HomePage.class));
   links.add(new CustomLinkedPage(Some Page, SomePage.class));
 
   add(new ListView(links, links) {

   public void populateItem(final ListItem item) {
   final CustomLinkedPage link = (CustomLinkedPage) 
item.getModelObject();
   item.add(new CustomBookmarkablePageLink(link, 
link.getPageClass(), link.getDisplayName()));

   }
   });
  
   }


   class CustomLinkedPage {
   Class pageClass;
   String displayName;
  
   public CustomLinkedPage(String displayName, Class pageClass) {

   this.pageClass = pageClass;
   this.displayName = displayName;
   }

   // remved getters and setters for less verbosity  
   }
  
  
   class CustomBookmarkablePageLink extends BookmarkablePageLink {


   public CustomBookmarkablePageLink(String id, Class pageClass, 
String displayName) {

   super(id, pageClass);
   this.displayName = displayName;
   add(new Label(displayName, displayName));

   }

   String displayName;

   // remved getters and setters for less verbosity  
   }


}

I tried subclassing BookmarkablePageLink directly without 
CustomLinkedPage but it created inelegant code that made me put link 
at new instance time which I hated, because the link reference seems 
to be in the wrong scope.


Spent lots of time researching and had a hard time figuring this out. 
The amount and quality of documents in Wicket is not rich enough for 
newbies to get up to speed quickly enough. Having said that, I totally 
love the component object model. No other framework (I worked with quite 
a number of them) lets me subclass so nicely and having such neat code 
in html! =)


Regards,

Lester


Martijn Dashorst wrote:

Use normal BookmarkablePageLinks instead of wicket:link. The latter
is just convenience and only supports the most basic stuff.

Martijn

On Wed, Oct 28, 2009 at 7:55 AM, Lester Chua cicowic...@gmail.com wrote:
  

Hi,

I think I'm the minority here but I like how wicket's default behaviour of
placing html with the page.
I have a problem that I hope someone has encountered and solved before.

Basically, I current my source structure to be as follows

com/acme/web/HomePage.java
com/acme/web/HomePage.html
com/acme/web/SomePage.java
com/acme/web/SomePage.html
com/acme/panel/NavPanel.java
com/acme/panel/NavPanel.html

In my NavPanel.html, I have some links to HomePage.html as well as
NavPanel.html. a href=SomePage.htmlSome Page/a
This works. The debug shows that Wicket is automatically figuring which page
to link to link to.

But when I do the following

com/acme/proga/SomePage.java
com/acme/proga/SomePage.html
com/acme/home/HomePage.java
com/acme/home/HomePage.html
com/acme/panel/NavPanel.java
com/acme/panel/NavPanel.html

Wicket debug warning shows that it is unable to figure what Page class to
give a href=SomePage.htmlSome Page/a.
WARN  org.apache.wicket.markup.resolver.AutoLinkResolver - Did not find
corresponding java class: com.acme.home.SomePage

I am thinking that probably what I'm trying to do is wrong. If so, what is
the proper way to make the pages available in a Navigator?
I tried building the links dynamically by iterating a list of pages and
getting the paths from there BUT I am stuck trying get a list of Pages of my
application.

Is there a way for me to resolve this?

Thanks in advance.

-
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



presentation changes when switching to deployment mode

2009-10-28 Thread Pi Trash
Hi all,
 
I developed a simple Wicket application containing just one page with some 
tables. In development mode everything is working and looking fine. But when I 
switch to deployment mode the presentation of the page changes dramatically. 
For example borders of tables are not visible any more. What am I doing wrong?
It seems to be just a CSS issue but the code and resources are exactly the 
same. I just switch the mode by changing a System property which is handled in 
WebApplication code like this:
 
@Override
public String getConfigurationType() {
   if (this.debugMode()) {
  return DEVELOPMENT;
   } else {
  return DEPLOYMENT;
   }
}
 
Thanks for your help!
___
Neu: WEB.DE DSL bis 50.000 kBit/s und 200,- Euro Startguthaben!
http://produkte.web.de/go/02/


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



Re: Question Wicket Pages and Directories

2009-10-28 Thread Martijn Dashorst
I'd rather use RepeatingView, together with a utility method for
adding the menu items. A ListView refreshes the menu on each render,
and your menu is rather static.

something like:

RepeatingView rv = new RepeatingView(menu);

addMenuItem(rv, Name of menuitem, PageThatIsLinkedTo.class);

private void addMenuItem(RepeatingView rv, String labelText, Class?
extends WebPage page) {
BookmarkablePageLink link = new BookmarkablePageLink(rv.newChildId(), page);
link.add(new Label(label, labelText));
rv.add(link);
}

On Wed, Oct 28, 2009 at 9:58 AM, Lester Chua cicowic...@gmail.com wrote:
 Thanks Martijn,

 I think I stumbled on the solution just before I saw your hint =).

 Please help me take a look and see if the way I approached the problem is
 too cumbersome.

 Basically my HTML, in my NavigationalPanel.html:

   span wicket:id=links
       a href=# wicket:id=linkspan
 wicket:id=displayName/span/abr/
   /span

 Java, I have a NavigationPanel:

 public class NavigationPanel extends Panel {

   public NavigationPanel(String id) {
       super(id);
             ListCustomLinkedPage links = new
 ArrayListCustomLinkedPage();
       links.add(new CustomLinkedPage(Home Page, HomePage.class));
       links.add(new CustomLinkedPage(Some Page, SomePage.class));
           add(new ListView(links, links) {
           public void populateItem(final ListItem item) {
               final CustomLinkedPage link = (CustomLinkedPage)
 item.getModelObject();
               item.add(new CustomBookmarkablePageLink(link,
 link.getPageClass(), link.getDisplayName()));
           }
       });
         }

   class CustomLinkedPage {
       Class pageClass;
       String displayName;
             public CustomLinkedPage(String displayName, Class pageClass) {
           this.pageClass = pageClass;
           this.displayName = displayName;
       }

       // remved getters and setters for less verbosity         }
       class CustomBookmarkablePageLink extends BookmarkablePageLink {

       public CustomBookmarkablePageLink(String id, Class pageClass, String
 displayName) {
           super(id, pageClass);
           this.displayName = displayName;
           add(new Label(displayName, displayName));

       }

       String displayName;

       // remved getters and setters for less verbosity         }

 }

 I tried subclassing BookmarkablePageLink directly without CustomLinkedPage
 but it created inelegant code that made me put link at new instance time
 which I hated, because the link reference seems to be in the wrong scope.

 Spent lots of time researching and had a hard time figuring this out. The
 amount and quality of documents in Wicket is not rich enough for newbies to
 get up to speed quickly enough. Having said that, I totally love the
 component object model. No other framework (I worked with quite a number of
 them) lets me subclass so nicely and having such neat code in html! =)

 Regards,

 Lester


 Martijn Dashorst wrote:

 Use normal BookmarkablePageLinks instead of wicket:link. The latter
 is just convenience and only supports the most basic stuff.

 Martijn

 On Wed, Oct 28, 2009 at 7:55 AM, Lester Chua cicowic...@gmail.com wrote:


 Hi,

 I think I'm the minority here but I like how wicket's default behaviour
 of
 placing html with the page.
 I have a problem that I hope someone has encountered and solved before.

 Basically, I current my source structure to be as follows

 com/acme/web/HomePage.java
 com/acme/web/HomePage.html
 com/acme/web/SomePage.java
 com/acme/web/SomePage.html
 com/acme/panel/NavPanel.java
 com/acme/panel/NavPanel.html

 In my NavPanel.html, I have some links to HomePage.html as well as
 NavPanel.html. a href=SomePage.htmlSome Page/a
 This works. The debug shows that Wicket is automatically figuring which
 page
 to link to link to.

 But when I do the following

 com/acme/proga/SomePage.java
 com/acme/proga/SomePage.html
 com/acme/home/HomePage.java
 com/acme/home/HomePage.html
 com/acme/panel/NavPanel.java
 com/acme/panel/NavPanel.html

 Wicket debug warning shows that it is unable to figure what Page class to
 give a href=SomePage.htmlSome Page/a.
 WARN  org.apache.wicket.markup.resolver.AutoLinkResolver - Did not find
 corresponding java class: com.acme.home.SomePage

 I am thinking that probably what I'm trying to do is wrong. If so, what
 is
 the proper way to make the pages available in a Navigator?
 I tried building the links dynamically by iterating a list of pages and
 getting the paths from there BUT I am stuck trying get a list of Pages of
 my
 application.

 Is there a way for me to resolve this?

 Thanks in advance.

 -
 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 

Re: urlFor(ResourceReference) strangeness

2009-10-28 Thread Alex Objelean

Still, is this acceptable for you? Is my statement about mounting true? If it
is, could you create a jira issue for this?

Alex


pieter claassen-2 wrote:
 
 Alex,
 
 The problem went away. I had some pages mounted (I landed on a mounted
 page)
 and others not so as soon as I removed all the mounted pages, the problem
 went away).
 
 Rgds,
 Pieter
 
 On Wed, Oct 28, 2009 at 7:31 AM, Alex Objelean
 alex_objel...@yahoo.comwrote:
 

 I am pretty sure, it is a bug. The reason why the
 urlFor(ResourceReference)
 is not working properly is because you are using
 BookmarkablePageRequestTargetUrlCodingStrategy for page mounting or a
 similar strategy which encodes the params like this:
 http://server/context/param1/value1/param2/value2 ... To prove that this
 is
 a bug, try to change (just for test purpose) the mounting to
 QueryStringUrlCodingStrategy, to make the url look like this:
 http://server/context?param1=value1. I suspect that when the url is
 built,
 it depends on the page url from where the urlFor(ResourceReference) is
 called... and wicket doesn't remove the parameters from the url and mess
 this up... The real problem is when you are trying to build an absolute
 url
 for a ResourceReference. If this is indeed the reason of the problem, we
 should raise a jira issue...

 Alex Objelean


 pieter claassen-2 wrote:
 
  Ok, but I have a panel and I want to add an Image to the panel but when
 I
  log into my application I get the ../../.. prefix, and the
  ResourceReference
  then fails. However, once I click on any link, the prefix disappears
 and
  then my panel can find the ResourceReference. Am I misunderstanding how
  resource references should be used?
 
  Thanks,
  Pieter
 
  On Tue, Oct 27, 2009 at 4:21 PM, Ryan McKinley ryan...@gmail.com
 wrote:
 
  urlFor( ) uses the current request to get a relative path.  If the
  location
  you are calling urlFor() from changes, it will get a new location
 
  Note the only difference between the two urls is the ../../.. prefix
 
 
  On Oct 27, 2009, at 11:05 AM, pieter claassen wrote:
 
   WHen I start my application, my urlFor() returns a different URL than
  when
  I
  call it a second time?
 
ResourceReference iconref = new ResourceReference(anchorclass,
  iconname);
System.out.println(URL: +urlFor(iconref));
 
  First time it returns:
  URL:
 
 
 ../../../resources/com.musmato.wicket.pages.styles.option1.Option1StyleAnchor/document.png
 
  second time:
  URL:
 
 
 resources/com.musmato.wicket.pages.styles.option1.Option1StyleAnchor/document.png
 
  Any ideas?
 
  Thanks
  Pieter
  --
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  --
  Pieter Claassen
  musmato.com
 
 

 --
 View this message in context:
 http://www.nabble.com/urlFor%28ResourceReference%29-strangeness-tp26079363p26089957.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


 
 
 -- 
 Pieter Claassen
 musmato.com
 
 

-- 
View this message in context: 
http://www.nabble.com/urlFor%28ResourceReference%29-strangeness-tp26079363p26091991.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Wicket and JQuery

2009-10-28 Thread richardwilko

Hi Jeffery,

I would be interested to know what put you off about wiquery, any feedback
is always welcome.

Anyway, for ajax communication, add an AbstractAajxBehaviour to your page /
component, and use the url this generates to pass to your jquery ajax
something like this:

String callbackurl  = ajaxBehaviour.getCallbackUrl(true).toString().

String ajaxJs = $.get(' + callbackurl +', function(data){alert('Data
Loaded: ' + data);});

When you make an ajax request to this url the onRequest method is called,
mine typically look like this:

public void onRequest() {
final RequestCycle requestCycle = RequestCycle.get();

final PageParameters pageParameters = new
PageParameters(requestCycle.getRequest().getParameterMap());

}

Using the page parameters object lets you get access to the request
parameters easily.  If you do not intend to return a result then you should
add this line in:

RequestCycle.get().setRequestTarget(EmptyRequestTarget.getInstance());

to stop a response being sent.

As for ajax replacing of ui components, I usually find that re-running the
javascript code to create the ui component works fine.  Or another way to
get round the problem is to have a element inside the main javascript ui
container, and only replace that.

Hope this helps

Regards - Richard Wilkinson
Developer,
jWeekend: OO  Java Technologies - Development and Training
http://jWeekend.com



Jeffrey Schneller wrote:
 
 I am trying to determine how to use Wicket and JQuery.  I would prefer
 not using wiQuery or similar.  I would like to just include the jQuery
 libraries in my html and then use jQuery as javascript and not wrap
 everything in java on the server side to generate the client code.
 
  
 
 How would one go about doing this?  I assume the basic jQuery
 functionality is straight forward.  However how would you implement
 jQuery code that uses Ajax to communicate back to the server using
 Wicket on the server?  Or would the recommendation be to let Wicket
 handle the Ajax communication and only use jQuery for the UI components
 such as Lightbox, Greybox, apple like sliders, etc.
 
  
 
 Any ideas?
 
  
 
 Thanks.
 
  
 
  
 
 
 


-
http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk 
-- 
View this message in context: 
http://www.nabble.com/Wicket-and-JQuery-tp26085243p26091993.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: Question Wicket Pages and Directories

2009-10-28 Thread Lester Chua

Thanks!
I was just wondering how to cache it as the performance immediately took 
quite a bad hit when I used ListView, RepeatingView is much much better 
for my nav purposes.


Regards,

Lester

Martijn Dashorst wrote:

I'd rather use RepeatingView, together with a utility method for
adding the menu items. A ListView refreshes the menu on each render,
and your menu is rather static.

something like:

RepeatingView rv = new RepeatingView(menu);

addMenuItem(rv, Name of menuitem, PageThatIsLinkedTo.class);

private void addMenuItem(RepeatingView rv, String labelText, Class?
extends WebPage page) {
BookmarkablePageLink link = new BookmarkablePageLink(rv.newChildId(), page);
link.add(new Label(label, labelText));
rv.add(link);
}

On Wed, Oct 28, 2009 at 9:58 AM, Lester Chua cicowic...@gmail.com wrote:
  

Thanks Martijn,

I think I stumbled on the solution just before I saw your hint =).

Please help me take a look and see if the way I approached the problem is
too cumbersome.

Basically my HTML, in my NavigationalPanel.html:

  span wicket:id=links
  a href=# wicket:id=linkspan
wicket:id=displayName/span/abr/
  /span

Java, I have a NavigationPanel:

public class NavigationPanel extends Panel {

  public NavigationPanel(String id) {
  super(id);
ListCustomLinkedPage links = new
ArrayListCustomLinkedPage();
  links.add(new CustomLinkedPage(Home Page, HomePage.class));
  links.add(new CustomLinkedPage(Some Page, SomePage.class));
  add(new ListView(links, links) {
  public void populateItem(final ListItem item) {
  final CustomLinkedPage link = (CustomLinkedPage)
item.getModelObject();
  item.add(new CustomBookmarkablePageLink(link,
link.getPageClass(), link.getDisplayName()));
  }
  });
}

  class CustomLinkedPage {
  Class pageClass;
  String displayName;
public CustomLinkedPage(String displayName, Class pageClass) {
  this.pageClass = pageClass;
  this.displayName = displayName;
  }

  // remved getters and setters for less verbosity }
  class CustomBookmarkablePageLink extends BookmarkablePageLink {

  public CustomBookmarkablePageLink(String id, Class pageClass, String
displayName) {
  super(id, pageClass);
  this.displayName = displayName;
  add(new Label(displayName, displayName));

  }

  String displayName;

  // remved getters and setters for less verbosity }

}

I tried subclassing BookmarkablePageLink directly without CustomLinkedPage
but it created inelegant code that made me put link at new instance time
which I hated, because the link reference seems to be in the wrong scope.

Spent lots of time researching and had a hard time figuring this out. The
amount and quality of documents in Wicket is not rich enough for newbies to
get up to speed quickly enough. Having said that, I totally love the
component object model. No other framework (I worked with quite a number of
them) lets me subclass so nicely and having such neat code in html! =)

Regards,

Lester


Martijn Dashorst wrote:


Use normal BookmarkablePageLinks instead of wicket:link. The latter
is just convenience and only supports the most basic stuff.

Martijn

On Wed, Oct 28, 2009 at 7:55 AM, Lester Chua cicowic...@gmail.com wrote:

  

Hi,

I think I'm the minority here but I like how wicket's default behaviour
of
placing html with the page.
I have a problem that I hope someone has encountered and solved before.

Basically, I current my source structure to be as follows

com/acme/web/HomePage.java
com/acme/web/HomePage.html
com/acme/web/SomePage.java
com/acme/web/SomePage.html
com/acme/panel/NavPanel.java
com/acme/panel/NavPanel.html

In my NavPanel.html, I have some links to HomePage.html as well as
NavPanel.html. a href=SomePage.htmlSome Page/a
This works. The debug shows that Wicket is automatically figuring which
page
to link to link to.

But when I do the following

com/acme/proga/SomePage.java
com/acme/proga/SomePage.html
com/acme/home/HomePage.java
com/acme/home/HomePage.html
com/acme/panel/NavPanel.java
com/acme/panel/NavPanel.html

Wicket debug warning shows that it is unable to figure what Page class to
give a href=SomePage.htmlSome Page/a.
WARN  org.apache.wicket.markup.resolver.AutoLinkResolver - Did not find
corresponding java class: com.acme.home.SomePage

I am thinking that probably what I'm trying to do is wrong. If so, what
is
the proper way to make the pages available in a Navigator?
I tried building the links dynamically by iterating a list of pages and
getting the paths from there BUT I am stuck trying get a list of Pages of
my
application.

Is there a way for me to resolve this?

Thanks in advance.

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







  

Re: Wicket GAE Performance

2009-10-28 Thread Alexander Elsholz
Hi,

i dont have any profiler. the problem is, that the application is slow when
running on googles application engine. local, where i could profile aeverything
is fine.
where ist the best place in wicket to hoock performance measures? or are there
any debug-messages which i could activate?

thanka alex





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



How to have a RenderedDynamicImageResource with transparent background?

2009-10-28 Thread Reinhard Vornholt
Hello,

I like to have a RenderedDynamicImageResource with a transparent background.
I tried serveral things google came up with. But none worked so far.
Let me show you what I do:

public RenderedDynamicImageResource getCity(final Long cityId){
RenderedDynamicImageResource image = new
RenderedDynamicImageResource(500, 570) {
private static final long serialVersionUID = 1L;

@Override
protected boolean render(Graphics2D mapGraphic) {
return renderCity(mapGraphic, cityId);
}
};

return image;
}


protected boolean renderCity(Graphics2D mapGraphic, final Long cityId) {

   

// Prepare g2 for transparency
  //one of the approches I tried... without luck


mapGraphic.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC,
0.9f));
Rectangle2D.Double rect = new Rectangle2D.Double(0, 0, 500,
570);
mapGraphic.fill(rect);

   .

  // Here I draw some shapes into the mapGraphic

   

 //in the end I'd like to have a png with a transparent  background
and some shapes on it
}



If anyone can provide me with help or even a working example, that would be
greatly apreciated.

cheers
reinhard


RE: Wicket and JQuery

2009-10-28 Thread Jeffrey Schneller
Can you expand on this?  The plan was to replace components via ajax [using 
wicket's ajax support] and have the jquery+plugins skin the components.

For example:

Have a jQuery accordion that in each accordion step allows the user to click a 
button or a link.  The button or the link would display a jquery dialog that 
the user can do something with [make a selection] and then other elements on 
the page would be updated to show what the user selected.  The other elements 
on the page will also be jquery+plugins skinned elements.

-Original Message-
From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] 
Sent: Wednesday, October 28, 2009 12:38 AM
To: users@wicket.apache.org
Subject: Re: Wicket and JQuery

... and expect trouble with ajaxifying jquery plugins that skin html
components. They will not work properly if you replace your components
via ajax - or at least you might have to work hard on it.

**
Marin

2009/10/27 Jeremy Thomerson jer...@wickettraining.com:
 I'd suggest only using jQuery for the UI effects and let Wicket do the AJAX.

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



 On Tue, Oct 27, 2009 at 4:06 PM, Jeffrey Schneller 
 jeffrey.schnel...@envisa.com wrote:

 I am trying to determine how to use Wicket and JQuery.  I would prefer
 not using wiQuery or similar.  I would like to just include the jQuery
 libraries in my html and then use jQuery as javascript and not wrap
 everything in java on the server side to generate the client code.



 How would one go about doing this?  I assume the basic jQuery
 functionality is straight forward.  However how would you implement
 jQuery code that uses Ajax to communicate back to the server using
 Wicket on the server?  Or would the recommendation be to let Wicket
 handle the Ajax communication and only use jQuery for the UI components
 such as Lightbox, Greybox, apple like sliders, etc.



 Any ideas?



 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



RE: Wicket and JQuery

2009-10-28 Thread Jeffrey Schneller
Richard,

You lost me a bit with the AbstractAjaxBehaviour stuff.  Was this to get
wiquery to work or to not use wiquery.  The problems I saw with wiquery
when I first looked [a few weeks back] at were:  1) seemed a bit of a
work-in-progress / proof of concept, 2) lack of samples + a good base of
users, 3) how to integrate with the various plugins that are out there.

I just took a second look at the wiquery site and it looks much better
then when I first looked.  There are now samples with code that actual
work and the mailing list is getting more traffic.  I still have a
concern with integrating the various plugins available for jQuery.  I
don't want to re-invent the wheel and really don't want to spend time
writing java code to get a jQuery plugin to be used with wiQuery.  The
point of the plugin is to not have to write additional code.

How would I integrate the various plugins available into wiQuery?

Thanks.


-Original Message-
From: richardwilko [mailto:richardjohnwilkin...@gmail.com] 
Sent: Wednesday, October 28, 2009 5:57 AM
To: users@wicket.apache.org
Subject: Re: Wicket and JQuery


Hi Jeffery,

I would be interested to know what put you off about wiquery, any
feedback
is always welcome.

Anyway, for ajax communication, add an AbstractAajxBehaviour to your
page /
component, and use the url this generates to pass to your jquery ajax
something like this:

String callbackurl  = ajaxBehaviour.getCallbackUrl(true).toString().

String ajaxJs = $.get(' + callbackurl +', function(data){alert('Data
Loaded: ' + data);});

When you make an ajax request to this url the onRequest method is
called,
mine typically look like this:

public void onRequest() {
final RequestCycle requestCycle = RequestCycle.get();

final PageParameters pageParameters = new
PageParameters(requestCycle.getRequest().getParameterMap());

}

Using the page parameters object lets you get access to the request
parameters easily.  If you do not intend to return a result then you
should
add this line in:

RequestCycle.get().setRequestTarget(EmptyRequestTarget.getInstance());

to stop a response being sent.

As for ajax replacing of ui components, I usually find that re-running
the
javascript code to create the ui component works fine.  Or another way
to
get round the problem is to have a element inside the main javascript ui
container, and only replace that.

Hope this helps

Regards - Richard Wilkinson
Developer,
jWeekend: OO  Java Technologies - Development and Training
http://jWeekend.com



Jeffrey Schneller wrote:
 
 I am trying to determine how to use Wicket and JQuery.  I would prefer
 not using wiQuery or similar.  I would like to just include the jQuery
 libraries in my html and then use jQuery as javascript and not wrap
 everything in java on the server side to generate the client code.
 
  
 
 How would one go about doing this?  I assume the basic jQuery
 functionality is straight forward.  However how would you implement
 jQuery code that uses Ajax to communicate back to the server using
 Wicket on the server?  Or would the recommendation be to let Wicket
 handle the Ajax communication and only use jQuery for the UI
components
 such as Lightbox, Greybox, apple like sliders, etc.
 
  
 
 Any ideas?
 
  
 
 Thanks.
 
  
 
  
 
 
 


-
http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk 
-- 
View this message in context:
http://www.nabble.com/Wicket-and-JQuery-tp26085243p26091993.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



input filed mask

2009-10-28 Thread tubin gen
Is there any textfield to format number to currency , I need a currency text
field is there any available ?


Re: presentation changes when switching to deployment mode

2009-10-28 Thread Igor Vaynberg
your css may depend on wicket tags, such as wicket:container,
wicket:extend, etc. these tags are stripped in deployment mode.

-igor

On Wed, Oct 28, 2009 at 2:13 AM, Pi Trash ptr...@web.de wrote:
 Hi all,

 I developed a simple Wicket application containing just one page with some 
 tables. In development mode everything is working and looking fine. But when 
 I switch to deployment mode the presentation of the page changes 
 dramatically. For example borders of tables are not visible any more. What am 
 I doing wrong?
 It seems to be just a CSS issue but the code and resources are exactly the 
 same. I just switch the mode by changing a System property which is handled 
 in WebApplication code like this:

 @Override
 public String getConfigurationType() {
   if (this.debugMode()) {
      return DEVELOPMENT;
   } else {
      return DEPLOYMENT;
   }
 }

 Thanks for your help!
 ___
 Neu: WEB.DE DSL bis 50.000 kBit/s und 200,- Euro Startguthaben!
 http://produkte.web.de/go/02/


 -
 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 have a RenderedDynamicImageResource with transparent background?

2009-10-28 Thread Michael O'Cleirigh

Hi Reinhard,

You need to seperate your image generating logic from the wicket Image 
Resource. 

I'd create a test program or unit test to build verify that the image 
you want is being built correctly and then bind it into wicket.


For example you can just use a BufferedDynamicImageResource with the 
image you generate.


Here is some code I have for writing a string into an image.  If you 
pass backgroundColor = null it will emit a transparent background with 
foregroundColor text on top.


public static BufferedImage writeString(String text, int height, int 
width, Font font, Color backgroundColor, Color foregroundColor) {
  
// TYPE_INT_ARGB specifies the image format: 8-bit RGBA packed

 // into integer pixels
 BufferedImage bi = new BufferedImage(width, height, 
BufferedImage.TYPE_INT_ARGB);


 Graphics2D graphics2D = bi.createGraphics();


   
 graphics2D.setFont(font);

 FontMetrics fontMetrics = graphics2D.getFontMetrics();
 int stringWidth = fontMetrics.stringWidth(text);
 int stringHeight = fontMetrics.getAscent();

 if (backgroundColor != null) {

 graphics2D.setBackground(backgroundColor);

 graphics2D.clearRect(0, 0, width, height);

 }

 graphics2D.setPaint(foregroundColor);

 graphics2D.drawString(text, (width - stringWidth) / 2, height 
/ 2 + stringHeight / 4);

 return bi;

   }

These Wiki references that should also help you:

http://cwiki.apache.org/WICKET/how-to-create-dynamic-image-overlays.html
http://cwiki.apache.org/WICKET/how-to-stamp-an-image-template-with-context-specific-details.html

Regards,

Mike

I like to have a RenderedDynamicImageResource with a transparent background.
I tried serveral things google came up with. But none worked so far.
Let me show you what I do:

public RenderedDynamicImageResource getCity(final Long cityId){
RenderedDynamicImageResource image = new
RenderedDynamicImageResource(500, 570) {
private static final long serialVersionUID = 1L;

@Override
protected boolean render(Graphics2D mapGraphic) {
return renderCity(mapGraphic, cityId);
}
};

return image;
}


protected boolean renderCity(Graphics2D mapGraphic, final Long cityId) {

   

// Prepare g2 for transparency
  //one of the approches I tried... without luck


mapGraphic.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC,
0.9f));
Rectangle2D.Double rect = new Rectangle2D.Double(0, 0, 500,
570);
mapGraphic.fill(rect);

   .

  // Here I draw some shapes into the mapGraphic

   

 //in the end I'd like to have a png with a transparent  background
and some shapes on it
}



If anyone can provide me with help or even a working example, that would be
greatly apreciated.

cheers
reinhard

  



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



RE: Wicket and JQuery

2009-10-28 Thread richardwilko

Hi Jeffrey,

AbstractAjaxBehaviour bit is nothing to do with wiquery, although it is the
method I use when I want to use jquery ajax when writing wiquery components.

Essentially, AbstractAjaxBehaviour is a behaviour that you add to the page
or component and you can call getCallbackUrl(true).toString() on the
instance of AbstractAjaxBehaviour which gives you the url which calls the
AbstractAjaxBehaviour onRequest method (which you have to implement).  You
then use this url in your jquery ajax.  This is only if you want to use
jquery ajax though, and as someone already suggested, it is probably easier
to use wicket ajax.

Wiquery implements most of the core jQuery UI components, so you shouldn't
have to implement those yourself.  The demo application should give you a
good idea of what is already available.
If you want to implement code for another jQuery library, then you can do it
by implementing 
 IWiQueryPlugin, but this probably isn't the right place to discuss this in
detail (wiquery mailing list would be better).  I think that there are plans
for there to be a 'wiquery-extras' project, which is made up of 3rd party
jQuery components, but this has not been set up yet.


Regards - Richard Wilkinson
Developer,
jWeekend: OO  Java Technologies - Development and Training
http://jWeekend.com



Jeffrey Schneller wrote:
 
 Richard,
 
 You lost me a bit with the AbstractAjaxBehaviour stuff.  Was this to get
 wiquery to work or to not use wiquery.  The problems I saw with wiquery
 when I first looked [a few weeks back] at were:  1) seemed a bit of a
 work-in-progress / proof of concept, 2) lack of samples + a good base of
 users, 3) how to integrate with the various plugins that are out there.
 
 I just took a second look at the wiquery site and it looks much better
 then when I first looked.  There are now samples with code that actual
 work and the mailing list is getting more traffic.  I still have a
 concern with integrating the various plugins available for jQuery.  I
 don't want to re-invent the wheel and really don't want to spend time
 writing java code to get a jQuery plugin to be used with wiQuery.  The
 point of the plugin is to not have to write additional code.
 
 How would I integrate the various plugins available into wiQuery?
 
 Thanks.
 
 
 -Original Message-
 From: richardwilko [mailto:richardjohnwilkin...@gmail.com] 
 Sent: Wednesday, October 28, 2009 5:57 AM
 To: users@wicket.apache.org
 Subject: Re: Wicket and JQuery
 
 
 Hi Jeffery,
 
 I would be interested to know what put you off about wiquery, any
 feedback
 is always welcome.
 
 Anyway, for ajax communication, add an AbstractAajxBehaviour to your
 page /
 component, and use the url this generates to pass to your jquery ajax
 something like this:
 
 String callbackurl  = ajaxBehaviour.getCallbackUrl(true).toString().
 
 String ajaxJs = $.get(' + callbackurl +', function(data){alert('Data
 Loaded: ' + data);});
 
 When you make an ajax request to this url the onRequest method is
 called,
 mine typically look like this:
 
 public void onRequest() {
 final RequestCycle requestCycle = RequestCycle.get();
 
 final PageParameters pageParameters = new
 PageParameters(requestCycle.getRequest().getParameterMap());
   
 }
 
 Using the page parameters object lets you get access to the request
 parameters easily.  If you do not intend to return a result then you
 should
 add this line in:
 
 RequestCycle.get().setRequestTarget(EmptyRequestTarget.getInstance());
 
 to stop a response being sent.
 
 As for ajax replacing of ui components, I usually find that re-running
 the
 javascript code to create the ui component works fine.  Or another way
 to
 get round the problem is to have a element inside the main javascript ui
 container, and only replace that.
 
 Hope this helps
 
 Regards - Richard Wilkinson
 Developer,
 jWeekend: OO  Java Technologies - Development and Training
 http://jWeekend.com
 
 
 
 Jeffrey Schneller wrote:
 
 I am trying to determine how to use Wicket and JQuery.  I would prefer
 not using wiQuery or similar.  I would like to just include the jQuery
 libraries in my html and then use jQuery as javascript and not wrap
 everything in java on the server side to generate the client code.
 
  
 
 How would one go about doing this?  I assume the basic jQuery
 functionality is straight forward.  However how would you implement
 jQuery code that uses Ajax to communicate back to the server using
 Wicket on the server?  Or would the recommendation be to let Wicket
 handle the Ajax communication and only use jQuery for the UI
 components
 such as Lightbox, Greybox, apple like sliders, etc.
 
  
 
 Any ideas?
 
  
 
 Thanks.
 
  
 
  
 
 
 
 
 
 -
 http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk 
 -- 
 View this message in context:
 http://www.nabble.com/Wicket-and-JQuery-tp26085243p26091993.html
 Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
 

Re: Force page expiration

2009-10-28 Thread Tomás Rossi

Ok... Our page had a StatelessForm inside. We changed it to just Form.

When the form was submitted, we had a bookmarkable page as a response 
page and now we changed the call to produce a non-bookmarkable page. 
This is:


onSubmit() {
...
//setResponsePage(MyResponsePage.class); // - REMOVED
setResponsePage(new MyResponsePage()); // - ADDED
...
}

With this (and no need to clear the pagemap) a submit after a back 
button produces a page expired message.


If I make the form stateless again, kaboom!

Questions:
1) Why setting bookmarkable or not bookmarkable response page makes the 
difference between expiring and not expiring the current page?
2) What determines if a page is stateless or stateful? Is it just the 
fact that it contains stateless or stateful forms?
3) Is there a way I can expire the current page if I set a bookmarkable 
response page?


We feel Wicket is a great framework, but there are things we don't yet 
understand. Mainly, we get really confused on how does Wicket handle 
back button, what are and what distinguishes stateless or stateful 
pages, what are versioned pages/components, what problems they solve and 
how to use them. If anyone can point us where to read on these subjects 
we'll appreciate it very much.


Kind regards and thanks,

Tom;

Pedro Santos escribió:

You are aware that to an page expire, it has to be statefull, right?
In a statefull page:
getPage().getPageMap().clear()
and the previous versions will to be removed from pagemap, then you got the
page expired when try to back to then...

On Tue, Oct 27, 2009 at 4:05 PM, Tomás Rossi tro...@mecon.gov.ar wrote:

  

Nothing seems to work.

Does the fact that the page I want to expire is the home page has anything
to do with it?

Pedro Santos escribió:

 The page returned from back button came from pagemap. Make sure to remove


it
from there and you get the expired exception.

On Tue, Oct 27, 2009 at 11:57 AM, Tomás Rossi tro...@mecon.gov.ar
wrote:



  

Hi, I have another question...

in Wicket (1.4.2), can I force the expiration of a page?
Specifically, if users hit browser's back-button, I'd like to show them
the
page-expired message.

I've already tried to invalidate the session, but I got a horrible
exception when re-submitting the form after reaching it through the back
button.

Thanks in advance,
--
Tom;



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








  

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






  



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



AW: input filed mask

2009-10-28 Thread Giambalvo, Christian
Look at
http://wicket.apache.org/docs/1.4/org/apache/wicket/util/convert/package
-summary.html.

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



Re: Force page expiration

2009-10-28 Thread Pedro Santos
1) Why setting bookmarkable or not bookmarkable response page makes the
difference between expiring and not expiring the current page?
Basically, the page instances are versioned to framework be able to get them
back. The default versioning implementation encode page version information
at url. As bookmarkable pages don't have such information encoded on they
ulr, just a new pagemap are created for they.

2) What determines if a page is stateless or stateful? Is it just the fact
that it contains stateless or stateful forms?
It is stateless by default. Contain an statefull component (as form) is
enough to page turn to statefull

3) Is there a way I can expire the current page if I set a bookmarkable
response page?
yes, just: (if I understand your question)
getPageMap().clear();
setResponsePage(MyStatelessPage);
so
1- go to stateless page 1
2 - go to statefull page 2
3 - clean the pagemap go to stateless page 1
4 - click at back button and the page is expired...

If anyone can point us where to read on these subjects we'll appreciate it
very much.

http://cwiki.apache.org/WICKET/page-maps.html

On Wed, Oct 28, 2009 at 1:43 PM, Tomás Rossi tro...@mecon.gov.ar wrote:

 Ok... Our page had a StatelessForm inside. We changed it to just Form.

 When the form was submitted, we had a bookmarkable page as a response page
 and now we changed the call to produce a non-bookmarkable page. This is:

 onSubmit() {
 ...
 //setResponsePage(MyResponsePage.class); // - REMOVED
 setResponsePage(new MyResponsePage()); // - ADDED
 ...
 }

 With this (and no need to clear the pagemap) a submit after a back button
 produces a page expired message.

 If I make the form stateless again, kaboom!

 Questions:
 1) Why setting bookmarkable or not bookmarkable response page makes the
 difference between expiring and not expiring the current page?
 2) What determines if a page is stateless or stateful? Is it just the fact
 that it contains stateless or stateful forms?
 3) Is there a way I can expire the current page if I set a bookmarkable
 response page?

 We feel Wicket is a great framework, but there are things we don't yet
 understand. Mainly, we get really confused on how does Wicket handle back
 button, what are and what distinguishes stateless or stateful pages, what
 are versioned pages/components, what problems they solve and how to use
 them. If anyone can point us where to read on these subjects we'll
 appreciate it very much.

 Kind regards and thanks,

 Tom;

 Pedro Santos escribió:

  You are aware that to an page expire, it has to be statefull, right?
 In a statefull page:
 getPage().getPageMap().clear()
 and the previous versions will to be removed from pagemap, then you got
 the
 page expired when try to back to then...

 On Tue, Oct 27, 2009 at 4:05 PM, Tomás Rossi tro...@mecon.gov.ar wrote:



 Nothing seems to work.

 Does the fact that the page I want to expire is the home page has
 anything
 to do with it?

 Pedro Santos escribió:

  The page returned from back button came from pagemap. Make sure to
 remove


 it
 from there and you get the expired exception.

 On Tue, Oct 27, 2009 at 11:57 AM, Tomás Rossi tro...@mecon.gov.ar
 wrote:





 Hi, I have another question...

 in Wicket (1.4.2), can I force the expiration of a page?
 Specifically, if users hit browser's back-button, I'd like to show them
 the
 page-expired message.

 I've already tried to invalidate the session, but I got a horrible
 exception when re-submitting the form after reaching it through the
 back
 button.

 Thanks in advance,
 --
 Tom;



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










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










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




-- 
Pedro Henrique Oliveira dos Santos


Re: Wicket and JQuery

2009-10-28 Thread Jeremy Thomerson
I use custom event binding quite a bit within jQuery... for instance:

$(document).bind('fooUpdated', function() {
  // here I make a textfield within foo into an autocomplete textfield
});

Then, when I call to AJAX that replaces foo, I just do:

$(document).trigger('fooUpdated');

This works great.  Just do all your UI component creation within custom
event handlers.  Then, to handle the creation of them on load, use:

$(document).ready(function() {
 $(document).trigger('fooUpdated');
});


The problem comes when using plugins that [foolishly] use $(document).ready
to do any styling, etc.  If you encounter them, you may be able to try
$(document).trigger('ready');  I have never tried this - there may be
unintended consequences.

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



On Tue, Oct 27, 2009 at 11:38 PM, Martin Makundi 
martin.maku...@koodaripalvelut.com wrote:

 ... and expect trouble with ajaxifying jquery plugins that skin html
 components. They will not work properly if you replace your components
 via ajax - or at least you might have to work hard on it.

 **
 Marin

 2009/10/27 Jeremy Thomerson jer...@wickettraining.com:
  I'd suggest only using jQuery for the UI effects and let Wicket do the
 AJAX.
 
  --
  Jeremy Thomerson
  http://www.wickettraining.com
 
 
 
  On Tue, Oct 27, 2009 at 4:06 PM, Jeffrey Schneller 
  jeffrey.schnel...@envisa.com wrote:
 
  I am trying to determine how to use Wicket and JQuery.  I would prefer
  not using wiQuery or similar.  I would like to just include the jQuery
  libraries in my html and then use jQuery as javascript and not wrap
  everything in java on the server side to generate the client code.
 
 
 
  How would one go about doing this?  I assume the basic jQuery
  functionality is straight forward.  However how would you implement
  jQuery code that uses Ajax to communicate back to the server using
  Wicket on the server?  Or would the recommendation be to let Wicket
  handle the Ajax communication and only use jQuery for the UI components
  such as Lightbox, Greybox, apple like sliders, etc.
 
 
 
  Any ideas?
 
 
 
  Thanks.
 
 
 
 
 
 
 

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




Re: Force page expiration

2009-10-28 Thread Tomás Rossi
1) So, what does the fact that it creates a new pagemap (or not) has to 
do with the current page been expired or not? I mean, I understand the 
URL encode for the page versioning stuff, but I don't get why the page 
is not expired. Maybe because when I hit the back button, the URL points 
to the last created page on the pagemap instead of pointing to an old one?


2) Let me see if I get it right. A page that changes it's component tree 
is stateful (like the guestbook example) and one that only changes it's 
content through it's models is stateless. Am I right? In that case, why 
shouldn't I think a feedback panel as a stateless component (and thus 
stateless the page which contains it)?


3) That didn't work for me... I'll give it another try.

Pedro Santos escribió:

1) Why setting bookmarkable or not bookmarkable response page makes the
difference between expiring and not expiring the current page?
Basically, the page instances are versioned to framework be able to get them
back. The default versioning implementation encode page version information
at url. As bookmarkable pages don't have such information encoded on they
ulr, just a new pagemap are created for they.

2) What determines if a page is stateless or stateful? Is it just the fact
that it contains stateless or stateful forms?
It is stateless by default. Contain an statefull component (as form) is
enough to page turn to statefull

3) Is there a way I can expire the current page if I set a bookmarkable
response page?
yes, just: (if I understand your question)
getPageMap().clear();
setResponsePage(MyStatelessPage);
so
1- go to stateless page 1
2 - go to statefull page 2
3 - clean the pagemap go to stateless page 1
4 - click at back button and the page is expired...

If anyone can point us where to read on these subjects we'll appreciate it
very much.

http://cwiki.apache.org/WICKET/page-maps.html

On Wed, Oct 28, 2009 at 1:43 PM, Tomás Rossi tro...@mecon.gov.ar wrote:

  

Ok... Our page had a StatelessForm inside. We changed it to just Form.

When the form was submitted, we had a bookmarkable page as a response page
and now we changed the call to produce a non-bookmarkable page. This is:

onSubmit() {
...
//setResponsePage(MyResponsePage.class); // - REMOVED
setResponsePage(new MyResponsePage()); // - ADDED
...
}

With this (and no need to clear the pagemap) a submit after a back button
produces a page expired message.

If I make the form stateless again, kaboom!

Questions:
1) Why setting bookmarkable or not bookmarkable response page makes the
difference between expiring and not expiring the current page?
2) What determines if a page is stateless or stateful? Is it just the fact
that it contains stateless or stateful forms?
3) Is there a way I can expire the current page if I set a bookmarkable
response page?

We feel Wicket is a great framework, but there are things we don't yet
understand. Mainly, we get really confused on how does Wicket handle back
button, what are and what distinguishes stateless or stateful pages, what
are versioned pages/components, what problems they solve and how to use
them. If anyone can point us where to read on these subjects we'll
appreciate it very much.

Kind regards and thanks,

Tom;

Pedro Santos escribió:

 You are aware that to an page expire, it has to be statefull, right?


In a statefull page:
getPage().getPageMap().clear()
and the previous versions will to be removed from pagemap, then you got
the
page expired when try to back to then...

On Tue, Oct 27, 2009 at 4:05 PM, Tomás Rossi tro...@mecon.gov.ar wrote:



  

Nothing seems to work.

Does the fact that the page I want to expire is the home page has
anything
to do with it?

Pedro Santos escribió:

 The page returned from back button came from pagemap. Make sure to
remove




it
from there and you get the expired exception.

On Tue, Oct 27, 2009 at 11:57 AM, Tomás Rossi tro...@mecon.gov.ar
wrote:





  

Hi, I have another question...

in Wicket (1.4.2), can I force the expiration of a page?
Specifically, if users hit browser's back-button, I'd like to show them
the
page-expired message.

I've already tried to invalidate the session, but I got a horrible
exception when re-submitting the form after reaching it through the
back
button.

Thanks in advance,
--
Tom;



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










  

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








  

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






  




setResponsePage chaining

2009-10-28 Thread Ryan
If you have a page,P1, with a form which has an onSubmit() that calls
setResponsePage(new P2()) and the constructor in P2 calls
setResponsePage(new P3()) the page that is rendered is P2.

However, P3 is rendered if the onSubmit calls setResponsePage(P2.class)
and the P2 constructor calls setResponsePage(P3.class).

Is this a bug or am I missing something?

Thanks,
Ryan

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



Bug in DatePicker behavior regarding the back button of the browser

2009-10-28 Thread Martin Bigio
Hi,

I've opened a bug in Jira (https://issues.apache.org/jira/browse/WICKET-2550)
regarding the DatePicker behavior (in Wicket 1.4.1 and above). The issue
includes a QuickStart in order to reproduce the bug.
It seems that the DatePicker introduces a bug when it's included in a
WebPage that can change its state by using an AJAX component.

For example, in the QuickStart the home page contains a
LoadableDetachableModel that returns a list of strings. The page contains a
boolean field (of course persisted) that determines whether the list has
elements or not. When the user clicks an AJAXButton, that boolean value is
modified so that the page displays not an empty list. When the user clicks
another non-AJAX button he is redirected to another page. Once in this page,
if the user clicks the browser back button it's expected that Wicket loads
the previous page from the PageStore (the one that has the not empty list!).
However Wicket apparently loads the first one (the one with an empty list of
strings). If we remove the DatePicker behavior from the TextField component
everything works well.

Thank you in advance,
Martín.


Bug in WicketTester when submitting forms

2009-10-28 Thread Martin Bigio
Hi

I've opened a bug in Jira (https://issues.apache.org/jira/browse/WICKET-2551)
regarding a bug with the WicketTester (1.4.1 and above) when submiting
forms. The issue includes a QuickStart in order to reproduce the bug.

This bug is only present when using CryptedUrlWebRequestCodingStrategy. It
seems that WicketTester can't figure out wich component actually submits the
form  because PageParameter path is undefined, so it decides to redirect
to the HomePage.

Thanks in advance,
Martín


Re: setResponsePage chaining

2009-10-28 Thread Ryan
Throwing RestartResponseException works as expected, but I'm still not
sure if the setResponsePage behavior is correct...

On Wed, Oct 28, 2009 at 11:52:09AM -0600, Ryan exclaimed:

If you have a page,P1, with a form which has an onSubmit() that calls
setResponsePage(new P2()) and the constructor in P2 calls
setResponsePage(new P3()) the page that is rendered is P2.

However, P3 is rendered if the onSubmit calls setResponsePage(P2.class)
and the P2 constructor calls setResponsePage(P3.class).

Is this a bug or am I missing something?

Thanks,
Ryan

-
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: Force page expiration

2009-10-28 Thread Tomás Rossi

Thank you for your time.

Now we know that all of our pages must be stateless AND we need it to 
expire them anyway. Maybe Wicket is not prepared for this so we'll try 
it manually.


Pedro Santos escribió:
1) The browser keep the page url on his history. If that url don't has 
any historical information, the server will think the user want a new 
page.
2)Every component is stateless until you change it. You make an 
component statefull adding it an statefull behavior, or overriding the 
getStatelessHint method.

3)Sending an zip wiht an stateless page and an statefull page.
you can test like:

1- go to stateless page
2 - go to statefull page
3 - go to stateless page AND clear the pagemap (it has to be done 
after the page 2 get into the pagemap)
4 - click at back button and the page is expired... ( if you are using 
firefox, just clean the cache before this step!)


It work fine on IE. On firefox, for some reason, the page got cached 
on the browser! I add some meta tags to avoid it but nothing... Tomás, 
mayb it is what is happening on your project too. Make sure the 
firefox don't cache your pages.


On Wed, Oct 28, 2009 at 3:46 PM, Tomás Rossi tro...@mecon.gov.ar 
mailto:tro...@mecon.gov.ar wrote:


1) So, what does the fact that it creates a new pagemap (or not)
has to do with the current page been expired or not? I mean, I
understand the URL encode for the page versioning stuff, but I
don't get why the page is not expired. Maybe because when I hit
the back button, the URL points to the last created page on the
pagemap instead of pointing to an old one?

2) Let me see if I get it right. A page that changes it's
component tree is stateful (like the guestbook example) and one
that only changes it's content through it's models is stateless.
Am I right? In that case, why shouldn't I think a feedback panel
as a stateless component (and thus stateless the page which
contains it)?

3) That didn't work for me... I'll give it another try.

Pedro Santos escribió:

1) Why setting bookmarkable or not bookmarkable response page
makes the
difference between expiring and not expiring the current page?
Basically, the page instances are versioned to framework be
able to get them
back. The default versioning implementation encode page
version information
at url. As bookmarkable pages don't have such information
encoded on they
ulr, just a new pagemap are created for they.

2) What determines if a page is stateless or stateful? Is it
just the fact
that it contains stateless or stateful forms?
It is stateless by default. Contain an statefull component (as
form) is
enough to page turn to statefull

3) Is there a way I can expire the current page if I set a
bookmarkable
response page?
yes, just: (if I understand your question)
getPageMap().clear();
setResponsePage(MyStatelessPage);
so
1- go to stateless page 1
2 - go to statefull page 2
3 - clean the pagemap go to stateless page 1
4 - click at back button and the page is expired...

If anyone can point us where to read on these subjects we'll
appreciate it
very much.

http://cwiki.apache.org/WICKET/page-maps.html

On Wed, Oct 28, 2009 at 1:43 PM, Tomás Rossi
tro...@mecon.gov.ar mailto:tro...@mecon.gov.ar wrote:

 


Ok... Our page had a StatelessForm inside. We changed it
to just Form.

When the form was submitted, we had a bookmarkable page as
a response page
and now we changed the call to produce a non-bookmarkable
page. This is:

onSubmit() {
...
//setResponsePage(MyResponsePage.class); // - REMOVED
setResponsePage(new MyResponsePage()); // - ADDED
...
}

With this (and no need to clear the pagemap) a submit
after a back button
produces a page expired message.

If I make the form stateless again, kaboom!

Questions:
1) Why setting bookmarkable or not bookmarkable response
page makes the
difference between expiring and not expiring the current page?
2) What determines if a page is stateless or stateful? Is
it just the fact
that it contains stateless or stateful forms?
3) Is there a way I can expire the current page if I set a
bookmarkable
response page?

We feel Wicket is a great framework, but there are things
we don't yet
understand. Mainly, we get really confused on how does
Wicket handle back
button, what are and what distinguishes stateless or
stateful pages, what
  

Any issues using @SpringBean in WebApplication

2009-10-28 Thread Steve Hiller
Hi All,

Are there any issues associated with using the @SpringBean annotation in a 
class that 
inherits from WebApplication or AuthenticatedWebApplication?

Thanks,
Steve


Re: Any issues using @SpringBean in WebApplication

2009-10-28 Thread Igor Vaynberg
no

-igor

On Wed, Oct 28, 2009 at 1:22 PM, Steve Hiller sh...@bellsouth.net wrote:
 Hi All,

 Are there any issues associated with using the @SpringBean annotation in a 
 class that
 inherits from WebApplication or AuthenticatedWebApplication?

 Thanks,
 Steve


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



Re: Any issues using @SpringBean in WebApplication

2009-10-28 Thread shetc

Thanks Igor!
-- 
View this message in context: 
http://www.nabble.com/Any-issues-using-%40SpringBean-in-WebApplication-tp26101512p26101590.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: Any issues using @SpringBean in WebApplication

2009-10-28 Thread Pieter Degraeuwe
Hmm,

I was always thinking that the @SpringBean annotation should be used in
Pages and/or components.
You should inject your dependencies in your Application directly in your
spring.xml.


your spring.xml should contain something like this:

bean class=foo.bar.MyApplication
property name=googleMapsKey value=${googlemaps.key}/
property name=myService ref=service/
/bean

your web.xml contains then a reference to your Application bean

filter
filter-namewicket.fast-web/filter-name

filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class

init-param
param-nameapplicationFactoryClassName/param-name

param-valueorg.apache.wicket.spring.SpringWebApplicationFactory/param-value
/init-param
   /filter



On Wed, Oct 28, 2009 at 9:22 PM, Steve Hiller sh...@bellsouth.net wrote:

 Hi All,

 Are there any issues associated with using the @SpringBean annotation in a
 class that
 inherits from WebApplication or AuthenticatedWebApplication?

 Thanks,
 Steve




-- 
Pieter Degraeuwe
Systemworks bvba
Belgiëlaan 61
9070 Destelbergen
GSM: +32 (0)485/68.60.85
Email: pieter.degrae...@systemworks.be
visit us at http://www.systemworks.be


Re: Any issues using @SpringBean in WebApplication

2009-10-28 Thread Igor Vaynberg
ah, woops. i misread in as with

you will have to inject the application class manually. after you
install the spring component injector.

-igor


On Wed, Oct 28, 2009 at 1:29 PM, shetc sh...@bellsouth.net wrote:

 Thanks Igor!
 --
 View this message in context: 
 http://www.nabble.com/Any-issues-using-%40SpringBean-in-WebApplication-tp26101512p26101590.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 issues using @SpringBean in WebApplication

2009-10-28 Thread Michael O'Cleirigh
You could use the @Autowired Spring annotation and the  
autowire=byType attribute to the bean definition to support autowiring 
to get the same effect as @SpringBean brings in Components.


e.g.

 bean class=foo.bar.MyApplication autowire=byType /


Regards,

Mike




I was always thinking that the @SpringBean annotation should be used in
Pages and/or components.
You should inject your dependencies in your Application directly in your
spring.xml.


your spring.xml should contain something like this:

bean class=foo.bar.MyApplication
property name=googleMapsKey value=${googlemaps.key}/
property name=myService ref=service/
/bean

your web.xml contains then a reference to your Application bean

filter
filter-namewicket.fast-web/filter-name

filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class

init-param
param-nameapplicationFactoryClassName/param-name

param-valueorg.apache.wicket.spring.SpringWebApplicationFactory/param-value
/init-param
   /filter



On Wed, Oct 28, 2009 at 9:22 PM, Steve Hiller sh...@bellsouth.net wrote:

  

Hi All,

Are there any issues associated with using the @SpringBean annotation in a
class that
inherits from WebApplication or AuthenticatedWebApplication?

Thanks,
Steve






  




Replacing a panel with another panel

2009-10-28 Thread Jeffrey Schneller
I am trying to replace a panel with another panel.  The replacement
works the first time.  The next time I click on the replacement link, I
get an exception.

java.lang.IllegalStateException: This method can only be called on a
component that has already been added to its parent.  

 

You will see I am trying to use jQuery .  The jquery piece seems to be
functioning correctly.  I am getting the accordion and also the dialog
popup.  I do notice that in the DOM I am getting 2 divs for the dialog
after the replacement.

 

 

Thanks.

 

Here is the java code for the page:

final WebMarkupContainer options = new
WebMarkupContainer(options);

options.setMarkupId(options);

options.setOutputMarkupId(true);

 
options.setOutputMarkupPlaceholderTag(true);



final Panel testPanel = new
TabPanelStart(optPanel);

testPanel.setMarkupId(dialog);

testPanel.setOutputMarkupId(true);

 
testPanel.setOutputMarkupPlaceholderTag(true);

add(testPanel);



final TabPanel2 panel2 = new
TabPanel2(panel2);

panel2.setOutputMarkupId(true);

 
panel2.setOutputMarkupPlaceholderTag(true);



TabPanel3 panel3 = new
TabPanel3(panel3);



TabPanel panel1 = new TabPanel(panel1)
{

@Override

void
setContent(AjaxRequestTarget target) {



Panel
myPanel = new TestPanel(testPanel.getId()) {

 
@Override

 
public void refresh(AjaxRequestTarget target) {

 
target.addComponent(panel2);

 
target.addComponent(options);  

 
}

};

 
myPanel.setMarkupId(dialog);

 
myPanel.setOutputMarkupId(true);

 
testPanel.replaceWith(myPanel);

 
target.addComponent(myPanel);

}

};

options.add(panel1);

options.add(panel2);

options.add(panel3);

add(options);

 

Here is the TabPanel class:

public TabPanel(String id) {

super(id);



AjaxLink link = new AjaxLink(link) {

 

@Override

public void
onClick(AjaxRequestTarget target) {

 
setContent(target);

 
target.appendJavascript($e('#dialog').dialog({ autoOpen: false }););

 
target.appendJavascript($e('#dialog').dialog('open'););

}

};

add(link);

}



abstract void setContent(AjaxRequestTarget target);

 

Here is the TestPanel class:

public TestPanel(String id) {

super(id);



AjaxLink link = new AjaxLink(opt1) {

@Override

public void
onClick(AjaxRequestTarget target) {

 
refresh(target);

 
this.getSession().error(The user selected something in option 1);

 
target.appendJavascript($e('#dialog').dialog('close'););

 
target.appendJavascript($e(document).trigger('optionsUpdated'););

 
//target.appendJavascript($e('#options').accordion( 'activate' , false
););

 
target.appendJavascript($e('#options').accordion( 'activate' , 1 ););

}

};

add(link);

}



abstract public void refresh(AjaxRequestTarget target);

 



Re: Replacing a panel with another panel

2009-10-28 Thread Eelco Hillenius
 I am trying to replace a panel with another panel.  The replacement
 works the first time.  The next time I click on the replacement link, I
 get an exception.

 java.lang.IllegalStateException: This method can only be called on a
 component that has already been added to its parent.

My guess is that you are referencing the the first panel again. When
you replace panel A with panel B, panel A loses it's reference to the
parent (which goes to B obviously), so if you were to replace on A
again, you get an exception like that. The solution is to reference B
rather than A.

Eelco

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



Re: Fw: new to wicket

2009-10-28 Thread rpraveen

Hi Khadeer,

You have to copy your wicket.jar into WEB-INF\lib and deploy it.  



khadeer wrote:
 
 
 
 
 
 
 
 Hi,
    i am resending this message .i thought question would be missed
 since iam not subscribed to the list .since i sent the message for
 subscription i hope the subscription is complete now.
  
 this is first time i am trying to learn or trying to write code through
 the wicket.i know iam asking very basic question and i look stupid asking
 this question
  
 i went to  http://wicket.apache.org/examplehelloworld.html
 i created a project in eclipse and added the 2 java and html file and
 web.xml and created a war ( placed wicket-1.4.3 as external library) and
 deployed in websphere it doesn't work.
 i did use the maven example even then it is more confusing for me with
 jetty i couldn't come to conculsion about the exact jar files used by
 jetty and one used by maven and jars exactly required for the simple hello
 world example to work.
  
 and one more observation in web.xml
 init-param
   param-nameapplicationClassName/param-name
  
 param-valueorg.apache.wicket.examples.helloworld.HelloWorldApplication/param-value
     /init-param
 
 no where earlier java files package name org.apache.wicket.examples is
 mentioned  
   ---or ---
 do i need any other jar file needed for the example to run since iam
 getting 
  
 --Start of DE processing-- = [10/25/09 23:39:58:425 EDT] , key =
 java.lang.ClassNotFoundException
 com.ibm.ws.webcontainer.filter.WebAppFilterManager.loadFilter 298
 Exception = java.lang.ClassNotFoundException
 Source = com.ibm.ws.webcontainer.filter.WebAppFilterManager.loadFilter
  
 after i deployed the war into the websphere
  
  Thanks in advance for your help.
  
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Fw%3A-new-to-wicket-tp26061968p26103254.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



Tree markup

2009-10-28 Thread bvroling
I'm using the wicket tree, which works nice. However, when the tree
element is longer than the width of the tree, the line just continues
'invisible' behind it. I have been trying for hours now to get a scrollbar
to appear, but no luck so far.
Any ideas?


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



Re: Tree markup

2009-10-28 Thread Haulyn R. Jason
Hi, I just want to lear something here. I do not know how to solve
your problem, but can you tell me how can you add links to the tree
component?

Thanks.


On Thu, Oct 29, 2009 at 6:52 AM,  bvrol...@cmbi.ru.nl wrote:
 I'm using the wicket tree, which works nice. However, when the tree
 element is longer than the width of the tree, the line just continues
 'invisible' behind it. I have been trying for hours now to get a scrollbar
 to appear, but no luck so far.
 Any ideas?


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





-- 
Many thanks!

Haulyn Microproduction

You can access me with the following ways:
Location: Shandong Jinan Shumagang 6H-8, 25
Mobile: +086-15864011231
email: saharab...@gmail.com, hmp.hau...@foxmail.com
website: http://haulynjason.net
gtalk: saharab...@gmail.com
skype: saharabear
QQ: 378606292
persional Twitter: http://twitter.com/saharabear
persional Linkedin: http://www.linkedin.com/in/haulyn
Haulyn Microproduction Twitter: http://twitter.com/haulynmp


Haulyn Jason

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



Wicket Maven in Netbean 6.7

2009-10-28 Thread Tomáš Mihok

Hi there,

year ago when I started with wicket I had Netbeans 6.5 and after 
installing Maven I had option to create Wicket Quickstart Archetype. 
Yesterday I downloaded Netbean 6.7.1 which has built in Maven support 
but I can't find the wicket archetype. When I tried to add new archetype 
with information from wicket site netbeans gave me messagebox that said 
that maven cannot be found. Even the mvn command is not recognized by 
the command line. Can you help me to set up the environment for wicket 
development?


tm

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



Re: Wicket Maven in Netbean 6.7

2009-10-28 Thread Ben Tilford
Netbeans has maven built in but it will use an external installation if you
tell it to. It sounds like you have it configured to use an external maven
installation but don't have maven installed.

In Netbeans go to ToolsOptionsMiscMaven and see if you have set it up to
use an external maven

Then either install maven and point Netbeans to it or use the built in maven

2009/10/28 Tomáš Mihok tomas.mi...@cnl.tuke.sk

 Hi there,

 year ago when I started with wicket I had Netbeans 6.5 and after installing
 Maven I had option to create Wicket Quickstart Archetype. Yesterday I
 downloaded Netbean 6.7.1 which has built in Maven support but I can't find
 the wicket archetype. When I tried to add new archetype with information
 from wicket site netbeans gave me messagebox that said that maven cannot be
 found. Even the mvn command is not recognized by the command line. Can you
 help me to set up the environment for wicket development?

 tm

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




Re: Wicket Maven in Netbean 6.7

2009-10-28 Thread Tomáš Mihok

Thank you wery much,

pointing to external maven location worked flawlessly. Even the Wicket 
Archtype came out.


tm

Ben Tilford  wrote / napísal(a):

Netbeans has maven built in but it will use an external installation if you
tell it to. It sounds like you have it configured to use an external maven
installation but don't have maven installed.

In Netbeans go to ToolsOptionsMiscMaven and see if you have set it up to
use an external maven

Then either install maven and point Netbeans to it or use the built in maven

2009/10/28 Tomáš Mihok tomas.mi...@cnl.tuke.sk

  

Hi there,

year ago when I started with wicket I had Netbeans 6.5 and after installing
Maven I had option to create Wicket Quickstart Archetype. Yesterday I
downloaded Netbean 6.7.1 which has built in Maven support but I can't find
the wicket archetype. When I tried to add new archetype with information
from wicket site netbeans gave me messagebox that said that maven cannot be
found. Even the mvn command is not recognized by the command line. Can you
help me to set up the environment for wicket development?

tm

-
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: Tree markup

2009-10-28 Thread Haulyn R. Jason
Hi, I know how to add links. override newLink method. Thanks again.

On Thu, Oct 29, 2009 at 7:35 AM, Haulyn R. Jason saharab...@gmail.com wrote:
 Hi, I just want to lear something here. I do not know how to solve
 your problem, but can you tell me how can you add links to the tree
 component?

 Thanks.


 On Thu, Oct 29, 2009 at 6:52 AM,  bvrol...@cmbi.ru.nl wrote:
 I'm using the wicket tree, which works nice. However, when the tree
 element is longer than the width of the tree, the line just continues
 'invisible' behind it. I have been trying for hours now to get a scrollbar
 to appear, but no luck so far.
 Any ideas?


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





 --
 Many thanks!

 Haulyn Microproduction

 You can access me with the following ways:
 Location: Shandong Jinan Shumagang 6H-8, 25
 Mobile: +086-15864011231
 email: saharab...@gmail.com, hmp.hau...@foxmail.com
 website: http://haulynjason.net
 gtalk: saharab...@gmail.com
 skype: saharabear
 QQ: 378606292
 persional Twitter: http://twitter.com/saharabear
 persional Linkedin: http://www.linkedin.com/in/haulyn
 Haulyn Microproduction Twitter: http://twitter.com/haulynmp


 Haulyn Jason




-- 
Many thanks!

Haulyn Microproduction

You can access me with the following ways:
Location: Shandong Jinan Shumagang 6H-8, 25
Mobile: +086-15864011231
email: saharab...@gmail.com, hmp.hau...@foxmail.com
website: http://haulynjason.net
gtalk: saharab...@gmail.com
skype: saharabear
QQ: 378606292
persional Twitter: http://twitter.com/saharabear
persional Linkedin: http://www.linkedin.com/in/haulyn
Haulyn Microproduction Twitter: http://twitter.com/haulynmp


Haulyn Jason

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



Re: setResponsePage chaining

2009-10-28 Thread bgooren

Well, new P2() is executed _before_ it's result (a P2 instance) is passed to
setResponsePage(), so this behavior is perfectly normal: setResponsePage(
new P3() ) is executed before the resulting P2 instance is passed to
setResponsePage().

Timeline:
1. new P2() is executed
2. P2 constructor is called, which calls setResponsePage( new P3() )
3. P2 constructor returns a P2 instance, which is used as input in the first
setResponsePage() call

As you can see, the final call to setResponsePage() wins, P2 in this case

The reason that setResponsePage( P2.class ) does result in P3 being rendered
is also logical: it results in wicket instantiating P2.class _after_
setResponsePage( P2.class ) is called.

Timeline:

1. setResponsePage( P2.class )
2. wicket calls the P2 constructor, which calls setResponsePage( new P3() )

As you can see, in this case the final call to setResponsePage() is in the
P2 constructor, so it wins.

By throwing a RestartResponseException, setResponsePage( [P2 class instance]
) is never executed, since the exception breaks out of the code.

Bas


Ryan-117 wrote:
 
 Throwing RestartResponseException works as expected, but I'm still not
 sure if the setResponsePage behavior is correct...
 
 On Wed, Oct 28, 2009 at 11:52:09AM -0600, Ryan exclaimed:
 
If you have a page,P1, with a form which has an onSubmit() that calls
setResponsePage(new P2()) and the constructor in P2 calls
setResponsePage(new P3()) the page that is rendered is P2.

However, P3 is rendered if the onSubmit calls setResponsePage(P2.class)
and the P2 constructor calls setResponsePage(P3.class).

Is this a bug or am I missing something?

Thanks,
Ryan

-
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/setResponsePage-chaining-tp26099119p26104397.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: Replacing a panel with another panel

2009-10-28 Thread Jeffrey Schneller
So how would I reference B rather than A on all subsequent calls after the 
first.  Is it as simple as checking to see if A does not have some property 
set?  Then just use an if/then/else statement to use the correct panel.

Thanks.



-Original Message-
From: Eelco Hillenius [mailto:eelco.hillen...@gmail.com]
Sent: Wed 10/28/2009 6:20 PM
To: users@wicket.apache.org
Subject: Re: Replacing a panel with another panel
 
 I am trying to replace a panel with another panel.  The replacement
 works the first time.  The next time I click on the replacement link, I
 get an exception.

 java.lang.IllegalStateException: This method can only be called on a
 component that has already been added to its parent.

My guess is that you are referencing the the first panel again. When
you replace panel A with panel B, panel A loses it's reference to the
parent (which goes to B obviously), so if you were to replace on A
again, you get an exception like that. The solution is to reference B
rather than A.

Eelco

-
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 issues using @SpringBean in WebApplication

2009-10-28 Thread James Carman
On Wed, Oct 28, 2009 at 5:29 PM, Michael O'Cleirigh
michael.ocleir...@rivulet.ca wrote:
 You could use the @Autowired Spring annotation and the  autowire=byType
 attribute to the bean definition to support autowiring to get the same
 effect as @SpringBean brings in Components.

Not exactly, Michael.  The injected beans aren't a good candidate to
pass to pages/components that need to be serialized.  That's one of
the main reasons why we use @SpringBean.  If you're just going to use
the beans by looking them up through the application object, then it's
no big deal.  But, if they ever make their way into a page/component
as a field, then you'll have problems.

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



Re: Replacing a panel with another panel

2009-10-28 Thread Igor Vaynberg
class mycomponent {
  component A;

   void onclick() {
  component B=new something(A.getId());
  A.replaceWith(B);
  A=B;
   }
}

the A=B is what you are missing.

-igor

On Wed, Oct 28, 2009 at 7:06 PM, Jeffrey Schneller
jeffrey.schnel...@envisa.com wrote:
 So how would I reference B rather than A on all subsequent calls after the 
 first.  Is it as simple as checking to see if A does not have some property 
 set?  Then just use an if/then/else statement to use the correct panel.

 Thanks.



 -Original Message-
 From: Eelco Hillenius [mailto:eelco.hillen...@gmail.com]
 Sent: Wed 10/28/2009 6:20 PM
 To: users@wicket.apache.org
 Subject: Re: Replacing a panel with another panel

 I am trying to replace a panel with another panel.  The replacement
 works the first time.  The next time I click on the replacement link, I
 get an exception.

 java.lang.IllegalStateException: This method can only be called on a
 component that has already been added to its parent.

 My guess is that you are referencing the the first panel again. When
 you replace panel A with panel B, panel A loses it's reference to the
 parent (which goes to B obviously), so if you were to replace on A
 again, you get an exception like that. The solution is to reference B
 rather than A.

 Eelco

 -
 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: Fw: new to wicket

2009-10-28 Thread sharief Mohammed
As of now i am getting below error
 

10/28/09 22:43:26:894 EDT] 001d WebApp    E   [Servlet Error]-[Filter 
[WebApplication]: could not be initialized]: java.lang.LinkageError: 
LinkageError while defining class: HelloWorldApplication
Could not be defined due to: (HelloWorldApplication) bad major version at 
offset=6
This is often caused by having a class defined at multiple
locations within the classloader hierarchy.  Other potential causes
include compiling against an older or newer version of the class
that has an incompatible method signature.
Dumping the current context classloader hierarchy:
    == indicates defining classloader
==[0] 
com.ibm.ws.classloader.compoundclassloa...@74e674e6
   Local ClassPath: 
C:\WebspherePortal\AppServer\profiles\AppSrv01\installedApps\CDXK3F1Node01Cell\helloworld.ear\helloworld.war\WEB-INF\classes;C:\WebspherePortal\AppServer\profiles\AppSrv01\installedApps\CDXK3F1Node01Cell\helloworld.ear\helloworld.war\WEB-INF\lib\log4j-1.2.15.jar;C:\WebspherePortal\AppServer\profiles\AppSrv01\installedApps\CDXK3F1Node01Cell\helloworld.ear\helloworld.war\WEB-INF\lib\slf4j-api-1.5.6.jar;C:\WebspherePortal\AppServer\profiles\AppSrv01\installedApps\CDXK3F1Node01Cell\helloworld.ear\helloworld.war\WEB-INF\lib\slf4j-log4j12-1.5.6.jar;C:\WebspherePortal\AppServer\profiles\AppSrv01\installedApps\CDXK3F1Node01Cell\helloworld.ear\helloworld.war\WEB-INF\lib\wicket-1.4.3.jar;C:\WebspherePortal\AppServer\profiles\AppSrv01\installedApps\CDXK3F1Node01Cell\helloworld.ear\helloworld.war
   Delegation Mode: PARENT_FIRST
   [1] 
com.ibm.ws.classloader.compoundclassloa...@59ce59ce
   Local ClassPath: 
 

 
issue with websphere is resolved by the custom property 
com.ibm.ws.webcontainer.invokefilterscompatibility
 
http://www-01.ibm.com/support/docview.wss?uid=swg21328168
 
Any help would be appreciated 
 
 


--- On Wed, 10/28/09, rpraveen rptechi...@gmail.com wrote:


From: rpraveen rptechi...@gmail.com
Subject: Re: Fw: new to wicket
To: users@wicket.apache.org
Date: Wednesday, October 28, 2009, 6:24 PM



Hi Khadeer,

    You have to copy your wicket.jar into WEB-INF\lib and deploy it.  



khadeer wrote:
 
 
 
 
 
 
 
 Hi,
    i am resending this message .i thought question would be missed
 since iam not subscribed to the list .since i sent the message for
 subscription i hope the subscription is complete now.
  
 this is first time i am trying to learn or trying to write code through
 the wicket.i know iam asking very basic question and i look stupid asking
 this question
  
 i went to  http://wicket.apache.org/examplehelloworld.html
 i created a project in eclipse and added the 2 java and html file and
 web.xml and created a war ( placed wicket-1.4.3 as external library) and
 deployed in websphere it doesn't work.
 i did use the maven example even then it is more confusing for me with
 jetty i couldn't come to conculsion about the exact jar files used by
 jetty and one used by maven and jars exactly required for the simple hello
 world example to work.
  
 and one more observation in web.xml
 init-param
   param-nameapplicationClassName/param-name
  
 param-valueorg.apache.wicket.examples.helloworld.HelloWorldApplication/param-value
     /init-param
 
 no where earlier java files package name org.apache.wicket.examples is
 mentioned  
   ---or ---
 do i need any other jar file needed for the example to run since iam
 getting 
  
 --Start of DE processing-- = [10/25/09 23:39:58:425 EDT] , key =
 java.lang.ClassNotFoundException
 com.ibm.ws.webcontainer.filter.WebAppFilterManager.loadFilter 298
 Exception = java.lang.ClassNotFoundException
 Source = com.ibm.ws.webcontainer.filter.WebAppFilterManager.loadFilter
  
 after i deployed the war into the websphere
  
  Thanks in advance for your help.
  
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Fw%3A-new-to-wicket-tp26061968p26103254.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: Setup for stepping into wicket source in eclipse

2009-10-28 Thread Flavius

Nicolas, yes my build automatically is checked.

Pedro, that fixed it!  Thank you very much!



Pedro H. O. dos Santos wrote:
 
 Debug Configuration  your server configuration  Source tab  remove
 older
 source codes from it if there is one
 
 On Tue, Oct 27, 2009 at 10:55 AM, Nicolas Melendez 
 nmelen...@getsense.com.ar wrote:
 
 is your build automatically checked?

 On Mon, Oct 26, 2009 at 1:07 AM, Flavius flav...@silverlion.com wrote:

 
  I am trying to debug an issue and am trying to step into wicket
  from my project.  However, the line numbers are not matching
  up with the source I have.  I've done this several times with other
  projects and this is indicative of having the wrong version of the
  source vs. the jar file.
 
  I am using eclipse version 3.5.0.v20090611a.  I'm also using
  jdk1.6.0_14.
 
  My project is setup as a java web project and I have a webapp/
  WEB-INF/lib dir with my jars.  These include wicket-1.4.3.jar,
  wicket-extensions-1.4.3.jar, and wicket-datetime-1.4.3.jar.  If I
  remove the wicket jar, the project can no longer identify any
  of the org.apache.wicket.* imports.  This tells me that it isn't
  getting a reference to derived classes.
 
  If I then either put the wicket jar back and set the source to the
  wicket-sources.jar or simply link to the
  apache-wicket-1.4.3\src\wicket\src\main\java, I still get the same
  result.
 
  As an example, when I CTRL-click on setDefaultModelObject(), it
  takes me to Component.class line 3022.  I can see it going to
  wicket-1.4.3.jar org.apache.wicket.Component in my Package
  Explorer.  However, when I actually run the code and step into
  that method (having attached the wicket-sources.jar), the method
  setDefaultModelObject is actually on line 3031.
 
  I've gone into the wicket src dir for wicket 1.4.3 and built the wicket
  jar and sources and pulled them from the target dir and still get the
  same results.
 
  Can anybody offer any insight into this?
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 

 
 
 
 -- 
 Pedro Henrique Oliveira dos Santos
 
 

-- 
View this message in context: 
http://www.nabble.com/Setup-for-stepping-into-wicket-source-in-eclipse-tp26054432p26105471.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