Re: Turning off ModificationWatcher

2009-04-08 Thread Martijn Dashorst
Never *EVER* deploy your application in development mode. Use
deployment mode and turn those features you want on.

Martijn

On Thu, Apr 9, 2009 at 4:33 AM, Matthew Welch  wrote:
> I'm experimenting with Wicket inside Google's new Java support for its App
> Engine. My simple apps run fine if the configuration is set to DEPLOYMENT,
> however in development mode, I get an exception related to
> ModificationWatcher. Looking at the exception I think this
> ModificationWatcher is being used as part of a new thread which is a no-no
> inside the App Engine sandbox. Is there way way to just disbable this
> modification watcher without putting the entire app in deployment mode?
> There are a number of items I like about development mode but this one
> glitch is preventing me from using it.
>
> Matt
>



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

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



Re: Update DropDownChoice

2009-04-08 Thread PDiefent

Hi Dariusz,
thank you very much, that's the solution for my problem. 
Peter


Dariusz Wojtas wrote:
> 
> Try to update the ddc model, then call:
>ddc.modelChanged();
> before rendering.
> 
> Regards,
> 
> Dariusz Wojtas
> 
> On Wed, Apr 8, 2009 at 8:36 AM, Peter Diefenthaeler 
> wrote:
>>
>> Hallo,
>> I'm trying to update a DropDownChoice from a Ajax Callback. The new value
>> is correctly added to the choice of selectable values, but I can't set
>> the
>> new added value as the selected value, only new choice is shown ...
>> Any ideas are welcome.
>> Thanks, Peter
> 
> -
> 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/Update-DropDownChoice-tp22944165p22964826.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



Changing form validation depending on submit button.

2009-04-08 Thread Ian MacLarty
Hi,

I have a form with two submit buttons.  I want the form to validate
differently depending on what submit button is pressed (i.e. I want to
use a different IFormValidator depending on what button is used to
submit the form).  How would I go about doing this?

Ian.

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



super(params) WebPage

2009-04-08 Thread Eduardo Nunes
Hi,

  I want to know if I have or not to call super(params) in my
constructor Xxx(PageParameters params). I made some tests and I got
strange results. I have a form inside a page, on the constructor of
this page I call super(params) and  setVersioned(false). The form
extends StatelessForm. If I call super(params), the page seems not to
be stateless. Another problem that happens (this one is more weird),
the form is a sign in form with two required fields, email (textfield)
and password (passwordtextfield) and each time that I click to submit
with these fields without filling, the URL gets bigger and the email
field gets a value ";". I think there is a bug, I will try to make a
simple example. Is there someone with the same problem?

  Please ask if you need more information.

Thanks,
Eduardo S. Nunes

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



page expire

2009-04-08 Thread srinivas

Hi,
*
How to make the page expire when the user click the browser back button 
in wicket.*



Regards,
Srinivasa Raju CH.


Get your world in your inbox!

Mail, widgets, documents, spreadsheets, organizer and much more with your 
Sifymail WIYI id!
Log on to http://www.sify.com

** DISCLAIMER **
Information contained and transmitted by this E-MAIL is proprietary to 
Sify Limited and is intended for use only by the individual or entity to 
which it is addressed, and may contain information that is privileged, 
confidential or exempt from disclosure under applicable law. If this is a 
forwarded message, the content of this E-MAIL may not have been sent with 
the authority of the Company. If you are not the intended recipient, an 
agent of the intended recipient or a  person responsible for delivering the 
information to the named recipient,  you are notified that any use, 
distribution, transmission, printing, copying or dissemination of this 
information in any way or in any manner is strictly prohibited. If you have 
received this communication in error, please delete this mail & notify us 
immediately at ad...@sifycorp.com


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



Re: Turning off ModificationWatcher

2009-04-08 Thread Jonathan Locke


not sure, but try getResourceSettings().setResourcePollFrequency(null) in
your app init


Matt Welch wrote:
> 
> I'm experimenting with Wicket inside Google's new Java support for its App
> Engine. My simple apps run fine if the configuration is set to DEPLOYMENT,
> however in development mode, I get an exception related to
> ModificationWatcher. Looking at the exception I think this
> ModificationWatcher is being used as part of a new thread which is a no-no
> inside the App Engine sandbox. Is there way way to just disbable this
> modification watcher without putting the entire app in deployment mode?
> There are a number of items I like about development mode but this one
> glitch is preventing me from using it.
> 
> Matt
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Turning-off-ModificationWatcher-tp22963478p22963737.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: Turning off ModificationWatcher

2009-04-08 Thread Ryan Crumley
Matt,

Add this to your WebApplication.init() method:

getResourceSettings().setResourcePollFrequency(null);

Ryan

On Wed, Apr 8, 2009 at 9:33 PM, Matthew Welch  wrote:
> I'm experimenting with Wicket inside Google's new Java support for its App
> Engine. My simple apps run fine if the configuration is set to DEPLOYMENT,
> however in development mode, I get an exception related to
> ModificationWatcher. Looking at the exception I think this
> ModificationWatcher is being used as part of a new thread which is a no-no
> inside the App Engine sandbox. Is there way way to just disbable this
> modification watcher without putting the entire app in deployment mode?
> There are a number of items I like about development mode but this one
> glitch is preventing me from using it.
>
> Matt
>

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



Turning off ModificationWatcher

2009-04-08 Thread Matthew Welch
I'm experimenting with Wicket inside Google's new Java support for its App
Engine. My simple apps run fine if the configuration is set to DEPLOYMENT,
however in development mode, I get an exception related to
ModificationWatcher. Looking at the exception I think this
ModificationWatcher is being used as part of a new thread which is a no-no
inside the App Engine sandbox. Is there way way to just disbable this
modification watcher without putting the entire app in deployment mode?
There are a number of items I like about development mode but this one
glitch is preventing me from using it.

Matt


Re: GWT vs. Wicket?

2009-04-08 Thread ying rss

I played with both GWT and wicket. I was drawn to wicket by several reviews
and I'm disappointed. 
I use maven to build gwt and ext-js and GXT which works very well.
Compilation is slow but with tuning to specific browser, the call stack is
straight forward. It's my feeling that GWT is closer to core java than
wicket. 
* I don't know much about javascript so I like the idea of language
separation in GWT. Not very much into wicket's way to blend everything
together. 
* Appreciate the fact there are samples for wicket. But Wicket's
documentation and samples are not enough. There is a lot of pain to do a
little bit more advanced things in wicket for beginners and there are many
user requests in user email list. I never had so much trouble in my gwt
project. Maybe I haven't found a easy way out. Appreciate any suggestions.

-- 
View this message in context: 
http://www.nabble.com/GWT-vs.-Wicket--tp22950178p22962926.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: GWT vs. Wicket?

2009-04-08 Thread Ben Tilford
There was a grails-wicket plugin but I don't think it works with any recent
version. They are also working on making grails more modular with standalone
GORM etc...

Also heard somewhere that Groovy 1.7 or 1.8 will allow anonymous inner
classes.

On Wed, Apr 8, 2009 at 8:53 PM, Andre Prasetya wrote:

> Zk ia good for buildng qpplication bt the zul wndow layout is just
> like that. And the license os stopping us from buildng commercial apps
> wthout buying their licnse.it worth th money but if u live in an
> economically poor country,you can't afford it.
>
> I wish wicket can play nicely with grails,having something like active
> record to use with wicket is nice.
>
> Andre
>
> On 4/8/09, Azzeddine Daddah  wrote:
> > Hi,
> >
> > You may also take a look at ZK framework. It's also a kind of framework
> > which can be used to build beautiful RIA's. You can chose to use it by
> > writing your app in just Java or in Java/Zul.
> > http://www.zkoss.org
> >
> > But in my opinion, Wicket stills beter then these kind of frameworks :)
> >
> > Regards,
> >
> > Azzeddine Daddah
> > www.hbiloo.com
> >
> >
> > On Wed, Apr 8, 2009 at 4:46 PM, Casper Bang  wrote:
> >
> >> > Peter Thomas did a great side by side you should checkout:
> >>
> >> Good article, if perhaps a bit one-sided. I can understand how
> >> separation-of-concerns/composability comes slightly more natural to
> >> Wicket.
> >> However the performance, flexibility and component repertoire of GWT
> along
> >> with steadily more capable browsers leaves me with a feeling that "I'll
> >> get
> >> more bang for my buck".
> >>
> >> > Until GWT has a build system that is better I'll stay away from it.
> >> Since version 1.6 today, it uses normal Ant scripts (which I suppose is
> >> easy
> >> to mavenize).
> >>
> >> Thanks guys,
> >>
> >> /Casper
> >>
> >
>
> --
> Sent from my mobile device
>
> -Andre-
> "A Programmer's Diary"
> http://rafunkel.blogspot.com
> My journey in enjoying spring...
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Re: GWT vs. Wicket?

2009-04-08 Thread nick
Thank you for your mail. I am presently on vacation and will return April 14th. 
 

If you need urgent assistance, please email supp...@bookingbooster.com. You can 
also reach our Support via Skype callto://premiersupport

Thank you

Best regards,

Nick Wheeler

Booking Booster.com 
t: +44 (0)1273 573851 
e: integrat...@bookingbooster.com 

a: The Brighton Forum 
95 Ditchling Road 
Brighton BN1 4ST 
East Sussex 
United Kingdom
Booking Booster is the smarter, easier and more elegant way to update agent 
websites. Save time, Boost Bookings with: http://www.bookingbooster.com





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



Re: GWT vs. Wicket?

2009-04-08 Thread Andre Prasetya
Zk ia good for buildng qpplication bt the zul wndow layout is just
like that. And the license os stopping us from buildng commercial apps
wthout buying their licnse.it worth th money but if u live in an
economically poor country,you can't afford it.

I wish wicket can play nicely with grails,having something like active
record to use with wicket is nice.

Andre

On 4/8/09, Azzeddine Daddah  wrote:
> Hi,
>
> You may also take a look at ZK framework. It's also a kind of framework
> which can be used to build beautiful RIA's. You can chose to use it by
> writing your app in just Java or in Java/Zul.
> http://www.zkoss.org
>
> But in my opinion, Wicket stills beter then these kind of frameworks :)
>
> Regards,
>
> Azzeddine Daddah
> www.hbiloo.com
>
>
> On Wed, Apr 8, 2009 at 4:46 PM, Casper Bang  wrote:
>
>> > Peter Thomas did a great side by side you should checkout:
>>
>> Good article, if perhaps a bit one-sided. I can understand how
>> separation-of-concerns/composability comes slightly more natural to
>> Wicket.
>> However the performance, flexibility and component repertoire of GWT along
>> with steadily more capable browsers leaves me with a feeling that "I'll
>> get
>> more bang for my buck".
>>
>> > Until GWT has a build system that is better I'll stay away from it.
>> Since version 1.6 today, it uses normal Ant scripts (which I suppose is
>> easy
>> to mavenize).
>>
>> Thanks guys,
>>
>> /Casper
>>
>

-- 
Sent from my mobile device

-Andre-
"A Programmer's Diary"
http://rafunkel.blogspot.com
My journey in enjoying spring...

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



Re: Wicket Noob: Long cannot be cast to java.lang.String

2009-04-08 Thread David Brown
Hello Johan, thanks! the static NumberValidator.RangeValidator(long minimum, 
long maximum) worked! Wicket is great. I just wished Wicket was available 10 
years ago! Regards, David.

There are 10 kinds of people in this world: those who understand binary and 
those who don’t (Valid only for 2's complement).

- Original Message -
From: "Johan Compagner" 
To: users@wicket.apache.org
Sent: Tuesday, April 7, 2009 7:08:16 PM GMT -06:00 US/Canada Central
Subject: Re: Wicket Noob: Long cannot be cast to java.lang.String

You seem to have a String validator on a number field. What do you
want to test a range? Or max value of that long? Use a different
validor

On 08/04/2009, David Brown  wrote:
> Hello Wicket dev, gurus and mortals, I was successfully using Wicket to
> build the UI for my new web-app gig. I have studied the javadoc:
> org.apache.wicket.markup.html.form, org.apache.wicket.MarkupContainer and
> others until bleary-eyed. The web-page I am using will display correctly the
> values for Long and Integer in a HTML text input dialog but when I try to
> Save (write the value back to the DB) I get the following error condition. I
> can only work with String data and nothing else using the wicket ids. Please
> advise, David.
>
> **
> org.apache.wicket.WicketRuntimeException: Exception
> 'java.lang.ClassCastException: java.lang.Long cannot be cast to
> java.lang.String' occurred during validation
> org.apache.wicket.validation.validator.StringValidator$MaximumLengthValidator
> on component 1:editform:weight at
> org.apache.wicket.markup.html.form.FormComponent.validateValidators(FormComponent.java:1510)
>
> There are 10 kinds of people in this world: those who understand binary and
> those who don’t (Valid only for 2's complement).
>
> -
> 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: Default implementation of IChainingModel

2009-04-08 Thread Jeremy Thomerson
I think that's a good idea - I have done a similar thing in my own
projects.  Please open a JIRA so this idea doesn't get lost, but this is one
I may try to do soon.

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



On Wed, Apr 8, 2009 at 4:36 PM, Juan G. Arias  wrote:

> Hi all,First of all, I'm using wicket 1.3.5
>
> I'm writing a model and ai need it to be "chaineable". I mean, I need this
> model to contain another model, so my model can obtain the data, for
> example, from a property model.
> Ok, I've been reading and this is solved by the IChainingModel.
>
> But I couldn't find any default implementation of this interface.
> There are two classes currently implementing this interface,
> AbstractPropertyModel and CompoundPropertyModel.
> Both classes has some code duplicated, specifically:
> - void detach()
> - IModel getChainedModel()
> - void setChainedModel(IModel model)
> - some lines of void setObject(Object object)
> - the code in CompuntPropertyModel#getObject() and
> AbstarctPropertyModel#getTarget() is different, but the logic is the same.
>
> And I'm afraid my code will be the same as those classes.
>
> So, finally, my point.
> Is there any default implementation of this behavior? Is there a chance to
> add a super-class with this code?
>
> Thanks!
> Juan Arias
>


Default implementation of IChainingModel

2009-04-08 Thread Juan G. Arias
Hi all,First of all, I'm using wicket 1.3.5

I'm writing a model and ai need it to be "chaineable". I mean, I need this
model to contain another model, so my model can obtain the data, for
example, from a property model.
Ok, I've been reading and this is solved by the IChainingModel.

But I couldn't find any default implementation of this interface.
There are two classes currently implementing this interface,
AbstractPropertyModel and CompoundPropertyModel.
Both classes has some code duplicated, specifically:
- void detach()
- IModel getChainedModel()
- void setChainedModel(IModel model)
- some lines of void setObject(Object object)
- the code in CompuntPropertyModel#getObject() and
AbstarctPropertyModel#getTarget() is different, but the logic is the same.

And I'm afraid my code will be the same as those classes.

So, finally, my point.
Is there any default implementation of this behavior? Is there a chance to
add a super-class with this code?

Thanks!
Juan Arias


Re: Update DropDownChoice

2009-04-08 Thread Dariusz Wojtas
Try to update the ddc model, then call:
   ddc.modelChanged();
before rendering.

Regards,

Dariusz Wojtas

On Wed, Apr 8, 2009 at 8:36 AM, Peter Diefenthaeler  wrote:
>
> Hallo,
> I'm trying to update a DropDownChoice from a Ajax Callback. The new value
> is correctly added to the choice of selectable values, but I can't set the
> new added value as the selected value, only new choice is shown ...
> Any ideas are welcome.
> Thanks, Peter

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



wicket, slf4j and logback

2009-04-08 Thread Marc Ende
Hi,

I've changed from logging using log4j to logback but there is a little
drawback I haven't figured out in this combination.

I've got this logback.xml:

  
${jboss.server.log.dir}/wz.log

  
  %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} -
%msg%n

  
  
  
  

  


Everything works great. After changing the Pattern the layout also
changes. But whenever I call a site I got the whole debug even if I've
changed the logger for "org" or "org.apache.wicket" to INFO.
These settings are okay as long as the thread is "ScannerThread" (might
be something of jboss). If it's a thread in the normal usage the
patterns are applied correctly but the loggers are ignored completely.

I've used logback in another web project where it's doing it's job.

Does anybody has also this combination?

Thanks for your help!!!

marc



signature.asc
Description: OpenPGP digital signature


Re: GWT vs. Wicket?

2009-04-08 Thread Brill Pappin
Getting to to do something specific is not usually my problem with GWT  
(its component model feels just like Wickets does)... the biggest  
problem I have is having less control over the html, which makes  
things a bit harder to deal with (Googles ui style now is partly the  
result of how you work with GWT).


GWT itself is pretty extensible, but I found that ExtJS was just the  
opposite... although it has gotten better in ExtGwt.


Anyway, I actually like them both :) and keep both in my toolkit...  
only wish they could play better together.


BTW - your article mentioned not being able to see the HTML... the  
developer tools plugin for Firefox has a "View Generated Source"  
command, which makes things a lot easier when your debugging GWT html  
(I've even used it on Wicket for that matter).


- Brill Pappin


On 8-Apr-09, at 12:32 PM, Peter Thomas wrote:

I thought Matt Raible had some success with getting GWT to play nice  
with

Maven:

http://raibledesigns.com/rd/entry/modularizing_gwt_applications_with_gwt

Personally I would choose GWT only when I want to keep server calls  
to a
bare minimum.  "Ready made" components and all may look enticing,  
but in my
experience you always fall into the trap where they do *almost* what  
you

want but not *exactly* (just like JSF).

In theory nothing stops somone from writing components as "rich  
looking" as

ExtJS.  I think Matej's "inmethod grid" is a good example.

P.S. people say my article is "one sided" but no-one can explain  
*why ;) -

ok, ok this has been discussed to death in the comments there ...

On Wed, Apr 8, 2009 at 10:00 AM, Brill Pappin  wrote:


Yah, its a pitty, but the Google guys are pretty down on Maven.

I once asked them to look into making it more maven friendly, and got
throughly blasted.
if I remember correctly the comment from one of the GWT developers  
was
something along the lines of "we don't want to waste our time with  
garbage

like maven".
I didn't bother to argue about it, because if you know maven and  
like it,
you know why its advantageous, and if your that set against it it  
won't

matter what others say.

However there are a few maven plugins for it, and combined with the  
war
overlay feature, it not to hard to get it all working and integrate  
with

other projects.

- Brill Pappin


On 8-Apr-09, at 10:46 AM, Casper Bang wrote:

Peter Thomas did a great side by side you should checkout:




Good article, if perhaps a bit one-sided. I can understand how
separation-of-concerns/composability comes slightly more natural to
Wicket.
However the performance, flexibility and component repertoire of  
GWT along
with steadily more capable browsers leaves me with a feeling that  
"I'll

get
more bang for my buck".

Until GWT has a build system that is better I'll stay away from it.


Since version 1.6 today, it uses normal Ant scripts (which I  
suppose is

easy
to mavenize).

Thanks guys,

/Casper




-
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



Scriptaculous and ListView

2009-04-08 Thread Curtis Cooley
I'm having a hard time find an example on how to add scriptaculous
effects to a list view. Here is what I've tried:

tableContainer.add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(5)) {
@Override
protected void onPostProcessTarget(AjaxRequestTarget target) {
target.appendJavascript(new
Effect.Highlight(tableContainer).toJavascript());
}
});

When I try to add to the header with:

public void renderHead(IHeaderResponse response) {
   
response.renderJavascriptReference(PrototypeResourceReference.INSTANCE);
}

Eclipse won't compile the file because it can't find
PrototypeResourceReference and I can't seem to find the download for
wicketstuff-prototype

Any examples on getting a list view to update and use scriptaculous effects?



Confidential/Privileged information may be contained in this email. If you are 
not the intended recipient, please do not copy, distribute or use it for any 
purpose, nor disclose its contents to any other person. Please notify the 
sender immediately if you receive this in error.


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

Re: id attribute of Component Tag in renderHead?

2009-04-08 Thread Craig Tataryn

On 8-Apr-09, at 10:31 AM, Igor Vaynberg wrote:


we do not support getting the id from markup. this is because based on
where your code is it is not always possible - eg you may need it
before the markup for that component has been loaded or parsed, and we
may not always know what the markup will be to do a just in time
markup load. this is why we recommend setting the id from code if you
need a fixed one.



Alright, so what you are saying is when renderHead is processed for my  
component it's not necessarily the case that the markup for component  
has been loaded/parsed?  This is definitely something I need to know  
for sure... for now I guess I can see if it's possible to move my code  
instead into the component's own onload().


Craig.


-igor

On Tue, Apr 7, 2009 at 5:34 PM, Craig Tataryn   
wrote:
Within a component's renderHead method is it possible to get the  
value of

the id attribute for the component tag?

For instance, I have:



And within renderHead if I use getMarkupId() I get "multi1" back,  
if I use

getMarkupId(false) I get null.

The JavaDoc for renderHead indicates:
"either the id attribute set explicitly via a call to  
setMarkupId(String),
id attribute defined in the markup, or an automatically generated  
id - in

that order"

It doesn't seem to be behaving as described.  Is this a bug?  Or am I
misinterpreting things?

Thanks,

Craig.

--
Craig Tataryn
site: http://www.basementcoders.com/
podcast:http://feeds.feedburner.com/TheBasementCoders
irc: ThaDon on freenode #basementcoders, ##wicket
twitter: craiger






-
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: retrieve value at mouse click in palette

2009-04-08 Thread yxd0018

This doesn't work. super.newChoiceComponent() cannot have impl. 
I tried this:

 this.palette = new Palette( "palette", new
CompoundPropertyModel( (Serializable)selectedChoice )
, new CompoundPropertyModel( (Serializable)choiceList ),
renderer, 10, false ) {
@Override
protected Component newChoicesComponent() {
Component choices = new Choices("choices",
this){
private static final long serialVersionUID = 1L;
   @Override
protected void onComponentTag( ComponentTag tag ) {
super.onComponentTag( tag );
tag.getAttributes().remove("ondblclick");

CharSequence url = urlFor(
IOnChangeListener.INTERFACE);
// NOTE: do not encode the url as that would
give invalid JavaScript
tag.put("onchange", "window.location.href='" +
url + "&" + getPath()
 + "=' +
this.options[this.selectedIndex].value;");
}
//@Override
//protected Map
getAdditionalAttributes(Object choice)
//{
//return
super.this.getAdditionalAttributesForChoices(choice);
//}
};

choices.add( new AjaxEventBehavior( "onclick" ) {
@Override
protected void onEvent( AjaxRequestTarget target ) {
System.out.println("onclick");
}

} );

return choices;
}

But get an error, 

WicketMessage: Method onSelectionChanged of interface
org.apache.wicket.markup.html.form.IOnChangeListener targeted at component
[MarkupContainer [Component id = choices]] threw an exception

Root cause:

java.lang.IllegalArgumentException: object is not an instance of declaring
class
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:182)
at
org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1236)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1315)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1414)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:542)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:289)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:829)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)


igor.vaynberg wrote:
> 
> component choices=super.newchoicescomponent() {
>   oncomponenttag(tag) {
>   super.oncomponenttag(tag);
>   tag.getattributes().remove("ondblclick");
>   }
> }
> 
> -igor
> 
> On Tue, Apr 7, 2009 at 3:10 PM, yxd0018  wrote:
>>
>> Also, how could I disable default double click action in palette?
>>
>>
>> Thanks for your code. Appreciate a little more help. How do I get the
>> highlighted object from palette? I have this
>> List choiceList = getAllScenarios();
>> List selectedChoice =
>> scenarioService.getScenarioByReportId( );
>>  this.palette = new Palette( "palette", new Model(
>> (Serializable)selectedChoice )
>>                , new Model( (Serializable)choiceList ), renderer, 10,
>> false
>> ) ;
>> In Method onEvent(), however getParent().getDefaultModelObject() throw
>> exception.
>>
>>
>> igor.vaynberg wrote:
>>>
>>> add

Re: Re: GWT vs. Wicket?

2009-04-08 Thread nick
Thank you for your mail. I am presently on vacation and will return April 14th. 
 

If you need urgent assistance, please email supp...@bookingbooster.com. You can 
also reach our Support via Skype callto://premiersupport

Thank you

Best regards,

Nick Wheeler

Booking Booster.com 
t: +44 (0)1273 573851 
e: integrat...@bookingbooster.com 

a: The Brighton Forum 
95 Ditchling Road 
Brighton BN1 4ST 
East Sussex 
United Kingdom
Booking Booster is the smarter, easier and more elegant way to update agent 
websites. Save time, Boost Bookings with: http://www.bookingbooster.com





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



Re: GWT vs. Wicket?

2009-04-08 Thread Casper Bang
> P.S. people say my article is "one sided" but no-one can explain *why ;) -
> ok, ok this has been discussed to death in the comments there ...
>


I should mention I love wicket (coming from JSF) but has only limited
exposure to it while having no experience at all with  GWT. However while
reading, I did pick up a slight bias towards Wicket in the article, perhaps
unintentional on your part but not really unexpected since you obviously do
hang out here on the WIcket group.

I guess the feeling comes from the fact that the pro/con comparisons don't
seem quite balanced. I.e. there's no mentioning of the scalability &
adressability problem of holding state on the server, the managability
problem in needing a java file for each html file (and keeping these in
sync), nor the inherent bennefits of having a specialized compiler validate,
optimize and strip data that's really primarily meant for the browser
anyway. I did enjoy the article though, thanks for writing it. :)

/Casper


Re: GWT vs. Wicket?

2009-04-08 Thread Peter Thomas
I thought Matt Raible had some success with getting GWT to play nice with
Maven:

http://raibledesigns.com/rd/entry/modularizing_gwt_applications_with_gwt

Personally I would choose GWT only when I want to keep server calls to a
bare minimum.  "Ready made" components and all may look enticing, but in my
experience you always fall into the trap where they do *almost* what you
want but not *exactly* (just like JSF).

In theory nothing stops somone from writing components as "rich looking" as
ExtJS.  I think Matej's "inmethod grid" is a good example.

P.S. people say my article is "one sided" but no-one can explain *why ;) -
ok, ok this has been discussed to death in the comments there ...

On Wed, Apr 8, 2009 at 10:00 AM, Brill Pappin  wrote:

> Yah, its a pitty, but the Google guys are pretty down on Maven.
>
> I once asked them to look into making it more maven friendly, and got
> throughly blasted.
> if I remember correctly the comment from one of the GWT developers was
> something along the lines of "we don't want to waste our time with garbage
> like maven".
> I didn't bother to argue about it, because if you know maven and like it,
> you know why its advantageous, and if your that set against it it won't
> matter what others say.
>
> However there are a few maven plugins for it, and combined with the war
> overlay feature, it not to hard to get it all working and integrate with
> other projects.
>
> - Brill Pappin
>
>
> On 8-Apr-09, at 10:46 AM, Casper Bang wrote:
>
>  Peter Thomas did a great side by side you should checkout:
>>>
>>
>> Good article, if perhaps a bit one-sided. I can understand how
>> separation-of-concerns/composability comes slightly more natural to
>> Wicket.
>> However the performance, flexibility and component repertoire of GWT along
>> with steadily more capable browsers leaves me with a feeling that "I'll
>> get
>> more bang for my buck".
>>
>>  Until GWT has a build system that is better I'll stay away from it.
>>>
>> Since version 1.6 today, it uses normal Ant scripts (which I suppose is
>> easy
>> to mavenize).
>>
>> Thanks guys,
>>
>> /Casper
>>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: GWT vs. Wicket?

2009-04-08 Thread Brill Pappin

Yah, its a pitty, but the Google guys are pretty down on Maven.

I once asked them to look into making it more maven friendly, and got  
throughly blasted.
if I remember correctly the comment from one of the GWT developers was  
something along the lines of "we don't want to waste our time with  
garbage like maven".
I didn't bother to argue about it, because if you know maven and like  
it, you know why its advantageous, and if your that set against it it  
won't matter what others say.


However there are a few maven plugins for it, and combined with the  
war overlay feature, it not to hard to get it all working and  
integrate with other projects.


- Brill Pappin

On 8-Apr-09, at 10:46 AM, Casper Bang wrote:


Peter Thomas did a great side by side you should checkout:


Good article, if perhaps a bit one-sided. I can understand how
separation-of-concerns/composability comes slightly more natural to  
Wicket.
However the performance, flexibility and component repertoire of GWT  
along
with steadily more capable browsers leaves me with a feeling that  
"I'll get

more bang for my buck".


Until GWT has a build system that is better I'll stay away from it.
Since version 1.6 today, it uses normal Ant scripts (which I suppose  
is easy

to mavenize).

Thanks guys,

/Casper



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



Re: GWT vs. Wicket?

2009-04-08 Thread Brill Pappin

I've used both extensively now.
I think the comparison is an apples <-> oranges thing however.

GWT does not really play well with other frameworks because of its  
generated code, but if your doing a mostly client side/ajaxy   
application, nothing beats it for performance and maintainability.


However I love Wicket for its simple separation of UI/Control/Data it  
makes it easier to develop an application rapidly, particularly if you  
have to pass the UI development to another person (very difficult to  
do in GWT unless that the design guy is comfortable compiling code,  
which most are not).


I have attempted to integrate the two with some success, although in  
what I was doing, once GWT was loaded and running, wicket had very  
little do do any more (mostly page security and file upload tasks). I  
have some idea on how you could use them together making client side  
components in GWT that could be used in Wicket, but I have not had the  
time to actually sit down and experiment.


The short version of the idea is that GWT has the ability to bind to  
arbitrary elements in the page its sitting on, and you can pass data  
back and forth... so my idea is to make your interactive components in  
GWT, compile them, and write a wicket component that could make sure  
all the GWT setup was done.
This would allow you to do client-side interactive components. doing  
ajax calls with it would be more problematic, but still possible as  
GWT does support other forms of remote calls than its built in protocol.


If such an integration is possible and works cleanly, it will be far  
superior to YUI, but the components would be static (they have a  
specific function and thats it, similar to YUI). Forget about  
dynamically building GWT components within wicket. although I think it  
might be possible, I think it would be pretty hacky and not worth your  
time.


- Brill Pappin

On 8-Apr-09, at 9:11 AM, Casper Bang wrote:

I was just wondering about the Wicket community's opinion of GWT. It  
seems
to share many of the positive characteristics as Wicket (focus on  
code, not

markup) with the major difference/benefit as I see, that is does not
maintain any state on the server. Also, with GWT you seem to get more
readily available components (i.e. http://extjs.com/explorer/). The  
bennefit
of Wicket as I can see, is that applications potentially degrade  
nicer and

the programming model hides the Ajax RPC better. Any thoughts?

/Casper



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



Re: Update DropDownChoice

2009-04-08 Thread Roman Zechner

what does the final html of the DDC look like after updating?

Peter Diefenthaeler wrote:

Hallo,
I'm trying to update a DropDownChoice from a Ajax Callback. The new value
is correctly added to the choice of selectable values, but I can't set the
new added value as the selected value, only new choice is shown ...
Any ideas are welcome.
Thanks, Peter


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

  


--
Liland ...does IT better

Liland IT GmbH
Creative Master
email: roman.zech...@liland.at

office: +43 (0)463 220-111  | fax: +43 (0)463 220-288 http://www.Liland.at 



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



Re: AjaxFallbackLink and Component visibility

2009-04-08 Thread Igor Vaynberg
for components that start out as invisible you should call
setoutputmarkupplaceholdertag(true), in your case you need to call it
on the label after you construct it.

there are explanations on why you need to do this in the list archives.

-igor

On Wed, Apr 8, 2009 at 7:40 AM, Sergiu Sapojnic  wrote:
> Hi to all!
> I am new to Wicket and am beginning to love it.
> I have the following question:
> --
> There's the following markup:
>
> 
>            This Ajax link has
> been clicked [123] times.
>            [VISIBLE ONLY WHEN LINK WAS CLICKED AT
> LEAST ONCE]
> 
> --
> and the following corresponding Java code:
>
> public class HelloPage extends WebPage {
>
>    int counter;
>    Label ghostLabel;
>    Label clickLabel;
>
>    public HelloPage() {
>
>        add(new AjaxFallbackLink("clickAjaxLink") {
>           �...@override
>            public void onClick(AjaxRequestTarget target) {
>                counter++;
>                if(target != null) {
>                    target.addComponent(clickLabel);
>                    target.addComponent(ghostLabel);
>                }
>            }
>        });
>
>        // clickLabel displays how many times the link was clicked
>        clickLabel = new Label("clickAjaxLabel", new PropertyModel(this,
> counter));
>        clickLabel.setOutputMarkupId(true);
>        add(clickLabel);
>
>       // ghostLabel should be visible only when the link was clicked at
> least once
>       ghostLabel = new Label("ghost", "I should be visible only when the
> link was clicked at least once") {
>           @Override
>           public boolean isVisible() {
>               return counter > 0;
>           }
>       };
>      add(ghostLabel);
>    }
>
> }
> ---
>
> clickLabel works properly and displays the value of counter. But my aim with
> ghostLabel is that it is visible only when the AjaxFallbackLink was clicked
> at least once. I added it to the request target so that it should be
> updated. However, it remains invisible. How can I solve this problem?
>
> Thanks in advance!
>

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



Re: Using eclipse-salve plugin

2009-04-08 Thread Igor Vaynberg
you should check out the sources for 1.0 release, import them into
eclipse, and build the plugin yourself. i have seen cases where a
plugin i built on a windows machine does not work on linux or mac. go
figure.

building it is easy, check out the source, import eclipse projects,
file->export->deployable plugins and fragments->check all 3 salve
plugins and click export. then copy them from the folder they were
exported to into your eclipse/plugins

when you start eclipse you should right click a project and select
"add salve nature", thats it. it will instrument files whenever they
are changed.

-igor

On Wed, Apr 8, 2009 at 7:32 AM, Thiago Senna  wrote:
> Hi,
>
> I put salve to work with maven (with salve-maven2 plugin) and using jvm
> arguments as suggested in the salve homepage (with
> -javaagent:) successfully, but unfortunatelly I couldn't
> put the salve-eclipse plugin to work on eclipse ganymede-jee. I don't know
> if the plugin was really installed successfully or if I'm doing something
> wrong.
>
> I installed eclipse-salve plugin from
> http://salve.googlecode.com/svn/trunk/salve-eclipse-update-site/. Did
> somebody put eclipse-salve plugin to work? What can I do to know if the
> plugin was really installed succesfully (i didn't find any wizard on my
> eclipse). After the plugin is installed successfully Do I need to do
> something else?
>
> I'm from Brasil, so, excuse-me for my bad english... rsrs
>
> Thanks,
> Thiago Senna
>

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



Re: 2 DropDownChoices with a renderer. ajax update

2009-04-08 Thread Sasha Newbie

Dear Arthur,

I had to do the same thing but I did not use a ChoiceRenderer or anything. I
have three DropDownChoice and each one needs to be updated according to the
option selected in the previous DropDown.
I had the same problem and I solved it adding a setChoices(List) to the
DropDown. I had forgotten to do that, and of course, when the page was
rendered, my DropDown always looked the same way.
I don't know whether this was your original doubt, but I spent a lot of time
trying to figure this out... I hope this might have helped you!
Best regards,

Sasha (newbie)



Arthur Leigh Allen wrote:
> 
> Hello people,
> 
> thanks for helping the newbies in wicket.
> 
> I got one more question:
> -I use two drop down choices
> -The first one includes all countries, the second one the related states
> -If the first country choice changed, the second one should be updated via
> ajax
> -In both choices i use a choice renderer which implements IChoiceRenderer
> -When the country choice was selected, the related states are retrieved
> from the database and set in the state renderer
> -Then the state choice is added to the target object in on change event
> -In my browser I can see that the state drop down choice was redrawed but
> the retrieved states are not send to the browser (proved in wicket ajax
> debug)
> 
> I tried a lot of things but nothing could solve my problem.
> Does someone have an advice for me???
> 
> The states are definetly retrieved correctly from the database.
> In wicket examples I saw that PropertyModel is used and the getObject
> method is overridden.
> I'm using a ChoiceRenderer because I need a key and a value.
> The DropDownChoices are working correctly. The only problem is that they
> are not redrawed correctly.
> 
> Note: The initial status is that the country renderer is filled with about
> 150 countries. The state renderer is empty. The states should be filled
> when a country was selected. I tested the state choice by initializing it
> with the states for Germany. The states were shown correctly. Then when I
> select a different country with no states available, the state choice will
> be emptied (but the place of the already showed states is reserved as a
> white rectangle). When I select Germany again the states are shown again
> correctly. But when the initial status of state choice is empty, nothing
> happend when switching between different countries.
> 
> It seems to me like wicket is not updating the view correctly. Do I have
> to send an refresh or update signal to the state choice or something
> similar?
> 
> Thanks in advance
> Leigh
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/2-DropDownChoices-with-a-renderer.-ajax-update-tp21820789p22953022.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: id attribute of Component Tag in renderHead?

2009-04-08 Thread Igor Vaynberg
we do not support getting the id from markup. this is because based on
where your code is it is not always possible - eg you may need it
before the markup for that component has been loaded or parsed, and we
may not always know what the markup will be to do a just in time
markup load. this is why we recommend setting the id from code if you
need a fixed one.

-igor

On Tue, Apr 7, 2009 at 5:34 PM, Craig Tataryn  wrote:
> Within a component's renderHead method is it possible to get the value of
> the id attribute for the component tag?
>
> For instance, I have:
>
> 
>
> And within renderHead if I use getMarkupId() I get "multi1" back, if I use
> getMarkupId(false) I get null.
>
> The JavaDoc for renderHead indicates:
> "either the id attribute set explicitly via a call to setMarkupId(String),
> id attribute defined in the markup, or an automatically generated id - in
> that order"
>
> It doesn't seem to be behaving as described.  Is this a bug?  Or am I
> misinterpreting things?
>
> Thanks,
>
> Craig.
>
> --
> Craig Tataryn
> site: http://www.basementcoders.com/
> podcast:http://feeds.feedburner.com/TheBasementCoders
> irc: ThaDon on freenode #basementcoders, ##wicket
> twitter: craiger
>
>
>
>
>
>
> -
> 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: GWT vs. Wicket?

2009-04-08 Thread Azzeddine Daddah
Hi,

You may also take a look at ZK framework. It's also a kind of framework
which can be used to build beautiful RIA's. You can chose to use it by
writing your app in just Java or in Java/Zul.
http://www.zkoss.org

But in my opinion, Wicket stills beter then these kind of frameworks :)

Regards,

Azzeddine Daddah
www.hbiloo.com


On Wed, Apr 8, 2009 at 4:46 PM, Casper Bang  wrote:

> > Peter Thomas did a great side by side you should checkout:
>
> Good article, if perhaps a bit one-sided. I can understand how
> separation-of-concerns/composability comes slightly more natural to Wicket.
> However the performance, flexibility and component repertoire of GWT along
> with steadily more capable browsers leaves me with a feeling that "I'll get
> more bang for my buck".
>
> > Until GWT has a build system that is better I'll stay away from it.
> Since version 1.6 today, it uses normal Ant scripts (which I suppose is
> easy
> to mavenize).
>
> Thanks guys,
>
> /Casper
>


Re: GWT vs. Wicket?

2009-04-08 Thread Casper Bang
> Peter Thomas did a great side by side you should checkout:

Good article, if perhaps a bit one-sided. I can understand how
separation-of-concerns/composability comes slightly more natural to Wicket.
However the performance, flexibility and component repertoire of GWT along
with steadily more capable browsers leaves me with a feeling that "I'll get
more bang for my buck".

> Until GWT has a build system that is better I'll stay away from it.
Since version 1.6 today, it uses normal Ant scripts (which I suppose is easy
to mavenize).

Thanks guys,

/Casper


Question (Tab Panel, Workspace, Plugins)

2009-04-08 Thread Tomáš Mihok
Hello,

I would like to ask various questions and I will try to explain it as
good as possible. First of off I'm creating a modular application and
add functionality via plugins.

This is how it should look like:

|---|
|   |
|---|
|   TAB PANEL   |
|---|
|  LINK PANEL   |
|---|
|   |
|IFRAME |
|   |
|   |
|---|

So question here (might be noobish - I'm sorry but I don't want to edit
whole project after every new discovery):

I would like to put IFRAME and LINK PANEL (which is ordinary panel) into
one class WorkSpace.java. If new plugin is added - new TAB is created.

Is it possible to display different WorkSpace in different tab or should
I redesign it? 

The idea is to create LINK PANEL & IFRAME in Workspace constructor and
display it under the tab.

Would it be possible to include LINK PANEL and IFRAME in one panel and
make this a reusable component?

I'm sorry if my principles I wrong, I'm Wicket noob but I love it.

Thank you!





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



AjaxLazyLoad using

2009-04-08 Thread Vladimir Zavada

Hi,
I am doing som queries on database through ajaxFallBackLink and it may 
take some time. Due this time I need some component or modal window or 
some loading image to show that site is alive and it is working?


thx

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



AjaxFallbackLink and Component visibility

2009-04-08 Thread Sergiu Sapojnic
Hi to all!
I am new to Wicket and am beginning to love it.
I have the following question:
--
There's the following markup:


This Ajax link has
been clicked [123] times.
[VISIBLE ONLY WHEN LINK WAS CLICKED AT
LEAST ONCE]

--
and the following corresponding Java code:

public class HelloPage extends WebPage {

int counter;
Label ghostLabel;
Label clickLabel;

public HelloPage() {

add(new AjaxFallbackLink("clickAjaxLink") {
@Override
public void onClick(AjaxRequestTarget target) {
counter++;
if(target != null) {
target.addComponent(clickLabel);
target.addComponent(ghostLabel);
}
}
});

// clickLabel displays how many times the link was clicked
clickLabel = new Label("clickAjaxLabel", new PropertyModel(this,
counter));
clickLabel.setOutputMarkupId(true);
add(clickLabel);

   // ghostLabel should be visible only when the link was clicked at
least once
   ghostLabel = new Label("ghost", "I should be visible only when the
link was clicked at least once") {
   @Override
   public boolean isVisible() {
   return counter > 0;
   }
   };
  add(ghostLabel);
}

}
---

clickLabel works properly and displays the value of counter. But my aim with
ghostLabel is that it is visible only when the AjaxFallbackLink was clicked
at least once. I added it to the request target so that it should be
updated. However, it remains invisible. How can I solve this problem?

Thanks in advance!


Using eclipse-salve plugin

2009-04-08 Thread Thiago Senna
Hi,

I put salve to work with maven (with salve-maven2 plugin) and using jvm
arguments as suggested in the salve homepage (with
-javaagent:) successfully, but unfortunatelly I couldn't
put the salve-eclipse plugin to work on eclipse ganymede-jee. I don't know
if the plugin was really installed successfully or if I'm doing something
wrong.

I installed eclipse-salve plugin from
http://salve.googlecode.com/svn/trunk/salve-eclipse-update-site/. Did
somebody put eclipse-salve plugin to work? What can I do to know if the
plugin was really installed succesfully (i didn't find any wizard on my
eclipse). After the plugin is installed successfully Do I need to do
something else?

I'm from Brasil, so, excuse-me for my bad english... rsrs

Thanks,
Thiago Senna


Re: GWT vs. Wicket?

2009-04-08 Thread Ben Tilford
Working with GWT is kind of a nightmare. You have to write custom build
scripts for any library / module you use so that the sources are included in
the jar and available to the GWT compiler. Until GWT has a build system that
is better I'll stay away from it. Really a shame because the programming
model used is nice.

On Wed, Apr 8, 2009 at 9:17 AM, Craig Tataryn  wrote:

> Peter Thomas did a great side by side you should checkout:
>
> http://ptrthomas.wordpress.com/2008/09/04/wicket-and-gwt-compared-with-code/
>
> Craig.
>
>
> On 8-Apr-09, at 8:11 AM, Casper Bang wrote:
>
>  I was just wondering about the Wicket community's opinion of GWT. It seems
>> to share many of the positive characteristics as Wicket (focus on code,
>> not
>> markup) with the major difference/benefit as I see, that is does not
>> maintain any state on the server. Also, with GWT you seem to get more
>> readily available components (i.e. http://extjs.com/explorer/). The
>> bennefit
>> of Wicket as I can see, is that applications potentially degrade nicer and
>> the programming model hides the Ajax RPC better. Any thoughts?
>>
>> /Casper
>>
>
>


setOutputMarkupPlaceholderTag(true) not working on modal window

2009-04-08 Thread Warren Bell
I have a button on a modal window. The button starts with isVisible set
to false. I get the following ajax error when I set it to true:
 
ERROR: Component with id [[okButton]] a was not found while trying to
perform markup update. Make sure you called
component.setOutputMarkupId(true) on the component whose markup you are
trying to update.
 
I am calling Component#setOutputMarkupId(true),
Component#setMarkupId(String id) and
Component#setOutputMarkupPlaceholderTag(true).
 
What do I need to do to make this work?
 
Thanks,
 
Warren


Re: id attribute of Component Tag in renderHead?

2009-04-08 Thread Martin Funk
look around in the area of HeaderContributor and how it is used in  
JavascriptPackageResource.getHeaderContributor


and keep in mind, when implementing the method renderHead of class  
HeaderContributor, that IHeaderResponse contains a  
method .renderOnDomReadyJavascript(


mf
Am 08.04.2009 um 15:13 schrieb Craig Tataryn:


On 8-Apr-09, at 3:27 AM, Martijn Dashorst wrote:

On Wed, Apr 8, 2009 at 4:04 AM, Craig Tataryn   
wrote:

but the JavaDoc tells me not to use this
method as it's supposed to be used by Wicket internally only.  And  
they use

capital letters too when telling me this.


That is because a kitten gets killed every time you call such  
methods. ;-)


You can call such methods, but you should be aware that we reserve  
the

right to remove those methods in a new version, or change the
behavior. These methods often also do things inside of Wicket
internals that might hinder proper request processing (you might call
a method before it is supposed to be called, causing ill effects such
as doing expensive things twice or throw NPE's, or a long time after
it is supposed to be called and leave a mess).

If you need that method, you can call it, but you're on your own :)



Thanks Martijn, is there another way one might be able to get the  
Markup Component in renderHead?  The one you get from the incoming  
container is of course the  tag.


The scenario I'm using this for must be a common one, I'm using  
response.renderOnDomReadyJavascript(someJs) within renderHead() and  
the code within someJs contains some javascript that has  
document.getElementById(mycomponentId).


Craig.


Martijn

-
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: DropDownChoice custom key problem

2009-04-08 Thread Vladimir Zavada
Great, thank you very much it works perfectly. I did not know that 
object returned by the model and the type of objects in the list *must* 
be the same.



Serkan Camurcuoglu  wrote / napísal(a):
why does it say java.lang.String instead of DaysSelectOption? On 
http://cwiki.apache.org/WICKET/dropdownchoice-examples.html it says:


"You give a DDC a model and a list of possible values. The type of 
object returned by the model and the type of objects in the list 
*must* be the same. If your model returns an Integer, so you *must* 
pass a list of Integers, not IntegerSelectChoice or anything else.


If you want to display something different than the integer, you have 
to implement some custom code in ChoiceRenderer.getDisplayValue(). 
Don't get hung up on the idea that the value returned has to be a 
property of
the objects in your list. It can be anything, such as the 
getString("period_" + object.toString()), for example."




Vladimir Zavada wrote:

I have changed it to public and still the same error.

James Carman  wrote / napísal(a):

The class is private.

2009/4/8 Vladimir Zavada :
 

Hi,
I have a problem with DropDownChoice. I am using DropDownChoice with
ChoiceRenderer and I am getting this error:

No get method defined for class: class java.lang.String expression: 
key



Here is a code:

  DaysSelectOption[] options = new DaysSelectOption[] {new
DaysSelectOption("&", "AND"), new DaysSelectOption("|", "OR")};
  ChoiceRenderer choiceRenderer = new ChoiceRenderer("value", 
"key");
  showVal.add(new DropDownChoice("day_val", new 
PropertyModel(this,

"items"), Arrays.asList(options), choiceRenderer));

where class DaysSelectOption is:
private class DaysSelectOption
  {
  private String key;

  public String getKey()
  {
  return key;
  }

  public void setKey(String key)
  {
  this.key = key;
  }

  public String getValue()
  {
  return value;
  }

  public void setValue(String value)
  {
  this.value = value;
  }
  private String value;
  public DaysSelectOption(String key, String value)
  {
  this.key = key;
  this.value = value;
  }

thx for asnwers



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





he class is private.

-
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: DropDownChoice custom key problem

2009-04-08 Thread Serkan Camurcuoglu
why does it say java.lang.String instead of DaysSelectOption? On 
http://cwiki.apache.org/WICKET/dropdownchoice-examples.html it says:


"You give a DDC a model and a list of possible values. The type of 
object returned by the model and the type of objects in the list *must* 
be the same. If your model returns an Integer, so you *must* pass a list 
of Integers, not IntegerSelectChoice or anything else.


If you want to display something different than the integer, you have to 
implement some custom code in ChoiceRenderer.getDisplayValue(). Don't 
get hung up on the idea that the value returned has to be a property of
the objects in your list. It can be anything, such as the 
getString("period_" + object.toString()), for example."




Vladimir Zavada wrote:

I have changed it to public and still the same error.

James Carman  wrote / napísal(a):

The class is private.

2009/4/8 Vladimir Zavada :
 

Hi,
I have a problem with DropDownChoice. I am using DropDownChoice with
ChoiceRenderer and I am getting this error:

No get method defined for class: class java.lang.String expression: key


Here is a code:

  DaysSelectOption[] options = new DaysSelectOption[] {new
DaysSelectOption("&", "AND"), new DaysSelectOption("|", "OR")};
  ChoiceRenderer choiceRenderer = new ChoiceRenderer("value", 
"key");

  showVal.add(new DropDownChoice("day_val", new PropertyModel(this,
"items"), Arrays.asList(options), choiceRenderer));

where class DaysSelectOption is:
private class DaysSelectOption
  {
  private String key;

  public String getKey()
  {
  return key;
  }

  public void setKey(String key)
  {
  this.key = key;
  }

  public String getValue()
  {
  return value;
  }

  public void setValue(String value)
  {
  this.value = value;
  }
  private String value;
  public DaysSelectOption(String key, String value)
  {
  this.key = key;
  this.value = value;
  }

thx for asnwers



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





he class is private.

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


  







Re: DropDownChoice custom key problem

2009-04-08 Thread Vladimir Zavada

I have changed it to public and still the same error.

James Carman  wrote / napísal(a):

The class is private.

2009/4/8 Vladimir Zavada :
  

Hi,
I have a problem with DropDownChoice. I am using DropDownChoice with
ChoiceRenderer and I am getting this error:

No get method defined for class: class java.lang.String expression: key


Here is a code:

  DaysSelectOption[] options = new DaysSelectOption[] {new
DaysSelectOption("&", "AND"), new DaysSelectOption("|", "OR")};
  ChoiceRenderer choiceRenderer = new ChoiceRenderer("value", "key");
  showVal.add(new DropDownChoice("day_val", new PropertyModel(this,
"items"), Arrays.asList(options), choiceRenderer));

where class DaysSelectOption is:
private class DaysSelectOption
  {
  private String key;

  public String getKey()
  {
  return key;
  }

  public void setKey(String key)
  {
  this.key = key;
  }

  public String getValue()
  {
  return value;
  }

  public void setValue(String value)
  {
  this.value = value;
  }
  private String value;
  public DaysSelectOption(String key, String value)
  {
  this.key = key;
  this.value = value;
  }

thx for asnwers



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





he class is private.

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


  




Re: GWT vs. Wicket?

2009-04-08 Thread Craig Tataryn

Peter Thomas did a great side by side you should checkout:
http://ptrthomas.wordpress.com/2008/09/04/wicket-and-gwt-compared-with-code/

Craig.

On 8-Apr-09, at 8:11 AM, Casper Bang wrote:

I was just wondering about the Wicket community's opinion of GWT. It  
seems
to share many of the positive characteristics as Wicket (focus on  
code, not

markup) with the major difference/benefit as I see, that is does not
maintain any state on the server. Also, with GWT you seem to get more
readily available components (i.e. http://extjs.com/explorer/). The  
bennefit
of Wicket as I can see, is that applications potentially degrade  
nicer and

the programming model hides the Ajax RPC better. Any thoughts?

/Casper




Re: DropDownChoice custom key problem

2009-04-08 Thread James Carman
The class is private.

2009/4/8 Vladimir Zavada :
> Hi,
> I have a problem with DropDownChoice. I am using DropDownChoice with
> ChoiceRenderer and I am getting this error:
>
> No get method defined for class: class java.lang.String expression: key
>
>
> Here is a code:
>
>       DaysSelectOption[] options = new DaysSelectOption[] {new
> DaysSelectOption("&", "AND"), new DaysSelectOption("|", "OR")};
>       ChoiceRenderer choiceRenderer = new ChoiceRenderer("value", "key");
>       showVal.add(new DropDownChoice("day_val", new PropertyModel(this,
> "items"), Arrays.asList(options), choiceRenderer));
>
> where class DaysSelectOption is:
> private class DaysSelectOption
>   {
>       private String key;
>
>       public String getKey()
>       {
>           return key;
>       }
>
>       public void setKey(String key)
>       {
>           this.key = key;
>       }
>
>       public String getValue()
>       {
>           return value;
>       }
>
>       public void setValue(String value)
>       {
>           this.value = value;
>       }
>       private String value;
>       public DaysSelectOption(String key, String value)
>       {
>           this.key = key;
>           this.value = value;
>       }
>
> thx for asnwers
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

he class is private.

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



Re: id attribute of Component Tag in renderHead?

2009-04-08 Thread Craig Tataryn

On 8-Apr-09, at 3:27 AM, Martijn Dashorst wrote:

On Wed, Apr 8, 2009 at 4:04 AM, Craig Tataryn   
wrote:

but the JavaDoc tells me not to use this
method as it's supposed to be used by Wicket internally only.  And  
they use

capital letters too when telling me this.


That is because a kitten gets killed every time you call such  
methods. ;-)


You can call such methods, but you should be aware that we reserve the
right to remove those methods in a new version, or change the
behavior. These methods often also do things inside of Wicket
internals that might hinder proper request processing (you might call
a method before it is supposed to be called, causing ill effects such
as doing expensive things twice or throw NPE's, or a long time after
it is supposed to be called and leave a mess).

If you need that method, you can call it, but you're on your own :)



Thanks Martijn, is there another way one might be able to get the  
Markup Component in renderHead?  The one you get from the incoming  
container is of course the  tag.


The scenario I'm using this for must be a common one, I'm using  
response.renderOnDomReadyJavascript(someJs) within renderHead() and  
the code within someJs contains some javascript that has  
document.getElementById(mycomponentId).


Craig.


Martijn

-
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



DropDownChoice custom key problem

2009-04-08 Thread Vladimir Zavada

Hi,
I have a problem with DropDownChoice. I am using DropDownChoice with 
ChoiceRenderer and I am getting this error:


No get method defined for class: class java.lang.String expression: key


Here is a code:

   DaysSelectOption[] options = new DaysSelectOption[] {new 
DaysSelectOption("&", "AND"), new DaysSelectOption("|", "OR")};

   ChoiceRenderer choiceRenderer = new ChoiceRenderer("value", "key");
   showVal.add(new DropDownChoice("day_val", new 
PropertyModel(this, "items"), Arrays.asList(options), choiceRenderer));


where class DaysSelectOption is:
private class DaysSelectOption
   {
   private String key;

   public String getKey()
   {
   return key;
   }

   public void setKey(String key)
   {
   this.key = key;
   }

   public String getValue()
   {
   return value;
   }

   public void setValue(String value)
   {
   this.value = value;
   }
   private String value;
   public DaysSelectOption(String key, String value)
   {
   this.key = key;
   this.value = value;
   }

thx for asnwers



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



Re: Integrating Wicket + Google Guice + Warp-persistence

2009-04-08 Thread francisco treacy
if conceptually and technically it works for you then it's fine! very
likely some day someone searching the mailing list is going to find it
useful.

francisco


2009/4/7 Eduardo Nunes :
> No comments?
>
> On Tue, Apr 7, 2009 at 10:05 AM, Eduardo Nunes  wrote:
>> Hi there,
>>
>>  After a long period of reading, now I'm starting to code my
>> application using these frameworks: Wicket, Google Guice and
>> Warp-persistence. I facet a conceptual problem (IMHO) about how
>> initialize google guice. I read a lot of source codes on the internet
>> and most of them, if not all, initialize Google Guice and
>> Warp-persistence inside the WicketApplication class (extends
>> WebApplication). I think it isn't a good thing, because in the
>> conceptual point of view google guice doesn't have direct relation to
>> wicket. So, I started to find a good solution for this problem.
>>  My solution consists in use Google Guice servlet extension. I think
>> that sometimes a source code says more than a thousand words ehehe,
>> below are the pastbin links for all envolved files. What I want from
>> you is a feedback, suggestions, improvements, critics, etc...
>>
>> Files:
>> - web.xml
>>    http://pastebin.com/f576189de
>>
>> - GuiceServletContextListener
>>    http://pastebin.com/f6a42d811
>>
>> - WebModule
>>    http://pastebin.com/f24a797b
>>
>> - ServiceModule
>>    http://pastebin.com/f6e9db66f
>>
>> - PersistenceServiceInitializer
>>    http://pastebin.com/f6e4425fd
>>
>> Maybe, and probably, some parts of the pasted source code are based on
>> another projects, blogs posts, etc.
>>
>> Thanks,
>> Eduardo S. Nunes
>>
>
> -
> 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: Runtime error with TabbedPanel and AbstractTab (I know it's my mistake somewhere)

2009-04-08 Thread Branden Tanga
Also, forgot to say thanks everyone!
Thanks,
Branden Tanga
Programmer / EHR Systems Engineer


On Wed, Apr 8, 2009 at 2:05 AM, Branden Tanga wrote:

> That was it! I guess I should get into the habit of managing maven and then
> "pushing" those changes out to eclipse with a mvn clean then a mvn eclipse.
>
>
> Thanks,
> Branden Tanga
> Programmer / EHR Systems Engineer
>
>
> On Wed, Apr 8, 2009 at 1:11 AM, Daan van Etten  wrote:
>
>> Hi,
>>
>> Maven should handle your dependencies. Have you added the wicket
>> extensions dependency to your pom.xml?
>>
>> Add this to the 'dependencies' tag of your pom.xml. The Wicket dependency
>> should already be there.
>>
>>
>>org.apache.wicket
>>wicket-extensions
>>1.3.5
>>
>>
>> Change the 'version' according to which version of Wicket you use.
>>
>> Eclipse should add Wicket extensions to your classpath when you have this
>> dependency. (maybe with a mvn clean eclipse command)
>>
>>
>> Regards,
>>
>> Daan van Etten
>>
>> Op 8 apr 2009, om 12:49 heeft Branden Tanga het volgende geschreven:
>>
>>
>>  Ok, I've been racking my brain for the past few days, and I still cannot
>>> solve this.
>>> I've even added wicket-extensions.jar to my .m2/repository and rebuilt my
>>> eclipse project with the mvn clean and mvn eclipse commands given in the
>>> wicket quickstart. When I open up my eclipse project, under m2_repo I can
>>> find my wicket-extensions.jar
>>>
>>> I still get a noclassdeffound runtime error for AbstractTab. It seems as
>>> if
>>> the classpath that eclipse uses for compiling has nothing to do with the
>>> classpath that wicket uses at runtime. How can I print my classpath from
>>> within wicket?
>>>
>>> (note: I've already added the directory that contains
>>> wicket-extensions.jar
>>> to my classpath variable in my .bash_profile, still the same runtime
>>> error).
>>>
>>> Thanks,
>>> Branden Tanga
>>> Programmer / EHR Systems Engineer
>>>
>>>
>>> On Mon, Apr 6, 2009 at 1:24 AM, mailingl...@jorgenpersson.se <
>>> mailingl...@jorgenpersson.se> wrote:
>>>
>>>  Hi.

 Seems like you're missing a jar file. The
 "java.lang.NoClassDefFoundError"
 means just what it sais. The class can not be found in the classpath.
 It has nothing to do whether the class is abstract or not.

 /Jörgen

 Branden Tanga skrev:

 Hello all,

> I'm trying to follow the examples given on wicketstuff.org for
> TabbedPanel
> here: http://tinyurl.com/cpzkas
>
> My code compiles fine, but when I run it I get a noclassdeffound error
> for
> AbstractTab. Here's my snippet of code:
>
> import org.apache.wicket.markup.html.WebPage;
>
> import org.apache.wicket.extensions.ajax.markup.html.tabs.*;
>
> import org.apache.wicket.extensions.markup.html.tabs.*;
>
> import org.apache.wicket.markup.html.panel.*;
>
> import org.apache.wicket.model.*;
>
> import java.util.*;
>
>
> public class MainMenu extends WebPage{
>
> /*Constructor*/
>
> public MainMenu() {
>
> List tabs = new ArrayList();
>
> tabs.add(new AbstractTab(new Model("first tab")) {
>
> @Override
>
> public Panel getPanel(String panelID) {
>
> return new MyPanel(panelID);
>
> }
>
> });
>
> } // end constructor
>
> and here's the corresponding runtime error:
>
> WicketMessage: Method onFormSubmitted of interface
> org.apache.wicket.markup.html.form.IFormSubmitListener targeted at
> component [MarkupContainer [Component id = loginForm]] threw an
> exception
>
> Root cause:
>
> java.lang.NoClassDefFoundError:
> org/apache/wicket/extensions/markup/html/tabs/AbstractTab
>   at java.lang.ClassLoader.defineClass1(Native Method)
>   at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
>
> This makes sense, as you can't directly instantiate an abstract class
> right?
> You have to extend it and then implement the subclass. But I am
> following
> the code example as closely as I can, and I still do not understand
> what I
> am doing wrong.
>
>
>
> Thanks,
> Branden Tanga
> Programmer / EHR Systems Engineer
>
>
>
>

 -
 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: Runtime error with TabbedPanel and AbstractTab (I know it's my mistake somewhere)

2009-04-08 Thread Branden Tanga
That was it! I guess I should get into the habit of managing maven and then
"pushing" those changes out to eclipse with a mvn clean then a mvn eclipse.


Thanks,
Branden Tanga
Programmer / EHR Systems Engineer


On Wed, Apr 8, 2009 at 1:11 AM, Daan van Etten  wrote:

> Hi,
>
> Maven should handle your dependencies. Have you added the wicket extensions
> dependency to your pom.xml?
>
> Add this to the 'dependencies' tag of your pom.xml. The Wicket dependency
> should already be there.
>
>
>org.apache.wicket
>wicket-extensions
>1.3.5
>
>
> Change the 'version' according to which version of Wicket you use.
>
> Eclipse should add Wicket extensions to your classpath when you have this
> dependency. (maybe with a mvn clean eclipse command)
>
>
> Regards,
>
> Daan van Etten
>
> Op 8 apr 2009, om 12:49 heeft Branden Tanga het volgende geschreven:
>
>
>  Ok, I've been racking my brain for the past few days, and I still cannot
>> solve this.
>> I've even added wicket-extensions.jar to my .m2/repository and rebuilt my
>> eclipse project with the mvn clean and mvn eclipse commands given in the
>> wicket quickstart. When I open up my eclipse project, under m2_repo I can
>> find my wicket-extensions.jar
>>
>> I still get a noclassdeffound runtime error for AbstractTab. It seems as
>> if
>> the classpath that eclipse uses for compiling has nothing to do with the
>> classpath that wicket uses at runtime. How can I print my classpath from
>> within wicket?
>>
>> (note: I've already added the directory that contains
>> wicket-extensions.jar
>> to my classpath variable in my .bash_profile, still the same runtime
>> error).
>>
>> Thanks,
>> Branden Tanga
>> Programmer / EHR Systems Engineer
>>
>>
>> On Mon, Apr 6, 2009 at 1:24 AM, mailingl...@jorgenpersson.se <
>> mailingl...@jorgenpersson.se> wrote:
>>
>>  Hi.
>>>
>>> Seems like you're missing a jar file. The
>>> "java.lang.NoClassDefFoundError"
>>> means just what it sais. The class can not be found in the classpath.
>>> It has nothing to do whether the class is abstract or not.
>>>
>>> /Jörgen
>>>
>>> Branden Tanga skrev:
>>>
>>> Hello all,
>>>
 I'm trying to follow the examples given on wicketstuff.org for
 TabbedPanel
 here: http://tinyurl.com/cpzkas

 My code compiles fine, but when I run it I get a noclassdeffound error
 for
 AbstractTab. Here's my snippet of code:

 import org.apache.wicket.markup.html.WebPage;

 import org.apache.wicket.extensions.ajax.markup.html.tabs.*;

 import org.apache.wicket.extensions.markup.html.tabs.*;

 import org.apache.wicket.markup.html.panel.*;

 import org.apache.wicket.model.*;

 import java.util.*;


 public class MainMenu extends WebPage{

 /*Constructor*/

 public MainMenu() {

 List tabs = new ArrayList();

 tabs.add(new AbstractTab(new Model("first tab")) {

 @Override

 public Panel getPanel(String panelID) {

 return new MyPanel(panelID);

 }

 });

 } // end constructor

 and here's the corresponding runtime error:

 WicketMessage: Method onFormSubmitted of interface
 org.apache.wicket.markup.html.form.IFormSubmitListener targeted at
 component [MarkupContainer [Component id = loginForm]] threw an
 exception

 Root cause:

 java.lang.NoClassDefFoundError:
 org/apache/wicket/extensions/markup/html/tabs/AbstractTab
   at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClass(ClassLoader.java:675)

 This makes sense, as you can't directly instantiate an abstract class
 right?
 You have to extend it and then implement the subclass. But I am
 following
 the code example as closely as I can, and I still do not understand what
 I
 am doing wrong.



 Thanks,
 Branden Tanga
 Programmer / EHR Systems Engineer




>>>
>>> -
>>> 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: Runtime error with TabbedPanel and AbstractTab (I know it's my mistake somewhere)

2009-04-08 Thread Daan van Etten

Hi,

Maven should handle your dependencies. Have you added the wicket  
extensions dependency to your pom.xml?


Add this to the 'dependencies' tag of your pom.xml. The Wicket  
dependency should already be there.



org.apache.wicket
wicket-extensions
1.3.5


Change the 'version' according to which version of Wicket you use.

Eclipse should add Wicket extensions to your classpath when you have  
this dependency. (maybe with a mvn clean eclipse command)



Regards,

Daan van Etten

Op 8 apr 2009, om 12:49 heeft Branden Tanga het volgende geschreven:

Ok, I've been racking my brain for the past few days, and I still  
cannot

solve this.
I've even added wicket-extensions.jar to my .m2/repository and  
rebuilt my
eclipse project with the mvn clean and mvn eclipse commands given in  
the
wicket quickstart. When I open up my eclipse project, under m2_repo  
I can

find my wicket-extensions.jar

I still get a noclassdeffound runtime error for AbstractTab. It  
seems as if
the classpath that eclipse uses for compiling has nothing to do with  
the
classpath that wicket uses at runtime. How can I print my classpath  
from

within wicket?

(note: I've already added the directory that contains wicket- 
extensions.jar
to my classpath variable in my .bash_profile, still the same runtime  
error).


Thanks,
Branden Tanga
Programmer / EHR Systems Engineer


On Mon, Apr 6, 2009 at 1:24 AM, mailingl...@jorgenpersson.se <
mailingl...@jorgenpersson.se> wrote:


Hi.

Seems like you're missing a jar file. The  
"java.lang.NoClassDefFoundError"

means just what it sais. The class can not be found in the classpath.
It has nothing to do whether the class is abstract or not.

/Jörgen

Branden Tanga skrev:

Hello all,

I'm trying to follow the examples given on wicketstuff.org for
TabbedPanel
here: http://tinyurl.com/cpzkas

My code compiles fine, but when I run it I get a noclassdeffound  
error for

AbstractTab. Here's my snippet of code:

import org.apache.wicket.markup.html.WebPage;

import org.apache.wicket.extensions.ajax.markup.html.tabs.*;

import org.apache.wicket.extensions.markup.html.tabs.*;

import org.apache.wicket.markup.html.panel.*;

import org.apache.wicket.model.*;

import java.util.*;


public class MainMenu extends WebPage{

/*Constructor*/

public MainMenu() {

List tabs = new ArrayList();

tabs.add(new AbstractTab(new Model("first tab")) {

@Override

public Panel getPanel(String panelID) {

return new MyPanel(panelID);

}

});

} // end constructor

and here's the corresponding runtime error:

WicketMessage: Method onFormSubmitted of interface
org.apache.wicket.markup.html.form.IFormSubmitListener targeted at
component [MarkupContainer [Component id = loginForm]] threw an
exception

Root cause:

java.lang.NoClassDefFoundError:
org/apache/wicket/extensions/markup/html/tabs/AbstractTab
   at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClass(ClassLoader.java: 
675)


This makes sense, as you can't directly instantiate an abstract  
class

right?
You have to extend it and then implement the subclass. But I am  
following
the code example as closely as I can, and I still do not  
understand what I

am doing wrong.



Thanks,
Branden Tanga
Programmer / EHR Systems Engineer






-
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: Runtime error with TabbedPanel and AbstractTab (I know it's my mistake somewhere)

2009-04-08 Thread Branden Tanga
Ok, I've been racking my brain for the past few days, and I still cannot
solve this.
I've even added wicket-extensions.jar to my .m2/repository and rebuilt my
eclipse project with the mvn clean and mvn eclipse commands given in the
wicket quickstart. When I open up my eclipse project, under m2_repo I can
find my wicket-extensions.jar

I still get a noclassdeffound runtime error for AbstractTab. It seems as if
the classpath that eclipse uses for compiling has nothing to do with the
classpath that wicket uses at runtime. How can I print my classpath from
within wicket?

(note: I've already added the directory that contains wicket-extensions.jar
to my classpath variable in my .bash_profile, still the same runtime error).

Thanks,
Branden Tanga
Programmer / EHR Systems Engineer


On Mon, Apr 6, 2009 at 1:24 AM, mailingl...@jorgenpersson.se <
mailingl...@jorgenpersson.se> wrote:

> Hi.
>
> Seems like you're missing a jar file. The "java.lang.NoClassDefFoundError"
> means just what it sais. The class can not be found in the classpath.
> It has nothing to do whether the class is abstract or not.
>
> /Jörgen
>
> Branden Tanga skrev:
>
>  Hello all,
>> I'm trying to follow the examples given on wicketstuff.org for
>> TabbedPanel
>> here: http://tinyurl.com/cpzkas
>>
>> My code compiles fine, but when I run it I get a noclassdeffound error for
>> AbstractTab. Here's my snippet of code:
>>
>> import org.apache.wicket.markup.html.WebPage;
>>
>> import org.apache.wicket.extensions.ajax.markup.html.tabs.*;
>>
>> import org.apache.wicket.extensions.markup.html.tabs.*;
>>
>> import org.apache.wicket.markup.html.panel.*;
>>
>> import org.apache.wicket.model.*;
>>
>> import java.util.*;
>>
>>
>> public class MainMenu extends WebPage{
>>
>> /*Constructor*/
>>
>> public MainMenu() {
>>
>> List tabs = new ArrayList();
>>
>> tabs.add(new AbstractTab(new Model("first tab")) {
>>
>> @Override
>>
>> public Panel getPanel(String panelID) {
>>
>> return new MyPanel(panelID);
>>
>> }
>>
>> });
>>
>> } // end constructor
>>
>> and here's the corresponding runtime error:
>>
>> WicketMessage: Method onFormSubmitted of interface
>> org.apache.wicket.markup.html.form.IFormSubmitListener targeted at
>> component [MarkupContainer [Component id = loginForm]] threw an
>> exception
>>
>> Root cause:
>>
>> java.lang.NoClassDefFoundError:
>> org/apache/wicket/extensions/markup/html/tabs/AbstractTab
>> at java.lang.ClassLoader.defineClass1(Native Method)
>> at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
>>
>> This makes sense, as you can't directly instantiate an abstract class
>> right?
>> You have to extend it and then implement the subclass. But I am following
>> the code example as closely as I can, and I still do not understand what I
>> am doing wrong.
>>
>>
>>
>> Thanks,
>> Branden Tanga
>> Programmer / EHR Systems Engineer
>>
>>
>>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Is localizing parts of the service layer (which is using Spring 2.5) a good idea?

2009-04-08 Thread Kent Larsson
Great answer as you always seem to provide Igor! Thank you!

/ Kent


On Tue, Apr 7, 2009 at 7:04 PM, Igor Vaynberg  wrote:
> both wicket and spring allow you to customize how text bundles are
> loaded. you can create a spring bundle loader that uses your
> webapplication.properties file or a wicket bundle loader that uses
> your spring bundle. either way you can then have business tier and web
> share certain text bundles for localization. once that is done, it
> hardly matters which layer performs localization since they are backed
> by the same dictionary.
>
> -igor
>
> On Tue, Apr 7, 2009 at 3:01 AM, Kent Larsson  wrote:
>> Hi,
>>
>> This is more of a general design question and I would really
>> appreciate some input. Do you localize the service layer as well as
>> the Wicket presentation layer?
>>
>> I have a specific use case. When a user register a new account the
>> service layer sends an e-mail message with an activation link. This
>> message should be written in a language which the users understands
>> and must thus be localized. I see two options:
>>
>> 1: Localize it using Spring only and don't involve Wicket. That way it
>> will work in case of a user registering an account through a web
>> service (bypassing the Wicket presentation layer).
>>
>> 2: Use localization as you normally would from Wicket and send the
>> message string from the presentation layer to the relevant service
>> layer method (where it is used in the e-mail).
>>
>> Currently no user is supposed to register through a web service
>> invocation. It might change though, but not for quite a while.
>>
>> How would you solve this problem?
>>
>> Best regards, Kent
>>
>> -
>> 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



Search results in a DataView must be updated

2009-04-08 Thread Matthias Keller

Hi

I implemented a search form which contacts a remote server to search for 
some users and returns a List of the matching users.
I then feed them into a DataView where the user can click on a specific 
entry to see the details.

This is implemented using something like

public void populateItem (final Item item) {
item.add(new Link("link.userDetails") {
public void onClick () {
setResponsePage(new UserDetailsPage((User) 
item.getModelObject(), SearchUserPage.this));

}
});
}
The SearchUserPage instance is passed to the UserDetailsPage in order to 
have a link there pointing back to the SearchUserPage.


The UserDetailsPage now has a few actions like 'lock user' which locks 
the user on the backend and I finally get the updated instance of the 
User back.

Now my question is, how can I feed it back into the DataView and all that?
Unfortunately, DataView is backed by a ListDataProvider which takes the 
list as a List and not as a model and the UserDetailsPage also has a 
direct reference to the (old) User instance...


Is there a better way to do this which would take care of an updated 
model automatically? So that I would only have to replace the old User 
instance by the new instance in a list, call a  modelChanged()  
somewhere and I'm good?


Thanks for your pointers

Matt

--
matthias.kel...@ergon.ch  +41 44 268 83 98
Ergon Informatik AG, Kleinstrasse 15, CH-8008 Zürich
http://www.ergon.ch
__
e r g o nsmart people - smart software

Ergon ist im Final für den Fairnesspreis 2009 - Online-Abstimmung bis 6. Mai 2009 unter www.fairnesspreis.ch 





smime.p7s
Description: S/MIME Cryptographic Signature


Re: override isEnabed of FinishButton

2009-04-08 Thread Matthias Keller

Hi Martin

I had a similiar problem a while ago - I solved it by copying that class 
- it was the fastest thing to do. However, feel free to post a bug 
report about removal of these final modifiers for the next version. They 
already removed some final's in the CLASS definition of these buttons 
for 1.3.5 on my request - I also think they just don't make any sense.


Matt

Martin Tilma wrote:

Hi,

Thnx for the reply, but your solutions won't fix my problem because 
the isEnabled in FinishButton is implemented like this:


/**
 * @see org.apache.wicket.Component#isEnabled()
 */
public final boolean isEnabled()
{
IWizardStep activeStep = getWizardModel().getActiveStep();
return (activeStep != null && 
getWizardModel().isLastStep(activeStep));

}

Regards,


Martin

jcgarciam wrote:
I guess, you can try to override protected void onBeforeRender() and 
make

something like:

protected void onBeforeRender(){
  this.setEnabled(true);
  super.onBeforeRender();
}



Martin Tilma wrote:

Hello,

I have a Wizard with a FinishButton. I want the button always be 
enabled. Because the method isEnabled is final I cant override it.


I think coping the button and change the isEnabled method to always 
return true is a bit ugly. What is de best way to do it?


Regards,

Martin




smime.p7s
Description: S/MIME Cryptographic Signature


Re: override isEnabed of FinishButton

2009-04-08 Thread Martin Tilma

Hi,

Thnx for the reply, but your solutions won't fix my problem because the 
isEnabled in FinishButton is implemented like this:


/**
 * @see org.apache.wicket.Component#isEnabled()
 */
public final boolean isEnabled()
{
IWizardStep activeStep = getWizardModel().getActiveStep();
return (activeStep != null && 
getWizardModel().isLastStep(activeStep));
}

Regards,


Martin

jcgarciam wrote:

I guess, you can try to override protected void onBeforeRender() and make
something like:

protected void onBeforeRender(){
  this.setEnabled(true);
  super.onBeforeRender();
}



Martin Tilma wrote:

Hello,

I have a Wizard with a FinishButton. I want the button always be 
enabled. Because the method isEnabled is final I cant override it.


I think coping the button and change the isEnabled method to always 
return true is a bit ugly. What is de best way to do it?


Regards,

Martin


--
Martin Tilma
Func. Internet Integration
W http://www.func.nl
T +31 20 423
F +31 20 4223500

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








--
Martin Tilma
Func. Internet Integration
W http://www.func.nl
T +31 20 423
F +31 20 4223500

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



Re: id attribute of Component Tag in renderHead?

2009-04-08 Thread Martijn Dashorst
On Wed, Apr 8, 2009 at 4:04 AM, Craig Tataryn  wrote:
> but the JavaDoc tells me not to use this
> method as it's supposed to be used by Wicket internally only.  And they use
> capital letters too when telling me this.

That is because a kitten gets killed every time you call such methods. ;-)

You can call such methods, but you should be aware that we reserve the
right to remove those methods in a new version, or change the
behavior. These methods often also do things inside of Wicket
internals that might hinder proper request processing (you might call
a method before it is supposed to be called, causing ill effects such
as doing expensive things twice or throw NPE's, or a long time after
it is supposed to be called and leave a mess).

If you need that method, you can call it, but you're on your own :)

Martijn

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



RE: EmptyAjaxRequestTarget invokes failurescript when link is pressed on page

2009-04-08 Thread Mikko Pukki
Hi,

I attached a patch (for 1.3.x snapshot) to jira 1971.

- Mikko

-Original Message-
From: Matej Knopp [mailto:matej.kn...@gmail.com] 
Sent: 7. huhtikuuta 2009 20:17
To: users@wicket.apache.org
Subject: Re: EmptyAjaxRequestTarget invokes failurescript when link is pressed 
on page

Please open jira issue - or assign the code you posted to existing
one. I'll apply it.

-Matej

On Tue, Apr 7, 2009 at 3:30 PM, Mikko Pukki  wrote:
> Hi,
>
> We just noticed that if user is on a page and ajax request is
> executing, pressing a link can cause AbstractDefaultAjaxBehavior's
> failurescript to be executed on the browser.
>
> We noticed that this happens at least in cases where pressing a link
> forwards user to other page by setting a different response page.
>
> Content of ajax debug is same as in the jira issue I have posted before
> (JIRA 1971):
>
>    INFO: Initiating Ajax POST request on ? 
> wicket:interface=:1:inputForm:back::IActivePageBehaviorListener:0:&wicket:ignoreIfNotActive=true&random=0.6741350924814413
>    INFO: Invoking pre-call handler(s)...
>    INFO: Received ajax response (31 characters)
>    INFO:
>    
>    ERROR: Error while parsing response: Could not find root  
> element
>    INFO: Invoking post-call handler(s)...
>
> Content of the ajax response is problem at least on ie6,ie7,ff2 and ff3. It 
> seems
> to fail, because xml reply does not contain doctype.
>
> This is annoying, because the invoker of the ajax request is in our case 
> inherited from the
> AbstractAjaxTimerBehavior and we would like to do a page reload in the 
> failurescript in case
> that request fails so that page would still be updated even if there are some 
> network problems.
> Now pressing any link that forwards to other pages can force a reload to the
> page, if some request is already executing. In this particular application 
> this is wery common,
> partly because of bad network connection from the client's site (request can 
> take some time)
> and partly because of very frequent ajax requests.
>
> We tried to modify 
> org.apache.wicket.request.target.basic.EmptyAjaxRequestTarget's
> respond method so that it puts doctype to the respond as does the normal ajax 
> target
>
> we replaced this:
>        public void respond(RequestCycle requestCycle)
>        {
>                
> requestCycle.getResponse().write("");
>        }
>
> with this:
>        public void respond(RequestCycle requestCycle)
>        {
>                final WebResponse response = 
> (WebResponse)requestCycle.getResponse();
>                final Application app = Application.get();
>                final String encoding = 
> app.getRequestCycleSettings().getResponseRequestEncoding();
>
>                // Set content type based on markup type for page
>                response.setCharacterEncoding(encoding);
>                response.setContentType("text/xml; charset=" + encoding);
>
>                // Make sure it is not cached by a client
>                response.setHeader("Expires", "Mon, 26 Jul 1997 05:00:00 GMT");
>                response.setHeader("Cache-Control", "no-cache, 
> must-revalidate");
>                response.setHeader("Pragma", "no-cache");
>
>                response.write("                response.write(encoding);
>                response.write("\"?>");
>                response.write("");
>        }
>
> And it works now. Should I open a jira issue for this?
>
> Regards,
> Mikko
>
> --
> Mikko Pukki
> Syncron Tech Oy
> Laserkatu 6
> 53850 Lappeenranta
> +358 400 757 178
>
>
> -
> 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