Re: tomcat session replication

2010-03-05 Thread Igor Vaynberg
as long as all you do is add fields you are ok...

-igor

On Fri, Mar 5, 2010 at 8:16 PM, Douglas Ferguson
 wrote:
> So as long as the serial I'd is the same the classlader won't care the
> fields don't match?
>
> Douglas Ferguson
> 512-293-7279
> Sent from my iPhone
>
> On Mar 5, 2010, at 3:37 PM, "Igor Vaynberg" 
> wrote:
>
>> in the wicket code we override serial ids to 1, you should do the same
>> in your code.
>>
>> -igor
>>
>> On Fri, Mar 5, 2010 at 12:15 PM, Douglas Ferguson
>>  wrote:
>>> I'm  considering a 0 downtime deployment but am concerned with the
>>> amount of state in the wicket session.
>>>
>>> This is the scenario that concerns me.
>>>
>>> 1) There are 2 tomcats running
>>> 2) A change is made to a serializable object and the serial version
>>> id is updated
>>> 3) 1 tomcat instance is taken down for updating
>>> 4) tomcat instance comes back up with new object and now tries to
>>> update state from other tomcat and the wicket session has a
>>> reference to the old version of the serializable.
>>>
>>> On Mar 5, 2010, at 12:18 PM, Igor Vaynberg wrote:
>>>
 yes

 -igor

 On Fri, Mar 5, 2010 at 10:02 AM, Douglas Ferguson
  wrote:
> Has anybody had success with wicket using tomcat's session
> replication?
>
> D/
>
> ---
> --
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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

>>>
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>
> -
> 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: Client side events in Wicket, what do you think about that?

2010-03-05 Thread Eelco Hillenius
Hi,

> sounds like you want to rewrite gwt but using wicket model for
> handling markup instead of layout manages which is what gwt uses. it
> is probably much easier to write a library for gwt that implements the
> wicket markup model rather then the other way around...

Like this http://code.google.com/webtoolkit/doc/latest/DevGuideUiBinder.html?

>> script within the generated HTML. That does not suits. And BTW gwt compiler
>> is slow as hell (minutes!!!),

We have compile times from 10 minutes up to over an hour. No kidding.

>> how people are happy developing GWT applications?

Definitively spoils the fun. Especially because in our experience,
though GWT has the promise of write once for all browsers, you still
need to do quite a bit of testing and tweaking to make sure everything
looks good in different browsers. Also not very helpful is the fact
that the Google Eclipse plugin uses the jars copied to a war/libs
directory rather than the class path you define for your project,
which cost us a lot of time because we have our projects broken up in
smaller pieces (dependent projects), and every little change we have
in one of the dependent libs means having to create a build for them,
and then copying them to the war/libs dir. Hopefully this will be
fixed some day. And then there is that if you don't optimize, you
easily end up with over a MB initial download (just a medium sized
application). Oh, and I never would've guessed how much we depend on
introspection to take the plumbing code out until you have to do
without as in GWT.

Anyway, it's not all bad. The improvements for 2.0, including
UiBinder, look good, and the code we're ending up with is, though more
bloated than with Wicket, quite neat (good separation of concerns,
testable, componentized, etc). I feel we took a substantial hit in
developer productivity using GWT for our new projects rather than
Wicket, and I would probably pick Wicket again for my own projects,
but compared to the alternatives out there, GWT is still a pretty good
framework, where the larger the scale (development wise) of your
project, the larger the pay off is.

>> The next generation of HTML/JS would evolve towards client programming
>> capabilities. I like Wicket for its full freedom of HTML (contrary to GWT)
>> and I would like to use similar model when programming rich web client
>> applications. And it is less about the Wicket way of splitting html and
>> java. It is more about binding to dynamically loadable data with any deep of
>> structure displayed on users demand. The GWT way would require to program it
>> in any way when Wicket does it transparently.

Yeah, another thing I miss is lazy-ness... but that'd be hard to
reproduce when you would move from a request/ response model to JS
driven.

>> Another story is authorization
>> that can be done transparently. But web development evolves and client side
>> programming becomes more and more demanded. I tried to think about how
>> technically we could use the best of both worlds.
>>
>> What do you think about all that?

Sounds to me like enough ideas to base a new framework on ;-)
Personally I think that Wicket should keep focussed on the programming
model we have now. Drastically changing that just means building
another framework, and we can learn from other frameworks that that's
just not a very good idea. Also, I wouldn't really have an idea how to
implement this without basically copying GWT, which is probably hard
to beat at it's own game.

Eelco

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



Re: tomcat session replication

2010-03-05 Thread Douglas Ferguson
So as long as the serial I'd is the same the classlader won't care the  
fields don't match?

Douglas Ferguson
512-293-7279
Sent from my iPhone

On Mar 5, 2010, at 3:37 PM, "Igor Vaynberg"   
wrote:

> in the wicket code we override serial ids to 1, you should do the same
> in your code.
>
> -igor
>
> On Fri, Mar 5, 2010 at 12:15 PM, Douglas Ferguson
>  wrote:
>> I'm  considering a 0 downtime deployment but am concerned with the  
>> amount of state in the wicket session.
>>
>> This is the scenario that concerns me.
>>
>> 1) There are 2 tomcats running
>> 2) A change is made to a serializable object and the serial version  
>> id is updated
>> 3) 1 tomcat instance is taken down for updating
>> 4) tomcat instance comes back up with new object and now tries to  
>> update state from other tomcat and the wicket session has a  
>> reference to the old version of the serializable.
>>
>> On Mar 5, 2010, at 12:18 PM, Igor Vaynberg wrote:
>>
>>> yes
>>>
>>> -igor
>>>
>>> On Fri, Mar 5, 2010 at 10:02 AM, Douglas Ferguson
>>>  wrote:
 Has anybody had success with wicket using tomcat's session  
 replication?

 D/

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


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

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



Re: Clear feedback panel

2010-03-05 Thread Martin Makundi
Maybe you are not really replacing the feedback using ajax. Look at
wicket-debug popup.  Do you hae
feedbackPanel.setOutputMarkupId(true);?

**
Martin

2010/3/5 Anna Simbirtsev :
> It does not work for some reason.
>
> Session.get().cleanupFeedbackMessages();
> target.addComponent(feedback);
>
> The message is still visible.
>
> On Fri, Mar 5, 2010 at 4:29 PM, Martin Makundi <
> martin.maku...@koodaripalvelut.com> wrote:
>
>> session.cleanupfeedbackmessages.
>>
>> 2010/3/5 Anna Simbirtsev :
>> > Hi,
>> >
>> > How can I clear FeedbackPanel messages?
>> > I want to remove them from the page using target.addComponent(f); where f
>> is
>> > FeedbackPanel.
>> > I just don't know how to set messages to null.
>> >
>> > Thanks,
>> > Anna
>> >
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>
> --
> Anna Simbirtsev
> (416) 729-7331
>

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



Re: OnlyTargetActivePage param

2010-03-05 Thread Pedro Santos
One method will return an url that address the behavior, the another one
will to return an script that send an ajax request to that behaviour.
the usage in javascript looks like:
document.location = generatedUrlReturnedByBehaviour;
eval( generatedScriptGeneratedByBehaviour);

On Thu, Mar 4, 2010 at 6:12 PM, David Skuben  wrote:

> Hi everybody,
>
> I'm now looking in classes AbstractAjaxBehavior and
> AbstractDefaultAjaxBehavior.
> There are two similar methods: getCallbackUrl() and getCallbackScript() and
> I don't understand why
> first set onlyTargetActivePage to  "true" and second to "false". Is it
> right
> ?
>
> If someone know about that, please let me know.
> Thanks a lot.
> Dave
>
> AbstractAjaxBehavior:
> public CharSequence getCallbackUrl()
>{
>return getCallbackUrl(true);
>}
>
> AbstractDefaultAjaxBehavior:
> protected CharSequence getCallbackScript()
>{
>return getCallbackScript(false);
>}
>



-- 
Pedro Henrique Oliveira dos Santos


Re: Question about setting Lists

2010-03-05 Thread Jeremy Thomerson
Don't generate lists in your constructor / init methods and set them on the
list.  This is one of the most common pitfalls that newcomers to Wicket fall
in to.  Instead, create a LoadableDetachableModel, ala:

new ListView("list", new LoadableDetachableModel>() {
  public List load() {
 // note that of course, you could add an auto-injected dao to your
component
return App.get().getYourDAO().findPeople();
  }
});

This accomplishes two things:
1 - doesn't serialize the whole list to the session
2 - if another component modifies the list, the list is auto-refreshed.

This is the classic "push" vs "pull" method.  You should prefer the pull.

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



On Fri, Mar 5, 2010 at 3:22 PM, Eric Reagan  wrote:

> Hi,
>  I am still new to Wicket and I think I might be missing something. I
> am trying to create a list of items and then have a panel generate a
> ListView which contains the previously created list (and all their children
> and children's children..etc). In order to do this I created a class for
> the
> List Items (ListItem) and a panel called (ListItemPanel). In order to
> generate the ListView in my panel I need to be able to tell the panel which
> list I want to iterate over. In order to do this in the calling page I made
> my list and I went to go and set my variable inside of my panel, but my
> setListToView(...) method which I had created won't appear. I have included
> below the problem snippets. Thank you in advance for the help.
>
> // Code
>
> MyPage
>
>ListItemPanel panel = new ListItemPanel("panel");
> ..generate all of the list items and put it into an ArrayList
> panel.setListToView(...panels)  even though its a public method in my ListPanel class which extends Panel
>
> thank you,
>
> --
> Eric Reagan
>


Re: tomcat session replication

2010-03-05 Thread Martin Grotzke
Hi Douglas,

you might have a look at memcached-session-manager [1] which is a tomcat
session manager that stores sessions additionally in memcached (sessions
are still kept in and read from local memory for best performance).

The session serialization is pluggable and there's an xml based
serialization strategy (using javolution) to support code upgrade - of
course you still have to keep track of code changes so that "old"
session data structures can be deserialized to new data structures (have
a look at [2] for serialization strategies).

Btw, what I wonder: tomcat's session replication requires a
session.setAttribute to detect a session modification and trigger a
replication - is this requirement met by wicket? And apart from wicket,
to me this seems to be a rather hard requirement for web applications.
Who can guarantee, that nobody is getting a session attribute and
modifying it without invoking session.setAttribute afterwards...?

Right now I'm implementing a feature so that sessions are only sent to
memcached if the session data changed. This is completely transparent,
so that you might retrieve a complex session attribute, change some
property of it and this change will be detected so that the session will
be updated in memcached (more details on this can be found at [3]).

Cheers,
Martin


[1] http://code.google.com/p/memcached-session-manager/
[2] 
http://code.google.com/p/memcached-session-manager/wiki/SerializationStrategies
[3] http://code.google.com/p/memcached-session-manager/issues/detail?id=36


On Fri, 2010-03-05 at 12:15 -0800, Douglas Ferguson wrote:
> I'm  considering a 0 downtime deployment but am concerned with the amount of 
> state in the wicket session.
> 
> This is the scenario that concerns me.
> 
> 1) There are 2 tomcats running
> 2) A change is made to a serializable object and the serial version id is 
> updated
> 3) 1 tomcat instance is taken down for updating
> 4) tomcat instance comes back up with new object and now tries to update 
> state from other tomcat and the wicket session has a reference to the old 
> version of the serializable.
> 
> On Mar 5, 2010, at 12:18 PM, Igor Vaynberg wrote:
> 
> > yes
> > 
> > -igor
> > 
> > On Fri, Mar 5, 2010 at 10:02 AM, Douglas Ferguson
> >  wrote:
> >> Has anybody had success with wicket using tomcat's session replication?
> >> 
> >> D/
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 

-- 
Martin Grotzke
http://www.javakaffee.de/blog/


signature.asc
Description: This is a digitally signed message part


Re: Clear feedback panel

2010-03-05 Thread Jered Myers
You can try grabbing the FeebackMessages via 
Session.get().getFeedbackMessages() or 
Session.get().getFeedbackMessages().messages(IFeedbackMessageFilter) and 
then call FeedbackMessage.markRendered().


On 3/5/2010 1:34 PM, Anna Simbirtsev wrote:

It does not work for some reason.

Session.get().cleanupFeedbackMessages();
target.addComponent(feedback);

The message is still visible.

On Fri, Mar 5, 2010 at 4:29 PM, Martin Makundi<
martin.maku...@koodaripalvelut.com>  wrote:

   

session.cleanupfeedbackmessages.

2010/3/5 Anna Simbirtsev:
 

Hi,

How can I clear FeedbackPanel messages?
I want to remove them from the page using target.addComponent(f); where f
   

is
 

FeedbackPanel.
I just don't know how to set messages to null.

Thanks,
Anna

   

-
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: tomcat session replication

2010-03-05 Thread Igor Vaynberg
in the wicket code we override serial ids to 1, you should do the same
in your code.

-igor

On Fri, Mar 5, 2010 at 12:15 PM, Douglas Ferguson
 wrote:
> I'm  considering a 0 downtime deployment but am concerned with the amount of 
> state in the wicket session.
>
> This is the scenario that concerns me.
>
> 1) There are 2 tomcats running
> 2) A change is made to a serializable object and the serial version id is 
> updated
> 3) 1 tomcat instance is taken down for updating
> 4) tomcat instance comes back up with new object and now tries to update 
> state from other tomcat and the wicket session has a reference to the old 
> version of the serializable.
>
> On Mar 5, 2010, at 12:18 PM, Igor Vaynberg wrote:
>
>> yes
>>
>> -igor
>>
>> On Fri, Mar 5, 2010 at 10:02 AM, Douglas Ferguson
>>  wrote:
>>> Has anybody had success with wicket using tomcat's session replication?
>>>
>>> D/
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: Clear feedback panel

2010-03-05 Thread Anna Simbirtsev
It does not work for some reason.

Session.get().cleanupFeedbackMessages();
target.addComponent(feedback);

The message is still visible.

On Fri, Mar 5, 2010 at 4:29 PM, Martin Makundi <
martin.maku...@koodaripalvelut.com> wrote:

> session.cleanupfeedbackmessages.
>
> 2010/3/5 Anna Simbirtsev :
> > Hi,
> >
> > How can I clear FeedbackPanel messages?
> > I want to remove them from the page using target.addComponent(f); where f
> is
> > FeedbackPanel.
> > I just don't know how to set messages to null.
> >
> > Thanks,
> > Anna
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Anna Simbirtsev
(416) 729-7331


Re: Clear feedback panel

2010-03-05 Thread Martin Makundi
session.cleanupfeedbackmessages.

2010/3/5 Anna Simbirtsev :
> Hi,
>
> How can I clear FeedbackPanel messages?
> I want to remove them from the page using target.addComponent(f); where f is
> FeedbackPanel.
> I just don't know how to set messages to null.
>
> Thanks,
> Anna
>

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



Question about setting Lists

2010-03-05 Thread Eric Reagan
Hi,
  I am still new to Wicket and I think I might be missing something. I
am trying to create a list of items and then have a panel generate a
ListView which contains the previously created list (and all their children
and children's children..etc). In order to do this I created a class for the
List Items (ListItem) and a panel called (ListItemPanel). In order to
generate the ListView in my panel I need to be able to tell the panel which
list I want to iterate over. In order to do this in the calling page I made
my list and I went to go and set my variable inside of my panel, but my
setListToView(...) method which I had created won't appear. I have included
below the problem snippets. Thank you in advance for the help.

// Code

MyPage

ListItemPanel panel = new ListItemPanel("panel");
 ..generate all of the list items and put it into an ArrayList
 panel.setListToView(...panels) 

Clear feedback panel

2010-03-05 Thread Anna Simbirtsev
Hi,

How can I clear FeedbackPanel messages?
I want to remove them from the page using target.addComponent(f); where f is
FeedbackPanel.
I just don't know how to set messages to null.

Thanks,
Anna


RE: Model Values Not Updating on Form Submit

2010-03-05 Thread Matthew Arck
Thank you very much, Sven!
That change exposed an underlying problem of having my collection set to
null.
I fixed the getter to instantiate the ArrayList if it was null and
everything now works!

-Matt

-Original Message-
From: Sven Meier [mailto:s...@meiers.net] 
Sent: Friday, March 05, 2010 12:41 PM
To: users@wicket.apache.org
Subject: Re: Model Values Not Updating on Form Submit

Hi Matthew,

use a Check instead of a Checkbox.

Sven


Matthew Arck wrote:
> Hey all,
>
>  
>
> Go easy on me here as I'm not only brand new to wicket but this is
also
> my first email to this user group!
>
>  
>
> I've inherited a project from a co-worker who has left the company and
a
> request has been put into to ask new users to specify their race and
> ethnicity when they register on our web site.
>
> After doing a good deal of reading and experimenting I have the
> questions displaying properly and the form submits with no exceptions.
> The problem I have  is that my user model doesn't get updated with any
> of the race or ethnicity selections.
>
>  
>
> Race and ethnicity are essentially handled the same way so to keep
> things short I'll just post what I'm doing for the possible race
> selections.
>
>  
>
> Here's my markup:
>
> 
>
> Select one or more races to
> indicate what you consider yourself to be.
>
>   
>
>   
>
> 
>
>   
>
>style="font-weight:normal;">Race Text
>
>   
>
> 
>
>   
>
> 
>
>  
>
> Here's my markup the code I have for setting up the relevant parts of
> the form:
>
> public NewAccountForm(final String id, CompoundPropertyModel
userModel)
>
> {   
>
>   super(id, userModel);   
>
>   
>
>   /*
>
>* Set up a bunch of fields and validations
>
>*/
>
>  
>
> // ADD RACE QUESTION
>
>String raceQuestion = fhDAO.getRaceQuestion();
>
>Label selectOneOrMoreRacesLabel = new
> Label("selectOneOrMoreRaces", new Model(raceQuestion));
>
>add(selectOneOrMoreRacesLabel);
>
> 
>
>CheckGroup racesCheckGroup = new
CheckGroup("races");
>
>add(racesCheckGroup);
>
>ListView races = new ListView("raceGroup",
> fhDAO.getRaceAnswers())
>
>{
>
>protected void populateItem(ListItem item)
>
>{
>
>RaceAnswer access = (RaceAnswer)item.getModelObject();
>
>CheckBox chk = new CheckBox("value", item.getModel());
>
>item.add(chk);
>
>item.add(new Label("racDesc", access.getDescription()));
>
>}
>
>};
>
>racesCheckGroup.add(races);
>
> }
>
>  
>
> And finally, the relevant portions of my user model:
>
> private ArrayList race;
>
>  
>
> public ArrayList getRaces()
>
> {
>
>   return race;
>
> }
>
> 
>
> public void setRaces(ArrayList races)
>
> {
>
>   race = races;
>
> }
>
>  
>
> My RaceAnswer model consists of getters and setters for the Value
> property (String) and Description property (also a String).
>
>  
>
> If anyone is able to point out where I've gone wrong or just help me
> with the proper way to bind an ArrayList to a CheckGroup I would be
> forever grateful.
>
>  
>
> Thanks,
>
> Matt
>
>
>   


-
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: Model Values Not Updating on Form Submit

2010-03-05 Thread Sven Meier

Hi Matthew,

use a Check instead of a Checkbox.

Sven


Matthew Arck wrote:

Hey all,

 


Go easy on me here as I'm not only brand new to wicket but this is also
my first email to this user group!

 


I've inherited a project from a co-worker who has left the company and a
request has been put into to ask new users to specify their race and
ethnicity when they register on our web site.

After doing a good deal of reading and experimenting I have the
questions displaying properly and the form submits with no exceptions.
The problem I have  is that my user model doesn't get updated with any
of the race or ethnicity selections.

 


Race and ethnicity are essentially handled the same way so to keep
things short I'll just post what I'm doing for the possible race
selections.

 


Here's my markup:



Select one or more races to
indicate what you consider yourself to be.

  

  



  

  Race Text

  



  



 


Here's my markup the code I have for setting up the relevant parts of
the form:

public NewAccountForm(final String id, CompoundPropertyModel userModel)

{   

  super(id, userModel);   

  


  /*

   * Set up a bunch of fields and validations

   */

 


// ADD RACE QUESTION

   String raceQuestion = fhDAO.getRaceQuestion();

   Label selectOneOrMoreRacesLabel = new
Label("selectOneOrMoreRaces", new Model(raceQuestion));

   add(selectOneOrMoreRacesLabel);




   CheckGroup racesCheckGroup = new CheckGroup("races");

   add(racesCheckGroup);

   ListView races = new ListView("raceGroup",
fhDAO.getRaceAnswers())

   {

   protected void populateItem(ListItem item)

   {

   RaceAnswer access = (RaceAnswer)item.getModelObject();

   CheckBox chk = new CheckBox("value", item.getModel());

   item.add(chk);

   item.add(new Label("racDesc", access.getDescription()));

   }

   };

   racesCheckGroup.add(races);

}

 


And finally, the relevant portions of my user model:

private ArrayList race;

 


public ArrayList getRaces()

{

  return race;

}




public void setRaces(ArrayList races)

{

  race = races;

}

 


My RaceAnswer model consists of getters and setters for the Value
property (String) and Description property (also a String).

 


If anyone is able to point out where I've gone wrong or just help me
with the proper way to bind an ArrayList to a CheckGroup I would be
forever grateful.

 


Thanks,

Matt


  



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



Re: tomcat session replication

2010-03-05 Thread Douglas Ferguson
I'm  considering a 0 downtime deployment but am concerned with the amount of 
state in the wicket session.

This is the scenario that concerns me.

1) There are 2 tomcats running
2) A change is made to a serializable object and the serial version id is 
updated
3) 1 tomcat instance is taken down for updating
4) tomcat instance comes back up with new object and now tries to update state 
from other tomcat and the wicket session has a reference to the old version of 
the serializable.

On Mar 5, 2010, at 12:18 PM, Igor Vaynberg wrote:

> yes
> 
> -igor
> 
> On Fri, Mar 5, 2010 at 10:02 AM, Douglas Ferguson
>  wrote:
>> Has anybody had success with wicket using tomcat's session replication?
>> 
>> D/
>> 
>> -
>> 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



Model Values Not Updating on Form Submit

2010-03-05 Thread Matthew Arck
Hey all,

 

Go easy on me here as I'm not only brand new to wicket but this is also
my first email to this user group!

 

I've inherited a project from a co-worker who has left the company and a
request has been put into to ask new users to specify their race and
ethnicity when they register on our web site.

After doing a good deal of reading and experimenting I have the
questions displaying properly and the form submits with no exceptions.
The problem I have  is that my user model doesn't get updated with any
of the race or ethnicity selections.

 

Race and ethnicity are essentially handled the same way so to keep
things short I'll just post what I'm doing for the possible race
selections.

 

Here's my markup:



Select one or more races to
indicate what you consider yourself to be.

  

  



  

  Race Text

  



  



 

Here's my markup the code I have for setting up the relevant parts of
the form:

public NewAccountForm(final String id, CompoundPropertyModel userModel)

{   

  super(id, userModel);   

  

  /*

   * Set up a bunch of fields and validations

   */

 

// ADD RACE QUESTION

   String raceQuestion = fhDAO.getRaceQuestion();

   Label selectOneOrMoreRacesLabel = new
Label("selectOneOrMoreRaces", new Model(raceQuestion));

   add(selectOneOrMoreRacesLabel);



   CheckGroup racesCheckGroup = new CheckGroup("races");

   add(racesCheckGroup);

   ListView races = new ListView("raceGroup",
fhDAO.getRaceAnswers())

   {

   protected void populateItem(ListItem item)

   {

   RaceAnswer access = (RaceAnswer)item.getModelObject();

   CheckBox chk = new CheckBox("value", item.getModel());

   item.add(chk);

   item.add(new Label("racDesc", access.getDescription()));

   }

   };

   racesCheckGroup.add(races);

}

 

And finally, the relevant portions of my user model:

private ArrayList race;

 

public ArrayList getRaces()

{

  return race;

}



public void setRaces(ArrayList races)

{

  race = races;

}

 

My RaceAnswer model consists of getters and setters for the Value
property (String) and Description property (also a String).

 

If anyone is able to point out where I've gone wrong or just help me
with the proper way to bind an ArrayList to a CheckGroup I would be
forever grateful.

 

Thanks,

Matt



Re: deployment problem

2010-03-05 Thread bonomat

ok, i removed my maven repository and then everything was downloaded again,
now i can start it with mvn jetty:start
but not jet with tomcat, 
i am not sure if this is right to start a wicket-app over maven.

-- 
View this message in context: 
http://old.nabble.com/deployment-problem-tp27797485p27797779.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: deployment problem

2010-03-05 Thread Edward Zarecor
Then there's probably another version of Spring on your classpath, perhaps
provided by Tomcat.  A case for jwhich.

Ed.

On Mar 5, 2010 1:48 PM, "bonomat"  wrote:


jes, it is in there i think: i found this one:
spring-core-3.0.1.RELEASE.jar

--
View this message in context:
http://old.nabble.com/deployment-problem-tp27797485p27797706.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: deployment problem

2010-03-05 Thread bonomat

jes, it is in there i think: i found this one:
spring-core-3.0.1.RELEASE.jar

-- 
View this message in context: 
http://old.nabble.com/deployment-problem-tp27797485p27797706.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: deployment problem

2010-03-05 Thread Riyad Kalla
bono,

Looks like some dependencies are missing from your WAR
===
***/server/DatabaseManager.java:[8,34] package
org.springframework.core.iodoes not exist
===

Can you grab the WAR, unzip it and check WEB-INF/lib and see if those libs
are in there? Might just be a packaging issue.

R

On Fri, Mar 5, 2010 at 11:25 AM, mööhmööh  wrote:

> Hi there,
>
> first of all, sorry for my bad English.
> I have problems with deploying my finished wicket-project.
> the situation: I can start it from the IDE eclipse without any problem,
> and on my Desktop i can run it from the console with : mvn jetty:run
> also without a problem.
> but then i tried to deploy it on my server, it is an Ubuntu-server, with
> Java(TM) SE Runtime Environment (build 1.6.0_15-b03)
> tomcat 6,
> i tried to copy the .war file into the webapp folder, and i tried to deploy
> it with
> the tomcat webapplication manager, there i get this error:
> FAIL - Application at context path /ase could not be started
> and i tried to run it from the console per ssh with "mvn jetty:run"
> here i get this error:
>
> b...@bono-server:~/click-a-
> ride/03-05-2010/ase$ mvn jetty:run
> [INFO] Scanning for projects...
> [INFO]
> 
> [INFO] Building quickstart
> [INFO]task-segment: [jetty:run]
> [INFO]
> 
> [INFO] Preparing jetty:run
> [INFO] [resources:resources {execution: default-resources}]
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 3 resources
> [INFO] Copying 81 resources
> [INFO] [compiler:compile {execution: default-compile}]
> [INFO] Compiling 176 source files to
> /home/bono/click-a-ride/03-05-2010/ase/target/classes
> [INFO]
> 
> [ERROR] BUILD FAILURE
> [INFO]
> 
> [INFO] Compilation failure
>
> ***/server/DatabaseManager.java:[8,34] package
> org.springframework.core.iodoes not exist
>
> ***/server/DatabaseManager.java:[65,2] cannot find symbol
> symbol  : class ClassPathResource
> location: class server.DatabaseManager
>
> ***/server/DatabaseManager.java:[65,30] cannot find symbol
> symbol  : class ClassPathResource
> location: class server.DatabaseManager
>
> ***/server/DatabaseManager.java:[66,31] cannot access
> org.springframework.core.io.DefaultResourceLoader
> class file for org.springframework.core.io.DefaultResourceLoader not found
>ApplicationContext context = new
> ClassPathXmlApplicationContext(DatabaseManager.SPRINGBEANS);
>
> ***/server/DatabaseManager.java:[70,23] cannot access
> org.springframework.core.SimpleAliasRegistry
> class file for org.springframework.core.SimpleAliasRegistry not found
>XmlBeanFactory xbf = new XmlBeanFactory(res);
>
> ***/server/DatabaseManager.java:[72,56] cannot access
> org.springframework.core.io.support.ResourcePatternResolver
> class file for org.springframework.core.io.support.ResourcePatternResolver
> not found
>DatabaseManager.daos.put("user", (AbstractDAO)
> context.getBean("UserDAO"));
>
> ***/dao/RatingDAO.java:[96,2] cannot access
> org.springframework.core.NestedRuntimeException
> class file for org.springframework.core.NestedRuntimeException not found
>try {
>
> [INFO]
> 
> [INFO] For more information, run Maven with the -e switch
> [INFO]
> 
> [INFO] Total time: 4 seconds
> [INFO] Finished at: Fri Mar 05 19:04:39 CET 2010
> [INFO] Final Memory: 26M/73M
> [INFO]
>
> i dont know what else i can trie, can you please help me?
>
> greetings bono
>


deployment problem

2010-03-05 Thread mööhmööh
Hi there,

first of all, sorry for my bad English.
I have problems with deploying my finished wicket-project.
the situation: I can start it from the IDE eclipse without any problem,
and on my Desktop i can run it from the console with : mvn jetty:run
also without a problem.
but then i tried to deploy it on my server, it is an Ubuntu-server, with
Java(TM) SE Runtime Environment (build 1.6.0_15-b03)
tomcat 6,
i tried to copy the .war file into the webapp folder, and i tried to deploy
it with
the tomcat webapplication manager, there i get this error:
FAIL - Application at context path /ase could not be started
and i tried to run it from the console per ssh with "mvn jetty:run"
here i get this error:

b...@bono-server:~/click-a-
ride/03-05-2010/ase$ mvn jetty:run
[INFO] Scanning for projects...
[INFO]

[INFO] Building quickstart
[INFO]task-segment: [jetty:run]
[INFO]

[INFO] Preparing jetty:run
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO] Copying 81 resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 176 source files to
/home/bono/click-a-ride/03-05-2010/ase/target/classes
[INFO]

[ERROR] BUILD FAILURE
[INFO]

[INFO] Compilation failure

***/server/DatabaseManager.java:[8,34] package
org.springframework.core.iodoes not exist

***/server/DatabaseManager.java:[65,2] cannot find symbol
symbol  : class ClassPathResource
location: class server.DatabaseManager

***/server/DatabaseManager.java:[65,30] cannot find symbol
symbol  : class ClassPathResource
location: class server.DatabaseManager

***/server/DatabaseManager.java:[66,31] cannot access
org.springframework.core.io.DefaultResourceLoader
class file for org.springframework.core.io.DefaultResourceLoader not found
ApplicationContext context = new
ClassPathXmlApplicationContext(DatabaseManager.SPRINGBEANS);

***/server/DatabaseManager.java:[70,23] cannot access
org.springframework.core.SimpleAliasRegistry
class file for org.springframework.core.SimpleAliasRegistry not found
XmlBeanFactory xbf = new XmlBeanFactory(res);

***/server/DatabaseManager.java:[72,56] cannot access
org.springframework.core.io.support.ResourcePatternResolver
class file for org.springframework.core.io.support.ResourcePatternResolver
not found
DatabaseManager.daos.put("user", (AbstractDAO)
context.getBean("UserDAO"));

***/dao/RatingDAO.java:[96,2] cannot access
org.springframework.core.NestedRuntimeException
class file for org.springframework.core.NestedRuntimeException not found
try {

[INFO]

[INFO] For more information, run Maven with the -e switch
[INFO]

[INFO] Total time: 4 seconds
[INFO] Finished at: Fri Mar 05 19:04:39 CET 2010
[INFO] Final Memory: 26M/73M
[INFO]

i dont know what else i can trie, can you please help me?

greetings bono


Re: URL pattern /app/* does not work for Wicket 1.4.6 and WebSphere 6.1

2010-03-05 Thread shetc

I have a Panel that is a copy of the
org.apache.wicket.authentication.panel.SignInPanel class
from wicket-auth-roles-1.4.7.jar. The onSubmit code is the same:

@Override
public final void onSubmit()
{
if (signIn(getUsername(), getPassword()))
{
onSignInSucceeded();
}
else
{
onSignInFailed();
}
}



-- 
View this message in context: 
http://old.nabble.com/URL-pattern--app-*-does-not-work-for-Wicket-1.4.6-and-WebSphere-6.1-tp27794134p27797456.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: tomcat session replication

2010-03-05 Thread Igor Vaynberg
yes

-igor

On Fri, Mar 5, 2010 at 10:02 AM, Douglas Ferguson
 wrote:
> Has anybody had success with wicket using tomcat's session replication?
>
> D/
>
> -
> 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: Client side events in Wicket, what do you think about that?

2010-03-05 Thread Igor Vaynberg
sounds like you want to rewrite gwt but using wicket model for
handling markup instead of layout manages which is what gwt uses. it
is probably much easier to write a library for gwt that implements the
wicket markup model rather then the other way around...

-igor

On Fri, Mar 5, 2010 at 2:23 AM, Vladimir Kovalyuk  wrote:
> Some thought ...
>
> Last week I thought a bit about reacting on events without client-server
> round-trip and without having to write JS. I had an idea - to write event
> handlers as methods and annotate them with special annotation
> @ClientSideEvent. Then feeding the class to the Java-JS compiler we would
> obtain the JS we need to embed into the page. And something similar about
> component model - properties annotated with @ClientSide would be available
> to client-side events (and marshalled to the server as path scoped cookies
> for instance).
> To start experiment with that I downloaded GWT 2 devkit and had a look to
> their compiler. Unfortunately it is not capable to compile single class into
> JS. It requires a bunch of configuration and core infrastructure and it
> always generates HTML. The class of your interest would be the inlined JS
> script within the generated HTML. That does not suits. And BTW gwt compiler
> is slow as hell (minutes!!!), how people are happy developing GWT
> applications?
>
> Then I realized what I'm looking for - the decompiler from .class file to
> .js file with some filtering capabilities.
> Having such a tool it becomes possible to add dynamically decompiled .js
> resources to the components (js accessible via URLs) and write client-side
> state in Java, along with server-side state. All we would need to implement
> are client side context and client-state marshalling.
>
> Although it seems doable I'm afraid it may be extremely expensive to develop
> and support such a tool. And it would require some changes in Wicket
> rendering process (opeate with attributes in dom manner instead of handling
> onComponent rendering event).
>
> The next generation of HTML/JS would evolve towards client programming
> capabilities. I like Wicket for its full freedom of HTML (contrary to GWT)
> and I would like to use similar model when programming rich web client
> applications. And it is less about the Wicket way of splitting html and
> java. It is more about binding to dynamically loadable data with any deep of
> structure displayed on users demand. The GWT way would require to program it
> in any way when Wicket does it transparently. Another story is authorization
> that can be done transparently. But web development evolves and client side
> programming becomes more and more demanded. I tried to think about how
> technically we could use the best of both worlds.
>
> What do you think about all that?
>

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



tomcat session replication

2010-03-05 Thread Douglas Ferguson
Has anybody had success with wicket using tomcat's session replication?

D/

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



Ajax ModalWindow - passing value *in*?

2010-03-05 Thread VGJ
I'm using the ModalWindow for the first time (1.4) and am wondering if a
value can be passed into the modal window from the AjaxLink?

I've got a page full of anchor links and I'd like to jump to the anchors
inside of a modal page, depending on which link was clicked in the master
page.


Re: Client side events in Wicket, what do you think about that?

2010-03-05 Thread Jeremy Thomerson
While I don't personally like the proposal (only meaning I'm not likely to
use it unless I see a really great usecase for it)...  You may look at using
DWR to help you with some of that stuff.  It allows you to make service
methods available directly in JavaScript, for example.

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



On Fri, Mar 5, 2010 at 4:23 AM, Vladimir Kovalyuk wrote:

> Some thought ...
>
> Last week I thought a bit about reacting on events without client-server
> round-trip and without having to write JS. I had an idea - to write event
> handlers as methods and annotate them with special annotation
> @ClientSideEvent. Then feeding the class to the Java-JS compiler we would
> obtain the JS we need to embed into the page. And something similar about
> component model - properties annotated with @ClientSide would be available
> to client-side events (and marshalled to the server as path scoped cookies
> for instance).
> To start experiment with that I downloaded GWT 2 devkit and had a look to
> their compiler. Unfortunately it is not capable to compile single class
> into
> JS. It requires a bunch of configuration and core infrastructure and it
> always generates HTML. The class of your interest would be the inlined JS
> script within the generated HTML. That does not suits. And BTW gwt compiler
> is slow as hell (minutes!!!), how people are happy developing GWT
> applications?
>
> Then I realized what I'm looking for - the decompiler from .class file to
> .js file with some filtering capabilities.
> Having such a tool it becomes possible to add dynamically decompiled .js
> resources to the components (js accessible via URLs) and write client-side
> state in Java, along with server-side state. All we would need to implement
> are client side context and client-state marshalling.
>
> Although it seems doable I'm afraid it may be extremely expensive to
> develop
> and support such a tool. And it would require some changes in Wicket
> rendering process (opeate with attributes in dom manner instead of handling
> onComponent rendering event).
>
> The next generation of HTML/JS would evolve towards client programming
> capabilities. I like Wicket for its full freedom of HTML (contrary to GWT)
> and I would like to use similar model when programming rich web client
> applications. And it is less about the Wicket way of splitting html and
> java. It is more about binding to dynamically loadable data with any deep
> of
> structure displayed on users demand. The GWT way would require to program
> it
> in any way when Wicket does it transparently. Another story is
> authorization
> that can be done transparently. But web development evolves and client side
> programming becomes more and more demanded. I tried to think about how
> technically we could use the best of both worlds.
>
> What do you think about all that?
>


Re: TinyMCE components in WicketStuff

2010-03-05 Thread Igor Vaynberg
there is a jira instance on wicketstuff where you can report bugs.
however, i dont think the project is maintained so most likely no one
will pay attention to the jira entry.

if you would like to take over the maintenance we can grant you svn access.

-igor

On Fri, Mar 5, 2010 at 9:13 AM, Boris Goldowsky  wrote:
> Just curious, is the TinyMCE wicketstuff project abandoned, or are there
> plans to update it?
> It's using a version of TinyMCE from 2008.
>
> If we updated it, is there someone that we should send patches to?
>
> Boris
>
>
> -
> 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



TinyMCE components in WicketStuff

2010-03-05 Thread Boris Goldowsky
Just curious, is the TinyMCE wicketstuff project abandoned, or are there 
plans to update it?

It's using a version of TinyMCE from 2008.

If we updated it, is there someone that we should send patches to?

Boris


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



Re: Calendar bug in Wicket 1.4.7

2010-03-05 Thread Igor Vaynberg
please open a new bug.

-igor

On Fri, Mar 5, 2010 at 8:12 AM, Giovanni  wrote:
> I added the following comment to the bug #WICKET-2648.
>
> I don't know if I have to register a new bug or it is enough just a comment 
> on the old bug.
>
> Please, let me know.
>
> Regards,
> giovanni
>
>
> Giovanni added a comment  - 05/Mar/10
> 04:03 PM
>
> I found that there is still a bug in Wicket 1.4.7 in case that the 
> datePattern is "dd/MM/".
>
> For example, if you use the DatePicker and select a date such as
> 23/02/2010 from the calendar GUI, the date selected in the DateTextField is 
> "23/02/0010".
>
> This is the example Java code:
>
>                // define the date text field for the data decorrenza
>                DateTextField dataDecorrenzaDaTextField = new
> DateTextField("dataDecorrenzaDa",
>                        new PropertyModel(this.accordo, "dataDecorrenzaDa"),
>                        new PatternDateConverter("dd/MM/", true)
>                );
>
>                // add the graphical calendar date picker
>                 dataDecorrenzaDaTextField.add(new DatePicker() {
>
>                       �...@override
>                        protected boolean enableMonthYearSelection() {
>
>                            // enable month/year selection
>                             return true;
>
>                        } // end enableMonthYearSelection
>
>                    } // end DatePicker
>
>                );
>
> I found that the bug is still in the "wicket-date.js", line 137.
>
> The wrong code is:
>
> if(datePattern.match(/yy+/)) year = Wicket.DateTime.padDateFragment(year % 
> 100);
>
> This line also makes the module 100 on the year, when the year pattern
> is "".
>
> The fixed code is:
>
> if(datePattern.match(/+/)) {
>    year = year;
> } else if(datePattern.match(/yy+/)) year =
> Wicket.DateTime.padDateFragment(year % 100);
>
>
>

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



Re: Problem with onComponentTag in a ListView

2010-03-05 Thread Igor Vaynberg
see Select and SelectOption and SelectOptions components

-igor

On Fri, Mar 5, 2010 at 6:30 AM, Torben Berger  wrote:
> Hi,
> I'm trying to write a dynamic Select with optgroups.
>
> Therefore I've got a ListView where I want to set the label of the optgroup 
> with the onComponentTag method.
> Everything is working except of setting this label.  The onComponentTag 
> method is never called.
>
> Maybe someone can give me a hint how to resolve this problem. What am I doing 
> wrong?
>
> This is my Select:
>
> private Select = new Select("select", new PropertyModel(this, 
> "selectedOption"));
>
> ListView> optGroups = new ListView>("optGroups", 
> groups) {
>
>           �...@override
>            protected void populateItem(ListItem> item) {
>                item.add(new SelectOptions("options", new 
> ArrayList(item.getModelObject()), renderer));
>            }
>
>           �...@override
>            protected void onComponentTag(final ComponentTag tag) {
>                super.onComponentTag(tag);
>                tag.put("label", "Foo");
>            }
>        };
>        select.add(optGroups);
>
>        add(select);
>
> And the markup:
>
> 
>  
>    
>      
>    
>  
> 
>
>
> Best regards,
> Torben
>
>
> --
> GMX DSL: Internet, Telefon und Entertainment für nur 19,99 EUR/mtl.!
> http://portal.gmx.net/de/go/dsl02
>
> -
> 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: Only render javascript once per request?

2010-03-05 Thread Igor Vaynberg
first call renderjavascript("var="+array, "some unique id");
then call to render the javascript that uses the array

wicket will filter contributions by the "some unique id" and only the
first one will be rendered.

the second part is caching your db call. you can retrieve the db list
and store it in requestcycle's metadata as a request-scoped cache.

-igor


On Fri, Mar 5, 2010 at 1:44 AM, Wayne Pope
 wrote:
> Hi,
>
> I been looking how to solve this and I cannot see a clear way.
>
> Basically in a given page we have a list of TextField derived classes
> that use a JQuery auto complete.
> This means for each textfield rendered on the page we render in the
> head something like:
>
> $(document).ready(function(){var data = ['Sitemap', 'vbmbmnvbmn',
> 'second', 'communications', 'test', 'Wayne', 'Wireframes', 'fook',
> 'business case', 'Logos', 'round 1', 'layout', 'Marketing', 'new one',
> 'graphics', 'hot stuff', 'Accounts', 'Template'];
> $('#labels390').autocomplete(data,  { multiple: true,
> multipleSeparator: ', ', scroll: true, scrollHeight: 300 })})
>
> $(document).ready(function(){var data = ['Sitemap', 'vbmbmnvbmn',
> 'second', 'communications', 'test', 'Wayne', 'Wireframes', 'fook',
> 'business case', 'Logos', 'round 1', 'layout', 'Marketing', 'new one',
> 'graphics', 'hot stuff', 'Accounts', 'Template'];
> $('#labels391').autocomplete(data,  { multiple: true,
> multipleSeparator: ', ', scroll: true, scrollHeight: 300 })})
>
> $(document).ready(function(){var data = ['Sitemap', 'vbmbmnvbmn',
> 'second', 'communications', 'test', 'Wayne', 'Wireframes', 'fook',
> 'business case', 'Logos', 'round 1', 'layout', 'Marketing', 'new one',
> 'graphics', 'hot stuff', 'Accounts', 'Template'];
> $('#labels392').autocomplete(data,  { multiple: true,
> multipleSeparator: ', ', scroll: true, scrollHeight: 300 })})
>
> etc..
>
>
> As you can clearly see this isn't too efficient and I want to set the
> data array only once and then attach the autocomplete to the textfield
> and the data.
>
> In the renderhead of the textfield derived class is there anyway to
> somehow only render the data part once per request? (this also
> massively reduces the db calls to create the list!)
>
> thanks for any pointers
> Wayne
>
> -
> 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



OnlyTargetActivePage Question

2010-03-05 Thread David Skuben
Hi everybody,

I'm now looking in classes AbstractAjaxBehavior and
AbstractDefaultAjaxBehavior.
There are two similar methods: getCallbackUrl() and getCallbackScript() and
I don't understand why
first set onlyTargetActivePage to  "true" and second to "false". Is it right
?

If someone know about that, please let me know.
Thanks a lot.
Dave

AbstractAjaxBehavior:
public CharSequence getCallbackUrl()
{
return getCallbackUrl(true);
}

AbstractDefaultAjaxBehavior:
protected CharSequence getCallbackScript()
{
return getCallbackScript(false);
}


LegUp: Scala/Wicket

2010-03-05 Thread Cemal A Bayramoglu
We have just released a new LegUp [1] that creates a Scala (2.8Beta1)
with Wicket (1.4.7) project (no Java code).
This LegUp includes a simplistic example of a safe yet dynamic model
too, to get you started if you are new to Scala.

I usually import the POM into IntelliJ or Eclipse, both of which have
gradually improving Scala 2.8 plugins.

Keep in mind that even though we have been well and truly sucked in by
Scala's elegance, efficiency and general smartness, we are still quite
new at it, so suggested improvements are very welcome [2].

Jan Kriesten, Dean Pehrsson-Chapman, Daan van Etten & Antony Stubbs,
amongst others, from our London Wicket Events, have also also
experimenting with Wicket and Scala, some of them also using this very
nice combination on commercial projects. You can find related
presentations at [3].

All our other Wicket dependent "LegUp"s have been upgraded to use 1.4.7.

Regards - Cemal
jWeekend
OO & Java Technologies, Wicket
Consulting, Development, Training
http://jWeekend.com

[1] http://jweekend.com/dev/LegUp
[2] http://code.google.com/p/legup/
[3] see the downloads area at  http://code.google.com/p/londonwicket/

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



Re: URL pattern /app/* does not work for Wicket 1.4.6 and WebSphere 6.1

2010-03-05 Thread Riyad Kalla
Steve,

So your context-root is /JobCenter and the URL mapping /app/* -- and after
submitting the form WebSphere(?) is redirecting to the server's root, not
even to /JobCenter?

I can't think of a case where WebSphere wouldn't honor the context root
atleast unless you are returning a redirect from the form in Wicket that is
incorrect? What does that onSubmit code look like?

-R

On Fri, Mar 5, 2010 at 9:19 AM, shetc  wrote:

>
> Just did by coincidence -- the issue still exists.
> --
> View this message in context:
> http://old.nabble.com/URL-pattern--app-*-does-not-work-for-Wicket-1.4.6-and-WebSphere-6.1-tp27794134p27795999.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: URL pattern /app/* does not work for Wicket 1.4.6 and WebSphere 6.1

2010-03-05 Thread shetc

Just did by coincidence -- the issue still exists.
-- 
View this message in context: 
http://old.nabble.com/URL-pattern--app-*-does-not-work-for-Wicket-1.4.6-and-WebSphere-6.1-tp27794134p27795999.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



Calendar bug in Wicket 1.4.7

2010-03-05 Thread Giovanni
I added the following comment to the bug #WICKET-2648.

I don't know if I have to register a new bug or it is enough just a comment on 
the old bug.

Please, let me know.

Regards,
giovanni


Giovanni added a comment  - 05/Mar/10 
04:03 PM 

I found that there is still a bug in Wicket 1.4.7 in case that the datePattern 
is "dd/MM/". 

For example, if you use the DatePicker and select a date such as 
23/02/2010 from the calendar GUI, the date selected in the DateTextField is 
"23/02/0010". 

This is the example Java code: 

// define the date text field for the data decorrenza 
DateTextField dataDecorrenzaDaTextField = new 
DateTextField("dataDecorrenzaDa", 
new PropertyModel(this.accordo, "dataDecorrenzaDa"), 
new PatternDateConverter("dd/MM/", true) 
); 

// add the graphical calendar date picker 
 dataDecorrenzaDaTextField.add(new DatePicker() { 

@Override 
protected boolean enableMonthYearSelection() { 
   
// enable month/year selection 
 return true; 

} // end enableMonthYearSelection 

} // end DatePicker 

); 

I found that the bug is still in the "wicket-date.js", line 137. 

The wrong code is: 

if(datePattern.match(/yy+/)) year = Wicket.DateTime.padDateFragment(year % 
100); 

This line also makes the module 100 on the year, when the year pattern 
is "". 

The fixed code is: 

if(datePattern.match(/+/)) { 
year = year; 
} else if(datePattern.match(/yy+/)) year = 
Wicket.DateTime.padDateFragment(year % 100); 


  

Re: URL pattern /app/* does not work for Wicket 1.4.6 and WebSphere 6.1

2010-03-05 Thread Riyad Kalla
Steve,

Can you upgrade to 1.4.7 (was announced yesterday) and see if the issue
persists?

-Riyad

On Fri, Mar 5, 2010 at 6:53 AM, Steve Hiller  wrote:

> Hi All,
>
> I am working on my first Wicket app that uses the 1.4 branch instead of
> 1.3.
> As usual, this app will be deployed to WebSphere 6.1.
>
> For the 1.4 project, I have found that I still need to use a Wicket servlet
> instead of a filter in order to get to work with WebSphere 6.1
> (even though I have set
> com.ibm.ws.webcontainer.invokefilterscompatibility=true).
> As in the previous apps, the Wicket servlet mapping uses a url-pattern set
> to /app/*.
> And, as in the previous apps, the Wicket application class inherits from
> AuthenticatedWebApplication.
>
> In this latest app, I have found that I cannot use the url-pattern set to
> /app/*.
> The authentication redirection to the Sign-In page works, and has this URL:
>
> https://localsecure.spherion.com/JobCenter/app/signin
>
> But when I submit the Sign-in page form, I receive the following message
> from WebSphere:
>
> SRVE0255E: A WebGroup/Virtual Host to handle / has not been defined.
>
> This happens because the URL is missing the context root and /app/*:
>
> https://localsecure.spherion.com/?wicket:interface=:4
>
> However, when I use an url-pattern set to /* then the form submit works
> with a URL like:
>
> https://localsecure.spherion.com/JobCenter/?wicket:interface=:0
>
> where the context root is still present.
>
> Am I doing something wrong here?
>
> Thanks,
> Steve
>


Re: how to get domain name

2010-03-05 Thread Gw
Thx, folks.
Helped a lot...
Good day...

On Thu, Mar 4, 2010 at 10:04 AM, Jeremy Thomerson
 wrote:
> from the httpservletrequest
>
> http://www.jguru.com/faq/view.jsp?EID=734942
>
> note that if you use mod_proxy with apache, this may not work
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
> On Thu, Mar 4, 2010 at 12:01 PM, Gw  wrote:
>
>> Hi all,
>>
>> I've searched around to no avail for an example on how to get the
>> domain name of the server where the wicket application runs on.
>> Can anybody help with this?
>> Lots of thanks in advance
>>
>> Regards,
>>
>> Mike
>>
>> -
>> 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: Model Comparator

2010-03-05 Thread Xavier López
There was an error in the code I provided. When the original modelObject is
null and the checkbox is not checked, it should return true, and not false,
in order to consider the model has not changed. Comments are welcome !

if (currentValue == null && !Strings.isTrue(component.
>
> getConverter(compareValue.getClass()).convertToString(compareValue,
> component.getLocale({
> return *true*;
> }


Thanks,
Xavier

2010/3/5 Xavier López 

> Hi,
>
> I have a checkbox. The checkbox's Model is a PropertyModel, on a property
> that can be either a Boolean or a String, with values {S, N}. And I want to
> set the user and date in which the checkbox's model has changed, in order to
> provide traceability. The checkbox is using an implementation of IConverter
> when it's about Strings and the standard BooleanConverter otherwise.
>
> Now, the problem is, the value with which the checkbox is initialized *can*
> be null, if it has never been set. So, I can not rely on implementing
> 'onModelChanged()' because it will always fire the first time (in fact,
> having null value would be the same as having negative value as far as this
> requirement is concerned)
>
> I've tried different approaches, and I finally came up with the one that
> seems more logical to me, as it is close to a translation of what I've
> stated before. I'm overriding onModelChanged(), and implementing a custom
> IModelComparator, so that onModelChanged does not fire when changing value
> from null to 'nonselected'.
>
> Here follows the implementation. My question is, can't my custom comparison
> be implemented in a simpler way ? I can't get component.getInput(), because
> it's only a Component. And I'd not like to implement a util method to return
> a boolean from the ModelObject, doing instanceof's...
>
> Maybe I'm asking too much :-)
>
>
> public boolean compare(Component component, Object compareValue)
> {
> final Object currentValue = component.getModelObject();
> if (currentValue == null && compareValue == null) {
> return true;
> }
> if (currentValue == null || compareValue == null) {
> return false;
> }
>
> // MY CUSTOM COMPARISON: Null value equals not checking the
> checkbox
> if (currentValue == null &&
> !Strings.isTrue(component.getConverter(compareValue.getClass()).convertToString(compareValue,
> component.getLocale({
> return false;
> }
> else{
> return currentValue.equals(compareValue);
> }
> }
>
>
> Thanks ! feel free to comment :-)
>


Problem with onComponentTag in a ListView

2010-03-05 Thread Torben Berger
Hi,
I'm trying to write a dynamic Select with optgroups.

Therefore I've got a ListView where I want to set the label of the optgroup 
with the onComponentTag method.
Everything is working except of setting this label.  The onComponentTag method 
is never called.

Maybe someone can give me a hint how to resolve this problem. What am I doing 
wrong?

This is my Select:

private Select = new Select("select", new PropertyModel(this, 
"selectedOption"));

ListView> optGroups = new ListView>("optGroups", 
groups) {

@Override
protected void populateItem(ListItem> item) {
item.add(new SelectOptions("options", new 
ArrayList(item.getModelObject()), renderer));
}

@Override
protected void onComponentTag(final ComponentTag tag) {
super.onComponentTag(tag);
tag.put("label", "Foo");
}
};
select.add(optGroups);

add(select);

And the markup:


  

  

  



Best regards,
Torben


-- 
GMX DSL: Internet, Telefon und Entertainment für nur 19,99 EUR/mtl.!
http://portal.gmx.net/de/go/dsl02

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



Re: mod_proxy + ssl + HttpsRequestCycleProcessor

2010-03-05 Thread Istvan Soos
The solution seems to be an extra header with the mod_header module
and an extra filter before the wicket filter. With the later we can
check the extra header, and overwrite the scheme to "https" if the
header is present. Seems to be working for now...

Regards,
   Istvan

On Thu, Mar 4, 2010 at 6:04 PM, Istvan Soos  wrote:
> Hi,
>
> We are using HttpsRequestCycleProcessor + @RequireHttps annotation in
> our local dev environment (the server is a jetty executed directly
> from Eclipse). In the production environment, we have Apache +
> mod_proxy, and I'd prefer if Apache could handle the SSL part (in that
> case we are not required to configure SSL on the application server -
> glassfish v3). Is there any best practice how to achieve this?
>
> Thanks and regards,
>   Istvan
>

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



Model Comparator

2010-03-05 Thread Xavier López
Hi,

I have a checkbox. The checkbox's Model is a PropertyModel, on a property
that can be either a Boolean or a String, with values {S, N}. And I want to
set the user and date in which the checkbox's model has changed, in order to
provide traceability. The checkbox is using an implementation of IConverter
when it's about Strings and the standard BooleanConverter otherwise.

Now, the problem is, the value with which the checkbox is initialized *can*
be null, if it has never been set. So, I can not rely on implementing
'onModelChanged()' because it will always fire the first time (in fact,
having null value would be the same as having negative value as far as this
requirement is concerned)

I've tried different approaches, and I finally came up with the one that
seems more logical to me, as it is close to a translation of what I've
stated before. I'm overriding onModelChanged(), and implementing a custom
IModelComparator, so that onModelChanged does not fire when changing value
from null to 'nonselected'.

Here follows the implementation. My question is, can't my custom comparison
be implemented in a simpler way ? I can't get component.getInput(), because
it's only a Component. And I'd not like to implement a util method to return
a boolean from the ModelObject, doing instanceof's...

Maybe I'm asking too much :-)


public boolean compare(Component component, Object compareValue)
{
final Object currentValue = component.getModelObject();
if (currentValue == null && compareValue == null) {
return true;
}
if (currentValue == null || compareValue == null) {
return false;
}

// MY CUSTOM COMPARISON: Null value equals not checking the
checkbox
if (currentValue == null &&
!Strings.isTrue(component.getConverter(compareValue.getClass()).convertToString(compareValue,
component.getLocale({
return false;
}
else{
return currentValue.equals(compareValue);
}
}


Thanks ! feel free to comment :-)


Re: LegUp for wiQuery

2010-03-05 Thread shetc

Thanks Nino -- I'll check it out.
-- 
View this message in context: 
http://old.nabble.com/LegUp-for-wiQuery-tp27771785p27794146.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



URL pattern /app/* does not work for Wicket 1.4.6 and WebSphere 6.1

2010-03-05 Thread Steve Hiller
Hi All,

I am working on my first Wicket app that uses the 1.4 branch instead of 1.3.
As usual, this app will be deployed to WebSphere 6.1.

For the 1.4 project, I have found that I still need to use a Wicket servlet 
instead of a filter in order to get to work with WebSphere 6.1
(even though I have set 
com.ibm.ws.webcontainer.invokefilterscompatibility=true).
As in the previous apps, the Wicket servlet mapping uses a url-pattern set to 
/app/*.
And, as in the previous apps, the Wicket application class inherits from 
AuthenticatedWebApplication.

In this latest app, I have found that I cannot use the url-pattern set to 
/app/*.
The authentication redirection to the Sign-In page works, and has this URL:

https://localsecure.spherion.com/JobCenter/app/signin

But when I submit the Sign-in page form, I receive the following message from 
WebSphere:

SRVE0255E: A WebGroup/Virtual Host to handle / has not been defined.

This happens because the URL is missing the context root and /app/*:

https://localsecure.spherion.com/?wicket:interface=:4

However, when I use an url-pattern set to /* then the form submit works with a 
URL like:

https://localsecure.spherion.com/JobCenter/?wicket:interface=:0

where the context root is still present.

Am I doing something wrong here?

Thanks,
Steve


Re: LegUp for wiQuery

2010-03-05 Thread nino martinez wael
check this site to see if it's working in ie:

wheresmyevent.com

you can try to run http://browsershots.org/ on it if wanting to see a larger
spread of browsers :)

2010/3/5 nino martinez wael 

> Theres also wicketstuff artwork, round corners in ie 6 :)
>
> 2010/3/4 shetc 
>
>
>> I guess this is an off-topic question. I want to use wiQuery and jquery UI
>> in
>> the current
>> Wicket-based app that I am working on. This will be a public-facing app
>> that
>> needs to support
>> IE6 and upwards. However, the rounded corners used for many of the jquery
>> UI
>> widgets does
>> not work in IE -- jquery UI uses CSS 3 specs, which is not supported in
>> IE.
>> Have you had any
>> success in creating rounded corners for apps that use wiQuery and are
>> displayed in IE?
>>
>> Thanks!
>> --
>> View this message in context:
>> http://old.nabble.com/LegUp-for-wiQuery-tp27771785p27781171.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: LegUp for wiQuery

2010-03-05 Thread nino martinez wael
Theres also wicketstuff artwork, round corners in ie 6 :)

2010/3/4 shetc 

>
> I guess this is an off-topic question. I want to use wiQuery and jquery UI
> in
> the current
> Wicket-based app that I am working on. This will be a public-facing app
> that
> needs to support
> IE6 and upwards. However, the rounded corners used for many of the jquery
> UI
> widgets does
> not work in IE -- jquery UI uses CSS 3 specs, which is not supported in IE.
> Have you had any
> success in creating rounded corners for apps that use wiQuery and are
> displayed in IE?
>
> Thanks!
> --
> View this message in context:
> http://old.nabble.com/LegUp-for-wiQuery-tp27771785p27781171.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
>
>


ModalWindow and Multipart request

2010-03-05 Thread Alexander Monakhov
Hi, guys.

I'm developing a form that allows user to upload file and then shows message
in modal window.
Modal window appears the same time user pushes upload button and shows busy
indicator. When file is uploaded,
modal window shows status message.

This approach works fine for single requests (not multipart). But with
multipart requests modal window behaves in strange way.
In doesn't show any content. For busy indicator I'm using AjaxLazyLoadPanel.
It has getLazyLoadComponent() method that is
invoked when modal window is shown. But, when multipart request is passed,
this method isn't invoked.

Could you give my any ideas where is problem?

Best regards, Alexander.


Re: UI Layout

2010-03-05 Thread nino martinez wael
+1 for multiple page + abstract base page..

2010/2/26 Frank Silbermann 

> Single page versus multi-page application?
>
>
>
> Some people build a single-page application in which panels are replaced
> dynamically.  With this approach, the single page is analogous to a
> Swing JFrame, to whom components are added and removed (or made visible
> or invisible as needed).
>
>
>
> Many people prefer to have separate pages for different functionality --
> and this is necessary if the user is to be able to bookmark several
> different pages.  To do this, many people use markup inheritance, in
> which sub-pages inherit from the base page, and the sub-page mark-up is
> combined with the base-page mark-up.  (Though it is to be generalized in
> the future, I believe currently there can be only a single place in the
> base page where the sub-page's components can go.)
>
>
>
>
>
> I prefer to use a base page which contains one or more panels to be
> defined by the sub-pages, via abstract panel-creation methods called by
> the base page.  However, Wicket convention is to add components in the
> page constructor, and calling an overridden method from a constructor is
> bad.  (The overridden method will not be able to use anything set up in
> the sub-page's constructor, due to the order in which constructors are
> called.)  I solve this problem by making my base pages inherit from the
> following:
>
>
>
> public class DelayedAssemblyWebPage extends WebPage {
>
>protected boolean componentsAssembled = false;
>
>
>
>@Override
>
>protected void onBeforeRender() {
>
>if ( !componentsAssembled ) {
>
>try {
>
>assembleComponents();
>
>componentsAssembled = true;
>
>} catch (Exception e) {
>
>throw new RuntimeException(e);
>
>}
>
>}
>
>super.onBeforeRender();
>
>}
>
>
>
>abstract protected void assembleComponents() throws Exception {}
>
> }
>
>
>
> So my application base page would look something like this:
>
>
>
> public class MyApplicationBasePage extends DelayedAssemblyWebPage {
>
>
>protected void assembleComponents() throws Exception {
>
>// Add some components.
>
>// Panels to be defined in subclasses are added
>
>// by calling:
>
>//
>
>// add( createPanel_A("a_wicket_id") );
>
>//
>
>// and
>
>//
>
>// add( createPanel_B("some_other_wicket_id") );
>
>}
>
>
>
>abstract protected Panel createPanel_A( String panelWicketID );
>
>abstract protected Panel createPanel_B( String panelWicketID );
>
> }
>
>
>
> Concrete child pages would look something like this:
>
>
>
> public class OneConcreteChildPage extends MyApplicationBasePage {
>
>
>
>protected Panel createPanel_A( String panelWicketID ) {
>
> return new WhateverPanel(panelWicketID,...);
>
>}
>
>protected Panel createPanel_B( String panelWicketID ) {
>
> return new SomeOtherPanelType(panelWicketID, ...);
>
>}
>
> }
>
>
>
> This can be generalized in that the application base page can have
> however many component-defining abstract methods you please.
> Furthermore, one can generalize this to a page hierarchy of any depth,
> since a semi-base page can define additional abstract methods to be
> called by its implementation of createPanel_A() or createPanel_B().
>
>
>
> -Frank
>
>
>
> -Original Message-
> From: nino martinez wael [mailto:nino.martinez.w...@gmail.com]
> Sent: Friday, February 26, 2010 7:50 AM
> To: users@wicket.apache.org
> Subject: Re: UI Layout
>
>
>
> For me it seems it would very confusing if I only had one page. I'd
> prefer
>
> pages that are target against their specific functionality, keeping code
>
> simpler. I'd still be using panels though, giving the benefit of ajax,
> role
>
> base plus all the other stuff.
>
>
>
> my 2 centavos
>
> -Nino
>
>
>
> 2010/2/26 Josh Kamau 
>
>
>
> > Wicket offers high level of flexibility when it comes to page layout.
> So i
>
> > ask, what are the best practices? is it ok if i use panels only and
> one
>
> > main
>
> > layout page?
>
> >
>
> > Kind regards
>
> >
>
> > Josh.
>
> >
>
>


Client side events in Wicket, what do you think about that?

2010-03-05 Thread Vladimir Kovalyuk
Some thought ...

Last week I thought a bit about reacting on events without client-server
round-trip and without having to write JS. I had an idea - to write event
handlers as methods and annotate them with special annotation
@ClientSideEvent. Then feeding the class to the Java-JS compiler we would
obtain the JS we need to embed into the page. And something similar about
component model - properties annotated with @ClientSide would be available
to client-side events (and marshalled to the server as path scoped cookies
for instance).
To start experiment with that I downloaded GWT 2 devkit and had a look to
their compiler. Unfortunately it is not capable to compile single class into
JS. It requires a bunch of configuration and core infrastructure and it
always generates HTML. The class of your interest would be the inlined JS
script within the generated HTML. That does not suits. And BTW gwt compiler
is slow as hell (minutes!!!), how people are happy developing GWT
applications?

Then I realized what I'm looking for - the decompiler from .class file to
.js file with some filtering capabilities.
Having such a tool it becomes possible to add dynamically decompiled .js
resources to the components (js accessible via URLs) and write client-side
state in Java, along with server-side state. All we would need to implement
are client side context and client-state marshalling.

Although it seems doable I'm afraid it may be extremely expensive to develop
and support such a tool. And it would require some changes in Wicket
rendering process (opeate with attributes in dom manner instead of handling
onComponent rendering event).

The next generation of HTML/JS would evolve towards client programming
capabilities. I like Wicket for its full freedom of HTML (contrary to GWT)
and I would like to use similar model when programming rich web client
applications. And it is less about the Wicket way of splitting html and
java. It is more about binding to dynamically loadable data with any deep of
structure displayed on users demand. The GWT way would require to program it
in any way when Wicket does it transparently. Another story is authorization
that can be done transparently. But web development evolves and client side
programming becomes more and more demanded. I tried to think about how
technically we could use the best of both worlds.

What do you think about all that?


Re: Wicket 1.4.7 released

2010-03-05 Thread Giovanni
Wonderful!

I am a big fan of Wicket and I am spreading it in my local community (Turin, 
Italy).

Thanks for the great job!





From: Igor Vaynberg 
To: users@wicket.apache.org; d...@wicket.apache.org; annou...@wicket.apache.org
Sent: Fri, March 5, 2010 3:35:08 AM
Subject: Wicket 1.4.7 released

Wicket 1.4.7 is released!

This is the seventh maintenance release of 1.4.x series and brings over
30 bug fixes and improvements.

tag: https://svn.apache.org/repos/asf/wicket/releases/wicket-1.4.7/

maven:


org.apache.wicket
wicket
1.4.7


download: http://www.apache.org/dyn/closer.cgi/wicket/1.4.7

changelog:https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&pid=12310561&fixfor=12314560

cheers,

-igor

PS. the website has been updated with the release announcement but is
still waiting to be replicated.

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


  

Re: wiQuery components with server side state - live demo

2010-03-05 Thread Richard Wilkinson
Chris - Thanks for spotting that.  I think it is a bug with the
underlying jqGrid javascript code.  I notice that on the jqGrid drag
and drop demo, sortable columns are not enabled.  I will try and
confirm that the problem is indeed with jqGrid and report the bug to
them when I get chance.

John - I see, cool feature.  jqGrid supports something like this so I
have added onto my list of desired features.

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


On 5 March 2010 08:49, Giambalvo, Christian
 wrote:
> Hi,
>
> i've found a bug at http://labs.jweekend.com/public/grid/GridDnDPage
> Click and hold on a column header and moving mouse around expands the header 
> columnm, what i think is not intended.
>
> Greets Chris
>
> -Ursprüngliche Nachricht-
> Von: ce...@jweekend.com [mailto:ce...@jweekend.com] Im Auftrag von Cemal 
> Bayramoglu
> Gesendet: Mittwoch, 3. März 2010 11:33
> An: users@wicket.apache.org
> Betreff: Re: wiQuery components with server side state - live demo
>
> This is all useful feedback, thank you.
> Storing things like the user's selected columns, their order, row sort
> order, number of rows per page, preferred/selected themes etc ... are
> on our list of things to consider.
> I envisage persisting these user-specific setting
> (preferences/profiles/perspectives/views?) server-side, perhaps
> triggered by a user request to do so (eg hitting a "Save A (Named)
> View Settings" button). We've also talked about the less permanent
> persistence for page-refreshes, which could potentially be held on the
> client-side, in the Wicket page or session.
>
> Regards - Cemal
> jWeekend
> OO & Java Technologies, Wicket
> Consulting, Development, Training
> http://jWeekend.com
>
>
> On 2 March 2010 23:10, Vladimir K  wrote:
>>
>> Looks great!
>>
>> One thing is missing - the components don't restore their state on refresh.
>> I believe cookie, window name or dom storage can be used to keep the
>> position and settings of components that are available for
>> dragging/re-arrangement.
>>
>>
>> Roman Ilin wrote:
>>>
>>> Great, ready for use components.
>>>
>>>
>>>
>>> On Tue, Mar 2, 2010 at 5:58 PM, Cemal A Bayramoglu 
>>> wrote:
 We've been building a few wiQuery components [0], for clients' and
 internal projects. These wiQuery components typically maintain some of
 their state server-side, in the spirit of standard Wicket components.

 Here's a simple demo [1] to show some of them in action.

 Look carefully and you'll find lots of stuff to click on [2]. We could
 plan to open up the ones we may [3] if they look useful to you or
 you'd like to get involved with design/development/testing.

 Regards - Cemal
 jWeekend
 OO & Java Technologies, Wicket
 Consulting, Development, Training
 http://jWeekend.com

 [0] includes components based on sortable "portlet", jqGrid/Tree,
 jGrowl, jQuery UI: Accordian, Dialog, Tabs all integrated with Wicket
 using wiQuery (http://code.google.com/p/wiquery/)
 [1] http://labs.jWeekend.com/public/
 [2] We'd naturally prefer if you didn't zap _all_ the records from our
 toy database! Yes, we know some of you will take this as an invitation
 to have a go!
 [3] No promises on dates just now, but it is something we'd like to do
 soon.

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


>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>>
>>
>> --
>> View this message in context: 
>> http://old.nabble.com/wiQuery-components-with-server-side-state---live-demo-tp27758298p27762474.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: Guice & LazyInitProxyFactory : NPE when calling, first, public fields

2010-03-05 Thread Uwe Schäfer

Joseph Pachod schrieb:


We're using Wicket with Guice.
An issue has just popped up : on some special injected objects, we 
access public fields. These public fields are themselves injected 
through guice.


However, due to the LazyInitProxyFactory, they're not. Indeed, as far as 
I got it, the LazyInitProxyFactory waits for the first method call to do 
the actual injection.


To me this does not feel like necessarily the right behaviour. I do not 
see a tremendous advantage in this resolving being done lazily.


My suggestion would be to add a switch in some Settings object, that 
controls this behaviour and inject as requested without deferrence.


As i don´t like the idea to live with a longterm patch of wickets, would 
it be acceptable to include this kind of tweak into the wicket-guice 
codebase if i provided an appropriate patch?

And if so, what would be the right place for such a switch?

cu uwe


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



Only render javascript once per request?

2010-03-05 Thread Wayne Pope
Hi,

I been looking how to solve this and I cannot see a clear way.

Basically in a given page we have a list of TextField derived classes
that use a JQuery auto complete.
This means for each textfield rendered on the page we render in the
head something like:

$(document).ready(function(){var data = ['Sitemap', 'vbmbmnvbmn',
'second', 'communications', 'test', 'Wayne', 'Wireframes', 'fook',
'business case', 'Logos', 'round 1', 'layout', 'Marketing', 'new one',
'graphics', 'hot stuff', 'Accounts', 'Template'];
$('#labels390').autocomplete(data,  { multiple: true,
multipleSeparator: ', ', scroll: true, scrollHeight: 300 })})

$(document).ready(function(){var data = ['Sitemap', 'vbmbmnvbmn',
'second', 'communications', 'test', 'Wayne', 'Wireframes', 'fook',
'business case', 'Logos', 'round 1', 'layout', 'Marketing', 'new one',
'graphics', 'hot stuff', 'Accounts', 'Template'];
$('#labels391').autocomplete(data,  { multiple: true,
multipleSeparator: ', ', scroll: true, scrollHeight: 300 })})

$(document).ready(function(){var data = ['Sitemap', 'vbmbmnvbmn',
'second', 'communications', 'test', 'Wayne', 'Wireframes', 'fook',
'business case', 'Logos', 'round 1', 'layout', 'Marketing', 'new one',
'graphics', 'hot stuff', 'Accounts', 'Template'];
$('#labels392').autocomplete(data,  { multiple: true,
multipleSeparator: ', ', scroll: true, scrollHeight: 300 })})

etc..


As you can clearly see this isn't too efficient and I want to set the
data array only once and then attach the autocomplete to the textfield
and the data.

In the renderhead of the textfield derived class is there anyway to
somehow only render the data part once per request? (this also
massively reduces the db calls to create the list!)

thanks for any pointers
Wayne

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



Re: how to get domain name

2010-03-05 Thread Ilja Pavkovic
Hi,

> Hi all,
> 
> I've searched around to no avail for an example on how to get the
> domain name of the server where the wicket application runs on.
> Can anybody help with this?
Something like:


HttpServletRequest request = (HttpServletRequest) ((WebRequestCycle) 
getRequestCycle()).getRequest();
// maybe we are behind a proxy
String header = request.getHeader("X-Forwarded-Host");
if(header != null) {
// we are only interested in the first header entry
header = new StringTokenizer(header,",").nextToken().trim();
}
if(header == null) {
header = request.getHeader("Host");
}
return header;


Best Regards,
Ilja Pavkovic

-- 
binaere bauten gmbh · tempelhofer ufer 1a · 10961 berlin

   +49 · 171 · 9342 465

Handelsregister: HRB 115854 - Amtsgericht Charlottenburg
Geschäftsführer: Dipl.-Inform. Ilja Pavkovic, Dipl.-Inform. Jost Becker

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



AW: wiQuery components with server side state - live demo

2010-03-05 Thread Giambalvo, Christian
Hi,

i've found a bug at http://labs.jweekend.com/public/grid/GridDnDPage
Click and hold on a column header and moving mouse around expands the header 
columnm, what i think is not intended.

Greets Chris

-Ursprüngliche Nachricht-
Von: ce...@jweekend.com [mailto:ce...@jweekend.com] Im Auftrag von Cemal 
Bayramoglu
Gesendet: Mittwoch, 3. März 2010 11:33
An: users@wicket.apache.org
Betreff: Re: wiQuery components with server side state - live demo

This is all useful feedback, thank you.
Storing things like the user's selected columns, their order, row sort
order, number of rows per page, preferred/selected themes etc ... are
on our list of things to consider.
I envisage persisting these user-specific setting
(preferences/profiles/perspectives/views?) server-side, perhaps
triggered by a user request to do so (eg hitting a "Save A (Named)
View Settings" button). We've also talked about the less permanent
persistence for page-refreshes, which could potentially be held on the
client-side, in the Wicket page or session.

Regards - Cemal
jWeekend
OO & Java Technologies, Wicket
Consulting, Development, Training
http://jWeekend.com


On 2 March 2010 23:10, Vladimir K  wrote:
>
> Looks great!
>
> One thing is missing - the components don't restore their state on refresh.
> I believe cookie, window name or dom storage can be used to keep the
> position and settings of components that are available for
> dragging/re-arrangement.
>
>
> Roman Ilin wrote:
>>
>> Great, ready for use components.
>>
>>
>>
>> On Tue, Mar 2, 2010 at 5:58 PM, Cemal A Bayramoglu 
>> wrote:
>>> We've been building a few wiQuery components [0], for clients' and
>>> internal projects. These wiQuery components typically maintain some of
>>> their state server-side, in the spirit of standard Wicket components.
>>>
>>> Here's a simple demo [1] to show some of them in action.
>>>
>>> Look carefully and you'll find lots of stuff to click on [2]. We could
>>> plan to open up the ones we may [3] if they look useful to you or
>>> you'd like to get involved with design/development/testing.
>>>
>>> Regards - Cemal
>>> jWeekend
>>> OO & Java Technologies, Wicket
>>> Consulting, Development, Training
>>> http://jWeekend.com
>>>
>>> [0] includes components based on sortable "portlet", jqGrid/Tree,
>>> jGrowl, jQuery UI: Accordian, Dialog, Tabs all integrated with Wicket
>>> using wiQuery (http://code.google.com/p/wiquery/)
>>> [1] http://labs.jWeekend.com/public/
>>> [2] We'd naturally prefer if you didn't zap _all_ the records from our
>>> toy database! Yes, we know some of you will take this as an invitation
>>> to have a go!
>>> [3] No promises on dates just now, but it is something we'd like to do
>>> soon.
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>>
>
> --
> View this message in context: 
> http://old.nabble.com/wiQuery-components-with-server-side-state---live-demo-tp27758298p27762474.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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


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