Re: Status of Wicket and Groovy?

2008-06-09 Thread Dmitry Kandalov
On Monday 09 June 2008 10:47:45 Eelco Hillenius wrote:
  IMHO they cannot be easily used together at the moment.

 Hmmm, interesting. My only experience with Groovy is years ago, and
 back then we abandoned and switched to PNuts (which I guess should
 work with Wicket as well) due to Groovy's immaturity back then.

 Dima, are these problems hard to overcome in your opinion? And did you
 look at other dynamic languages with Wicket by any chance?

I wouldn't say the problems are hard but they are not easy either. When I 
attempted to implement some kind of my own wicketbuilder, the problems boiled 
down to making closures serializable and creating wrappers for wicket classes 
to make them use closures instead of anonymous classes. Unfortunately I 
switched from it to other things.

I haven't looked at other dynamic languages. May be I should try jruby.


Dima

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Lightweight generic busy indicator

2008-06-09 Thread Martin Makundi
Ok. So I finally figured out my javascript syntax mistake. Do not use
Wicket.Ajax.registerPreCallHandler(showBusysign()) but instead without
the brackets with the function:
Wicket.Ajax.registerPreCallHandler(showBusysign);

This snipplet is now complete and can be used with any application:

script type=text/javascript
  /* Your web page must contain this:
   * div id=busysignLoading .../div
   */
  window.onload = setupFunc;

  function setupFunc() {
document.getElementsByTagName('body')[0].onclick = clickFunc;
hideBusysign();
  Wicket.Ajax.registerPreCallHandler(showBusysign);
  Wicket.Ajax.registerPostCallHandler(hideBusysign);
  Wicket.Ajax.registerFailureHandler(hideBusysign);
  }

  function hideBusysign() {
document.getElementById('busysign').style.display ='none';
  }

  function showBusysign() {
document.getElementById('busysign').style.display ='inline';
  }

  function clickFunc(eventData) {
var clickedElement = (window.event) ? event.srcElement : eventData.target;
if (clickedElement.tagName == 'BUTTON' || clickedElement.tagName
== 'A' || clickedElement.parentNode.tagName == 'A'
  || (clickedElement.tagName == 'INPUT'  (clickedElement.type ==
'BUTTON' || clickedElement.type == 'SUBMIT'))) {
  showBusysign();
}
  }
/script

Do you think I should add it to the WIKI?

**
Martin


2008/6/8 Martin Makundi [EMAIL PROTECTED]:
 Hi!

 In my understanding it should (IMHO) be possible to hook all ajax
 calls without doing anything on the server side. I think your add
 onClick to an AjaxButton issue involves attaching specific javascript
 (from the server side) to a specific button. That's not what I need,
 is it? I would have to roll out a new global ajax button having the
 amendmentsno. That's an overkill (is it the only solution???).

 I just want the indicator to become visible whenever any ajax request
 starts and the indicator to be again hidden whenever the ajax request
 stops/terminates. I do not want to affect the ajax behavior itself, I
 just want to add one intermediate function call.

 There should be a generic clicent-side (browser) hook or way to tweak
 this. I tried chaning the body onload setupfunc to the following,
 which had the result that all ajaxfallbackbuttons fell back into
 normal mode:

  function setupFunc() {
document.getElementsByTagName('body')[0].onclick = clickFunc;
hideBusysign();
  Wicket.Ajax.registerPreCallHandler(showBusysign());
  Wicket.Ajax.registerPostCallHandler(hideBusysign());
  Wicket.Ajax.registerFailureHandler(hideBusysign());
  }

 So I just want to add the show/hideBusysign in addition to the
 existing functionality. Do I have to fork wicket-ajax.js or is it
 possible to achieve it using scripting within the markup file?

 **
 Martin

 2008/6/8 Eyal Golan [EMAIL PROTECTED]:
 check my posts on add onClick to an AjaxButton in the users list (I
 couldn't get the URL for it  ...)
 It seems that you have a similar  problem.

 Eyal

 On Sat, Jun 7, 2008 at 11:41 PM, Martin Makundi 
 [EMAIL PROTECTED] wrote:

 Hi!

 Did I misunderstand something? I am not a javascript-wizard ;) I could
 make it work perfectly with non-ajax buttons and links but it does not
 seem to react to wicket ajax buttons.

 Here is the script code, pls take a look if there is a blatant bug (I
 assumed I do not need to make any modifications onto the server side):

 script type=text/javascript
  /*
   * div id=busysignLoading .../div
   */
  window.onload = setupFunc;

  Wicket.Ajax.registerPreCallHandler(showBusysign());
  Wicket.Ajax.registerPostCallHandler(hideBusysign());
  Wicket.Ajax.registerFailureHandler(hideBusysign());

  function setupFunc() {
document.getElementsByTagName('body')[0].onclick = clickFunc;
 hideBusysign();
  }

  function hideBusysign() {
document.getElementById('busysign').style.display ='none';
  }

  function showBusysign() {
 document.getElementById('busysign').style.display ='inline';
  }

   function clickFunc(eventData) {
var clickedElement = (window.event) ? event.srcElement :
 eventData.target;
if (clickedElement.tagName == 'BUTTON' || clickedElement.tagName
 == 'A' || clickedElement.parentNode.tagName == 'A'
   || (clickedElement.tagName == 'INPUT'  (clickedElement.type ==
 'BUTTON' || clickedElement.type == 'SUBMIT'))) {
  showBusysign();
}
  }
 /script


 **
 Martin

 2008/6/7 Peter Thomas [EMAIL PROTECTED]:
  On Sat, Jun 7, 2008 at 9:47 PM, Igor Vaynberg [EMAIL PROTECTED]
  wrote:
 
  wicket supports global javascript event handlers for this. either
  search the list or look inside wicet-ajax.js, i cant recall them off
  the top of my head.
 
 
  They are mentioned in this thread:
 
  http://www.nabble.com/Re%3A-ajax-progress-indicator-p17020185.html
 
 
 
  -igor
 
  On Sat, Jun 7, 2008 at 8:59 AM, Martin Makundi
  [EMAIL PROTECTED] wrote:
   Hi!
  
   I am trying to maneuvre a lightweight gmail-style busy indicator to
   

Re: Create WebPage inside a TimerTask Class

2008-06-09 Thread Fabien D.

Hi, thank you for tour help...

This is a very strange behavior. I have tried to display this page, so I
have created a link to this page, and everything is good, I have my Page,
and it enters into the constructor.

I have tried to put this timer class into a WebPage put, unfortunately it
does'nt enter into the constructor!!

And finally, I have made a simpleThread like this :

public class GestionThread extends java.lang.Thread{
private boolean stopThread = false;

public void run() {

boolean fin = false;
GestionEmail g = new GestionEmail();
g.emailTimer(new Date());

} 

It does'nt enter into the constructor to!!
It stops at this line :

.
log.info(Testing1); - display
EmailPage emailcontent = new EmailPage(user,list_sous_domaine,
abo.getDateAncienne() , abo.getDateFuture());

.

.
public EmailPage(TUtilisateur user, List list_sousdomaine, Date ancien,
Date futur){
log.info(Testing2); - never display
this.user = user;
this.list_sousdomaine = list_sousdomaine;
this.ancien = ancien;
this.futur = futur;
this.initPage();
}
.

If someone have an idea to solve this problem! Thank you in advance.
-- 
View this message in context: 
http://www.nabble.com/Create-WebPage-inside-a-TimerTask-Class-tp17693737p17728018.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: scriptaculous toaster

2008-06-09 Thread Nino Saturnino Martinez Vazquez Wael
Sorry, something were messed up with my svn, so I think I might have 
overriden what you just commited(it stated that you just deleted files). 
But take a look at it and see if it's okay.. It turned out that I only 
need to add an option to set queue on effects... However I also added 
the parallel effect, but we could remove it  since i do not use it.


You can see in the scriptacoulus how the toaster works...

Ryan Sonnek wrote:

Okay Nino, I've created a new Effect.multiple that should give you what you
need.  take a look and let me know what you think.  here's how it works:

AbstractEffect[] effects =   new AbstractEffect[] {
new Effect.Fade(component1),
new Effect.Highlight(component2),
etc...
   }

new Effect.multiple(effects).toJavascript();

On Fri, Jun 6, 2008 at 9:41 PM, Ryan Sonnek [EMAIL PROTECTED] wrote:

  

I'll take a swing at it and try to check something workable in asap.


On 6/6/08, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED]
wrote:


Hmm

The Effect's as they are now gives me some trouble, because you need to
give the component when creating the component. It would be much more
flexible if it could be changed. And would allow the user to control which
effects were used..

So what do you say? I could make the change:) API should be okay, and we
could deprecate the old constructor..

Ryan Sonnek wrote:

  

Not sure what this 'toaster' is, but i really like the multiple effect!
 is
it available in 1.8 or is this in scriptaculous 2.0?

We have a scriptaculous header contributor using the
ScriptaculousAjaxBehavior.newJavascriptBindingBehavior().  do you need
something different?


On Wed, Jun 4, 2008 at 8:32 PM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:





Hi Ryan?

I need this effect :
http://github.com/madrobby/scriptaculous/wikis/effect-multiple to be
able
to build the toaster. It's almost done, a scriptaculous header
contributor
would also be very nice.

When im done with the toaster should I just add it to the project?

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




  




--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  


  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Bookmarkable pages and wicket session life-cycle

2008-06-09 Thread mfs

That means the behavior which i have explained is a normal behavior ? , since
in this the links are not resulting in any call backs..

Eelco Hillenius wrote:
 
 I have got a question on bookmarkable page and if wicket session's
 life-cycle has any relation with it.

 Actually i have a couple of bookmarkable pages in my application (mounted
 through queryurlcodingstrategy).

 For scenarios where the session-expiry has reached, invoking any action
 on
 any of the pages results in my custom session-expiry page, which is all
 good, BUT on clicking the links (rendered through ExternalLink and linked
 to
 mounted-url) pointing to the bookmarkable pages, instead of being taken
 to
 the session-expiry page, the bookmarkable pages are rendered, so i wonder
 if
 that is the right behavior? in that case i would have to make those pages
 non-bookmarkable..
 
 Well, there is a difference between the bookmarkable pages themselves,
 links to those pages (bookmarkablepagelinks) and callbacks on those
 pages. Links to bookmarkable pages survive session time outs, but
 (stateful) callbacks don't.
 
 Eelco
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Bookmarkable-pages-and-wicket-session-life-cycle-tp17726662p17728385.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Lightweight generic busy indicator

2008-06-09 Thread Nino Saturnino Martinez Vazquez Wael



Martin Makundi wrote:

Ok. So I finally figured out my javascript syntax mistake. Do not use
Wicket.Ajax.registerPreCallHandler(showBusysign()) but instead without
the brackets with the function:
Wicket.Ajax.registerPreCallHandler(showBusysign);
  
Yes because calling it with brackets, does actually call the 
showBusysign method and gives the result to registerPreCallHandler.. 
Doing with out brackets passes the method as wanted.

This snipplet is now complete and can be used with any application:

script type=text/javascript
  /* Your web page must contain this:
   * div id=busysignLoading .../div
   */
  window.onload = setupFunc;

  function setupFunc() {
document.getElementsByTagName('body')[0].onclick = clickFunc;
hideBusysign();
  Wicket.Ajax.registerPreCallHandler(showBusysign);
  Wicket.Ajax.registerPostCallHandler(hideBusysign);
  Wicket.Ajax.registerFailureHandler(hideBusysign);
  }

  function hideBusysign() {
document.getElementById('busysign').style.display ='none';
  }

  function showBusysign() {
document.getElementById('busysign').style.display ='inline';
  }

  function clickFunc(eventData) {
var clickedElement = (window.event) ? event.srcElement : eventData.target;
if (clickedElement.tagName == 'BUTTON' || clickedElement.tagName
== 'A' || clickedElement.parentNode.tagName == 'A'
  || (clickedElement.tagName == 'INPUT'  (clickedElement.type ==
'BUTTON' || clickedElement.type == 'SUBMIT'))) {
  showBusysign();
}
  }
/script

Do you think I should add it to the WIKI?
  

Thats a great idea, the more info the better:)

**
Martin


2008/6/8 Martin Makundi [EMAIL PROTECTED]:
  

Hi!

In my understanding it should (IMHO) be possible to hook all ajax
calls without doing anything on the server side. I think your add
onClick to an AjaxButton issue involves attaching specific javascript
(from the server side) to a specific button. That's not what I need,
is it? I would have to roll out a new global ajax button having the
amendmentsno. That's an overkill (is it the only solution???).

I just want the indicator to become visible whenever any ajax request
starts and the indicator to be again hidden whenever the ajax request
stops/terminates. I do not want to affect the ajax behavior itself, I
just want to add one intermediate function call.

There should be a generic clicent-side (browser) hook or way to tweak
this. I tried chaning the body onload setupfunc to the following,
which had the result that all ajaxfallbackbuttons fell back into
normal mode:

 function setupFunc() {
   document.getElementsByTagName('body')[0].onclick = clickFunc;
   hideBusysign();
 Wicket.Ajax.registerPreCallHandler(showBusysign());
 Wicket.Ajax.registerPostCallHandler(hideBusysign());
 Wicket.Ajax.registerFailureHandler(hideBusysign());
 }

So I just want to add the show/hideBusysign in addition to the
existing functionality. Do I have to fork wicket-ajax.js or is it
possible to achieve it using scripting within the markup file?

**
Martin

2008/6/8 Eyal Golan [EMAIL PROTECTED]:


check my posts on add onClick to an AjaxButton in the users list (I
couldn't get the URL for it  ...)
It seems that you have a similar  problem.

Eyal

On Sat, Jun 7, 2008 at 11:41 PM, Martin Makundi 
[EMAIL PROTECTED] wrote:

  

Hi!

Did I misunderstand something? I am not a javascript-wizard ;) I could
make it work perfectly with non-ajax buttons and links but it does not
seem to react to wicket ajax buttons.

Here is the script code, pls take a look if there is a blatant bug (I
assumed I do not need to make any modifications onto the server side):

script type=text/javascript
 /*
  * div id=busysignLoading .../div
  */
 window.onload = setupFunc;

 Wicket.Ajax.registerPreCallHandler(showBusysign());
 Wicket.Ajax.registerPostCallHandler(hideBusysign());
 Wicket.Ajax.registerFailureHandler(hideBusysign());

 function setupFunc() {
   document.getElementsByTagName('body')[0].onclick = clickFunc;
hideBusysign();
 }

 function hideBusysign() {
   document.getElementById('busysign').style.display ='none';
 }

 function showBusysign() {
document.getElementById('busysign').style.display ='inline';
 }

  function clickFunc(eventData) {
   var clickedElement = (window.event) ? event.srcElement :
eventData.target;
   if (clickedElement.tagName == 'BUTTON' || clickedElement.tagName
== 'A' || clickedElement.parentNode.tagName == 'A'
  || (clickedElement.tagName == 'INPUT'  (clickedElement.type ==
'BUTTON' || clickedElement.type == 'SUBMIT'))) {
 showBusysign();
   }
 }
/script


**
Martin

2008/6/7 Peter Thomas [EMAIL PROTECTED]:


On Sat, Jun 7, 2008 at 9:47 PM, Igor Vaynberg [EMAIL PROTECTED]
wrote:

  

wicket supports global javascript event handlers for this. either
search the list or look inside wicet-ajax.js, i cant recall them off
the top of my head.



They are mentioned in this thread:


Re: users, please give us your opinion: what is your take on generics with Wicket

2008-06-09 Thread Daniel Walmsley

1) Generifying* Wicket
  [X] Can best be done like currently in the 1.4 branch, where models
and components are both generified. I care most about the improved
static type checking generified models and components give Wicket.



2) How strongly do you feel about your choice above?
  [X] Whatever choice ultimately made, I'll happily convert/ start
using 1.4 and up.


**reason**

Strong typing is my friend. Refactoring is my friend. The stronger and  
clearer we make typing throughout Wicket the happier I'll be.


Code is written once and maintained a hundred thousand times. I'd  
always trade verbosity for maintainability.


D


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Lightweight generic busy indicator

2008-06-09 Thread Martin Makundi
 Do you think I should add it to the WIKI?

 Thats a great idea, the more info the better:)

I had a look at the wicket wiki:
http://cwiki.apache.org/WICKET/#Index-FrameworkDocumentation

Would you consider it it the right place or would you suggest a more
suitable location (and would that require any special publishing
rights)?

**
Martin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Lightweight generic busy indicator

2008-06-09 Thread Nino Saturnino Martinez Vazquez Wael

I think somewhere here:

http://cwiki.apache.org/WICKET/faqs.html

?

Martin Makundi wrote:

Do you think I should add it to the WIKI?
  

Thats a great idea, the more info the better:)



I had a look at the wicket wiki:
http://cwiki.apache.org/WICKET/#Index-FrameworkDocumentation

Would you consider it it the right place or would you suggest a more
suitable location (and would that require any special publishing
rights)?

**
Martin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Can't get round this problem

2008-06-09 Thread Mathias P.W Nilsson

I have googled around for an external form in wicket but havn't found
anything. I've seen some code on using WebMarkupContainer but I can't get
validation to work with that.
-- 
View this message in context: 
http://www.nabble.com/Can%27t-get-round-this-problem-tp17723379p17729068.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can't get round this problem

2008-06-09 Thread Nino Saturnino Martinez Vazquez Wael
Hmm so you want a form with validation(wicket serverside validation), 
but it should action against an external site? I dont think thats the 
way to go.


Please explain what you are trying todo?


If you are just addend the md5 in a hidden attrib that should be 
trivial, just use a webmarkup container and a attribute modifier. 
Validation should be up to the external site, otherwise you need to 
action against wicket and then if the form is valid then forward the 
request to the other site.. But that seems a bit flaky and very unsecure 
anyway.


Mathias P.W Nilsson wrote:

I have googled around for an external form in wicket but havn't found
anything. I've seen some code on using WebMarkupContainer but I can't get
validation to work with that.
  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: users, please give us your opinion: what is your take on generics with Wicket

2008-06-09 Thread Peter Ertl


Strong typing is my friend. Refactoring is my friend. The stronger  
and clearer we make typing throughout Wicket the happier I'll be.


Code is written once and maintained a hundred thousand times. I'd  
always trade verbosity for maintainability.


+1 for that --- very nice said! I totally agree :-)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can't get round this problem

2008-06-09 Thread Sebastiaan van Erk
Don't use a HiddenField on the Wicket side but a WebMarkupContainer. The 
HTML side remains the same (i.e., input tag).


Regards,
Sebastiaan

Mathias P.W Nilsson wrote:

I have a page that has 2 fragment. One for normal ordering and one for credit
card ordering.

When sending the input type hidden names they must have the exact name but
wicket changes it

orderPanel:Merchant_id
must be Merchant_id. How can I remove the orderPanel that adds to the
markup.

I have tried to extend the hidden field and override the protected void
onComponentTag(ComponentTag tag)  but this just makes it work even worse.
Why must wicket change the name of the input tag? Is there a way around
this. I must be able to specify my own name. I was hoping that just

 new HiddenField(  Merchant_id, new Model(   ) ); would do the trick but
wicket changes that name.


smime.p7s
Description: S/MIME Cryptographic Signature


Re: PackageResource - why does'nt get Locale directly from Session ?

2008-06-09 Thread Stefan Simik

Oh yes :-) 
I think, that taking Locale from session could be the most used = the most
suitable default strategy.
Session is the most used place for storing Locale.
I think, that preferred way should be getting Locale from Session as
default.
Passing Locale parameter to the PackageResource constructor does'nt seem to
me like a better way.
Who wants, can subclass PackageResource and override in you own specific
way.
What do you think about it ? 

Stefan




That's just by design to not make the assumption where the locale
comes from. But you can override the class and pass
Session.get().getLocale() and you're done :-)

Eelco

-- 
View this message in context: 
http://www.nabble.com/PackageResource---why-does%27nt-get-Locale-directly-from-Session---tp17696134p17730001.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can't get round this problem

2008-06-09 Thread Mathias P.W Nilsson

I want to populate 15 hidden fileds with data on AjaxSubmitLink( css styled
button ).
There is some validation on the form messaged back to the user using
feedback. If the 
form is correct I want to post to external url. That's it. 


-- 
View this message in context: 
http://www.nabble.com/Can%27t-get-round-this-problem-tp17723379p17730159.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can't get round this problem

2008-06-09 Thread Nino Saturnino Martinez Vazquez Wael
Okay but the problem is that if you go serverside towards wicket then 
you need to make the user do an extra submit, I guess you could use a 
normal wicket form, then submit via ajax. If validation are okay, return 
another completely hidden form with the values and submit it via the 
client/browser by appending javascript(not sure if some browsers dont 
like this). That should do it, smoothly for the user but not so smoothly 
technically..


Mathias P.W Nilsson wrote:

I want to populate 15 hidden fileds with data on AjaxSubmitLink( css styled
button ).
There is some validation on the form messaged back to the user using
feedback. If the 
form is correct I want to post to external url. That's it. 



  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: users, please give us your opinion: what is your take on generics with Wicket

2008-06-09 Thread Stefan Lindner
 Strong typing is my friend. Refactoring is my friend. The stronger and

 clearer we make typing throughout Wicket the happier I'll be.

 Code is written once and maintained a hundred thousand times. I'd 
 always trade verbosity for maintainability.

Yes! Good summary!

Stefan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can't get round this problem

2008-06-09 Thread Mathias P.W Nilsson

This is what I do now. When Ajax onSubmit is ok I append a callback that
set's the forms action and post it.

I have also now, changed the name on submit so that works, ( ugly of course
) . Problem is the flickering

I append javascript to the target on AjaxSubmitLink but it makes a sort of
post back first. Because when I empty the cart before submitting the form I
see that the Listview is empty for a second. If I append the javascript in
the decoration sequence then the validation never occurs. 

This will only work if the user have javascript enabled. But I guess most
users do. I understand the problem with external post but I know there are
some wizards out there that could implement this. Maybe in the next wicket
release. External form?
-- 
View this message in context: 
http://www.nabble.com/Can%27t-get-round-this-problem-tp17723379p17730498.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Status of Wicket and Groovy?

2008-06-09 Thread James Carman
On Mon, Jun 9, 2008 at 1:38 AM, Dmitry Kandalov [EMAIL PROTECTED] wrote:

 I like the idea of using groovy and in general using dynamic language would be
 interesting indeed. But I think you might be not 100% correct about using
 groovy as it is. The main problem in my view is the lack of anonymous classes
 in groovy which are widely used by wicket.


Anonymous classes aren't needed in Groovy.  In Groovy, you have closures.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JavaScript for body tag

2008-06-09 Thread Stefan Lindner
I want to use a JavaScript library that requires the body to be loaded.
This can normally be done by writing

body
script../script
/body

What is the correct way to do this in wicket 1.4?

Stefan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can't get round this problem

2008-06-09 Thread Nino Saturnino Martinez Vazquez Wael



Mathias P.W Nilsson wrote:

This is what I do now. When Ajax onSubmit is ok I append a callback that
set's the forms action and post it.

  
Hmm okay, not completely what I meant. I'd rater make a clean panel with 
markup containers where you set what you have and append that and submit 
that instead.

I have also now, changed the name on submit so that works, ( ugly of course
) . Problem is the flickering
  
You'll get that because you need double post, you could hide the form on 
submit..

I append javascript to the target on AjaxSubmitLink but it makes a sort of
post back first.

Yes. Because you need the validation to go thru, calling wicket first.

 Because when I empty the cart before submitting the form I
see that the Listview is empty for a second.
Hmm, sounds like something else? Are you having a heartbeat or something 
like it on your page?

 If I append the javascript in
the decoration sequence then the validation never occurs. 
  

No because you need it to first post to wicket.

This will only work if the user have javascript enabled.
Yes hence the javascript and AJAX bit. Otherwise you need for the user 
to click twice, like once for validation and once for the real submit. 
This could be okay too, you could then on the second submit just show 
labels, and write that they now are validated and ask if they are sure 
they want to submit this.

 But I guess most
users do. I understand the problem with external post but I know there are
some wizards out there that could implement this. Maybe in the next wicket
release. External form?
  
Hmm an real external form would not have anything todo with wicket, you 
could just have the form on the page without attaching it to wicket with 
wicket:id's so no need for anything in wicket todo this Or I could 
have gotten it wrong..


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Browser Issue

2008-06-09 Thread shahimsha

Hi,
   I am using wicket 1.3 , I had developed a panel and added that panel when
I click on the radio button yes,
   and I removed that panel when I click on option no in the radio group. It
is working fine in fire fox and not working in IE. My code is look like this


final RadioChoice rlvrInd = new RadioChoice(rlvrInd,
lsRlvrIndChoices, radio choce options);
rlvrInd.setRequired(true);
this.add(rlvrInd);


rlvrInd.add(new AjaxEventBehavior(onchange){
/*
 * rolloverPanelflag is used to make the 
rolloverpanel visible or
invisible.
 * default value is true.
 */
boolean rolloverPanelflag = true;
protected void onEvent(AjaxRequestTarget 
target) {
rolloverPanelflag = !rolloverPanelflag;

if(rolloverPanelflag){
rollPanel.setVisible(true);

target.addComponent(rollPanel);

target.appendJavascript(Ricola.init('#+rollPanel.getMarkupId()+'););
}else{
rollPanel.setVisible(false);

target.addComponent(rollPanel);

target.appendJavascript(Ricola.init('#+rollPanel.getMarkupId()+'););
}
}

});
rlvrInd.setRequired(true);
this.add(rlvrInd);


Can anyone help how to make this code work in IE
-- 
View this message in context: 
http://www.nabble.com/Browser-Issue-tp17733220p17733220.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Javascript/Ajax in wicket, how to?

2008-06-09 Thread Sarkast

Hi there,

Another basic(?) question. I have a small test application where I drag and
drop square shaped divs around. 

With ajax I pick those shapes up, so to speak and drop those shapes,
listening for onmousedown and onmouseup events, however I would also like to
display the actual dragging. I assume that Ajaxeventbehaviors are not
suitable for this (generating many requests (correct me if I'm wrong)), thus
I would like to use javascript, however I have no idea how, especially since
the onmousedown event will call 2 javascript methods, one from wicket for
the Ajaxeventbehavior and one for my client side javascript. 

Could someone help me out or point me to a tutorial, I'm unable to find an
understandable one :-/

Tom
-- 
View this message in context: 
http://www.nabble.com/Javascript-Ajax-in-wicket%2C-how-to--tp17733416p17733416.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: scriptaculous toaster

2008-06-09 Thread Ryan Sonnek
Nino,
you overwrote my changes to the Effect class.  Please revert your changes
and restore my Effect.multiple addition.

I can't find *any* reference to this toaster in the core scriptaculous
library.  please provide a url.  is this a custom effect?  If so, i think it
should be moved out of the scriptaculous project and into a separate
wicketstuff project.  Reason being, keeping the core scriptaculous library
uncluttered allows for a quicker upgrade cycle since we don't need to track
down and test every user contributed component.

On Mon, Jun 9, 2008 at 3:08 AM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:

 Sorry, something were messed up with my svn, so I think I might have
 overriden what you just commited(it stated that you just deleted files). But
 take a look at it and see if it's okay.. It turned out that I only need to
 add an option to set queue on effects... However I also added the parallel
 effect, but we could remove it  since i do not use it.

 You can see in the scriptacoulus how the toaster works...


 Ryan Sonnek wrote:

 Okay Nino, I've created a new Effect.multiple that should give you what
 you
 need.  take a look and let me know what you think.  here's how it works:

 AbstractEffect[] effects =   new AbstractEffect[] {
new Effect.Fade(component1),
new Effect.Highlight(component2),
etc...
   }

 new Effect.multiple(effects).toJavascript();

 On Fri, Jun 6, 2008 at 9:41 PM, Ryan Sonnek [EMAIL PROTECTED]
 wrote:



 I'll take a swing at it and try to check something workable in asap.


 On 6/6/08, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED]
 
 wrote:


 Hmm

 The Effect's as they are now gives me some trouble, because you need to
 give the component when creating the component. It would be much more
 flexible if it could be changed. And would allow the user to control
 which
 effects were used..

 So what do you say? I could make the change:) API should be okay, and we
 could deprecate the old constructor..

 Ryan Sonnek wrote:



 Not sure what this 'toaster' is, but i really like the multiple effect!
  is
 it available in 1.8 or is this in scriptaculous 2.0?

 We have a scriptaculous header contributor using the
 ScriptaculousAjaxBehavior.newJavascriptBindingBehavior().  do you need
 something different?


 On Wed, Jun 4, 2008 at 8:32 PM, Nino Saturnino Martinez Vazquez Wael 
 [EMAIL PROTECTED] wrote:





 Hi Ryan?

 I need this effect :
 http://github.com/madrobby/scriptaculous/wikis/effect-multiple to be
 able
 to build the toaster. It's almost done, a scriptaculous header
 contributor
 would also be very nice.

 When im done with the toaster should I just add it to the project?

 --
 -Wicket for love

 Nino Martinez Wael
 Java Specialist @ Jayway DK
 http://www.jayway.dk
 +45 2936 7684


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]









 --
 -Wicket for love

 Nino Martinez Wael
 Java Specialist @ Jayway DK
 http://www.jayway.dk
 +45 2936 7684


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]








 --
 -Wicket for love

 Nino Martinez Wael
 Java Specialist @ Jayway DK
 http://www.jayway.dk
 +45 2936 7684


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Javascript/Ajax in wicket, how to?

2008-06-09 Thread wicket user
check the wicket stuff jquery and wicket stuff jquery examples

https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-jquery
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-jquery-examples


regards
dipu

On Mon, Jun 9, 2008 at 2:58 PM, Sarkast [EMAIL PROTECTED] wrote:


 Hi there,

 Another basic(?) question. I have a small test application where I drag and
 drop square shaped divs around.

 With ajax I pick those shapes up, so to speak and drop those shapes,
 listening for onmousedown and onmouseup events, however I would also like
 to
 display the actual dragging. I assume that Ajaxeventbehaviors are not
 suitable for this (generating many requests (correct me if I'm wrong)),
 thus
 I would like to use javascript, however I have no idea how, especially
 since
 the onmousedown event will call 2 javascript methods, one from wicket for
 the Ajaxeventbehavior and one for my client side javascript.

 Could someone help me out or point me to a tutorial, I'm unable to find an
 understandable one :-/

 Tom
 --
 View this message in context:
 http://www.nabble.com/Javascript-Ajax-in-wicket%2C-how-to--tp17733416p17733416.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Create WebPage inside a TimerTask Class

2008-06-09 Thread Igor Vaynberg
you should use wickettester to do this...that will create all the
proper threadlocal mocks you need.

-igor


On Mon, Jun 9, 2008 at 12:48 AM, Fabien D. [EMAIL PROTECTED] wrote:

 Hi, thank you for tour help...

 This is a very strange behavior. I have tried to display this page, so I
 have created a link to this page, and everything is good, I have my Page,
 and it enters into the constructor.

 I have tried to put this timer class into a WebPage put, unfortunately it
 does'nt enter into the constructor!!

 And finally, I have made a simpleThread like this :

 public class GestionThread extends java.lang.Thread{
private boolean stopThread = false;

public void run() {

boolean fin = false;
GestionEmail g = new GestionEmail();
g.emailTimer(new Date());

}

 It does'nt enter into the constructor to!!
 It stops at this line :

 .
 log.info(Testing1); - display
 EmailPage emailcontent = new EmailPage(user,list_sous_domaine,
 abo.getDateAncienne() , abo.getDateFuture());

 .

 .
public EmailPage(TUtilisateur user, List list_sousdomaine, Date ancien,
 Date futur){
log.info(Testing2); - never display
this.user = user;
this.list_sousdomaine = list_sousdomaine;
this.ancien = ancien;
this.futur = futur;
this.initPage();
}
 .

 If someone have an idea to solve this problem! Thank you in advance.
 --
 View this message in context: 
 http://www.nabble.com/Create-WebPage-inside-a-TimerTask-Class-tp17693737p17728018.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JavaScript for body tag

2008-06-09 Thread Igor Vaynberg
build the script as a label and add it to the page. set
escapemodelstrings(false) on it and wicket wont escape any makrup.

-igor

On Mon, Jun 9, 2008 at 4:39 AM, Stefan Lindner [EMAIL PROTECTED] wrote:
 I want to use a JavaScript library that requires the body to be loaded.
 This can normally be done by writing

body
script../script
/body

 What is the correct way to do this in wicket 1.4?

 Stefan

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: (Class? extends Page?) casting troubles

2008-06-09 Thread Zappaterrini, Larry
Sebastiaan,

Point 1 is a good one. I haven't puzzled that through completely. Upon
initial inspection it seems that it is just the compiler being pedantic
about a scenario that wouldn't arise in practice. I'll have to think
about it some more.

I might be missing something with point 2, but what is wrong with
ClassFoo clazz = Foo.class?

Cheers,
Larry

-Original Message-
From: Sebastiaan van Erk [mailto:[EMAIL PROTECTED] 
Sent: Saturday, June 07, 2008 3:57 AM
To: users@wicket.apache.org
Subject: Re: (Class? extends Page?) casting troubles

Zappaterrini, Larry wrote:
 Sorry, I should have been more clear about subtype. :) When dealing
with
 raw types, the raw type is considered a super type of the generic
type.
 So Bar is a super type of Bar?. Since RawType extends the raw type
 Bar, consider it to be a peer of Bar?. When you consider them as
 peers, a warning is warranted. The new example you use works due to
 erasure. Bar? as declared in source code becomes Bar in byte code.
So
 the statement becomes:
 
   Bar bar = new RawBar();
 
 Which is perfectly legal. I have found that most of perceived
 inconsistencies in Java generics stems  from erasure and sub type
 substitution. The golden rule of generics is that the byte code
produced
 by compiling generics will never produce an invalid cast so long as
the
 code does not produce any warnings. This causes some things that may
 seem intuitive to be illegal.

Thanks for your explanation. I still think it's all rather horrible 
though. Type erasure was a huge mistake if you ask me. Two questions for

you though...

1) Can you come up with an example where assigning a Foo? extends Bar 
to a Foo? extends Bar? causes an invalid cast? (So I can understand 
why this intuitive seeming assignment is illegal).

2) How do you get rid of the warning in ClassFoo clazz = Foo.class 
without using Class?? Because it would seem strange if there is no 
warning free way to use a certain language construct...

Regards,
Sebastiaan

 -Original Message-
 From: Sebastiaan van Erk [mailto:[EMAIL PROTECTED] 
 Sent: Friday, June 06, 2008 4:16 PM
 To: users@wicket.apache.org
 Subject: Re: (Class? extends Page?) casting troubles
 
 Zappaterrini, Larry wrote:
 In the example you have detailed, RawBar is not a subtype of Bar?
 since it extends the raw type Bar.
 
 I guess it depends on the definition of subtype. It is at least the
case
 
 that the following assignment compiles without warnings (without 
 warnings about unchecked casts):
 
Bar? bar = new RawBar();
 
 So is it then a subtype? Or isn't it? It's all terribly inconsistent
if 
 you ask me. :-(
 
 Regards,
 Sebastiaan
 
 
 
 -Original Message-
 From: Sebastiaan van Erk [mailto:[EMAIL PROTECTED] 
 Sent: Friday, June 06, 2008 11:31 AM
 To: users@wicket.apache.org
 Subject: Re: (Class? extends Page?) casting troubles

 ARgh, you always make typos with this stuff.

 See correction.

 Sebastiaan van Erk wrote:
 Martin Funk wrote:

 Class? extends Page? means class of (anything that extends
 (page of
 anything)).
 I'm not so sure.
 There are 2 separate issues:

 ISSUE 1: Foo? extends Bar? is not assignable from a FooRawBar 
 where RawBar extends Bar as a raw type. That is, given:

   static class FooT {
   }

   static class BarT {
   }

   static class RawBar extends Bar {
   }

   static class SubBarT extends BarT {
   }

 Thus:

Bar? bar = new RawBar(); // works, because RawBar is a subtype
 of
 Bar?

 But:

Foo? extends Bar? rawbar = new RawBar(); // DOES NOT WORK -
 THIS 
 IS CAUSING ONE HALF OF ALL OUR HEADACHES
 (correction:)
 Foo? extends Bar? rawbar = new FooRawBar(); // DOES NOT
WORK
 -
 THIS IS CAUSING ONE HALF OF ALL OUR HEADACHES

 Btw, this does work (like you expect):
 Foo? extends Bar? rawbar2 = new FooSubBar?();

 Note that this is the issue that complete baffles me, as RawBar is a

 subtype of Bar?, so I *really* *really* *REALLY* have no idea why
 the 
 compiler chokes on this.

 ISSUE 2: The class literal of a generic type returns a class of a
raw
 
 type.  Thus Foo.class return ClassFoo. This is also really messed
 up, 
 because:
 
 ClassFoo fc = Foo.class;

 compiles, but generates a warning (reference to raw type). But if
you
 
 type this in eclipse:

 x fc = Foo.class;

 and use eclipse quickfix to change x to the correct type, it'll 
 change it to precisely ClassFoo (the JLS is very short about this,
 see 
 also 


http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#1
 5.8.2). 
 So what the heck is the proper type for the class literal??? I
 couldn't 
 find any!

 Finally, note that when you define a method like this:

   static void method1(Foo? extends Bar? y) {
   }

 it works like a charm for a new FooSubBarString, i.e., the Foo
 of
 (anything that extends (bar of anything)) really is the correct 
 interpretation.

 It's just that the interaction with raw types is completely *foobar*

 (pun intended).

 Regards,
 Sebastiaan







 

Re: JavaScript for body tag

2008-06-09 Thread James Carman
This is a common enough scenario that perhaps there should be a
built-in facility for it?  I was wondering how to insert the Google
Analytics javascript code right before my /body tag too.

On Mon, Jun 9, 2008 at 10:42 AM, Igor Vaynberg [EMAIL PROTECTED] wrote:
 build the script as a label and add it to the page. set
 escapemodelstrings(false) on it and wicket wont escape any makrup.

 -igor

 On Mon, Jun 9, 2008 at 4:39 AM, Stefan Lindner [EMAIL PROTECTED] wrote:
 I want to use a JavaScript library that requires the body to be loaded.
 This can normally be done by writing

body
script../script
/body

 What is the correct way to do this in wicket 1.4?

 Stefan

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JavaScript for body tag

2008-06-09 Thread Igor Vaynberg
add a label in your basepage right before the /body tag? you do own
the markup do you not?

-igor

On Mon, Jun 9, 2008 at 7:45 AM, James Carman [EMAIL PROTECTED] wrote:
 This is a common enough scenario that perhaps there should be a
 built-in facility for it?  I was wondering how to insert the Google
 Analytics javascript code right before my /body tag too.

 On Mon, Jun 9, 2008 at 10:42 AM, Igor Vaynberg [EMAIL PROTECTED] wrote:
 build the script as a label and add it to the page. set
 escapemodelstrings(false) on it and wicket wont escape any makrup.

 -igor

 On Mon, Jun 9, 2008 at 4:39 AM, Stefan Lindner [EMAIL PROTECTED] wrote:
 I want to use a JavaScript library that requires the body to be loaded.
 This can normally be done by writing

body
script../script
/body

 What is the correct way to do this in wicket 1.4?

 Stefan

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JavaScript for body tag

2008-06-09 Thread James Carman
I haven't actually implemented my Google Analytics stuff yet.  It has
thus far been merely a thought experiment.

On Mon, Jun 9, 2008 at 10:46 AM, Igor Vaynberg [EMAIL PROTECTED] wrote:
 add a label in your basepage right before the /body tag? you do own
 the markup do you not?

 -igor

 On Mon, Jun 9, 2008 at 7:45 AM, James Carman [EMAIL PROTECTED] wrote:
 This is a common enough scenario that perhaps there should be a
 built-in facility for it?  I was wondering how to insert the Google
 Analytics javascript code right before my /body tag too.

 On Mon, Jun 9, 2008 at 10:42 AM, Igor Vaynberg [EMAIL PROTECTED] wrote:
 build the script as a label and add it to the page. set
 escapemodelstrings(false) on it and wicket wont escape any makrup.

 -igor

 On Mon, Jun 9, 2008 at 4:39 AM, Stefan Lindner [EMAIL PROTECTED] wrote:
 I want to use a JavaScript library that requires the body to be loaded.
 This can normally be done by writing

body
script../script
/body

 What is the correct way to do this in wicket 1.4?

 Stefan

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Localizer cache with 150.000+ entries causing OutOfMemory

2008-06-09 Thread Stefan Fußenegger

I am just analysing a heap dump (god bless the
-XX:+HeapDumpOnOutOfMemoryError flag) of a recent application cache due to
an OutOfMemoryError (GC overhead limit exceeded to be precise). Using
jhat, the 175456 instances of class
org.apache.wicket.util.concurrent.ConcurrentHashMap$Entry immediately got
my attention. While looking through the 107 instance of ConcurrentHashMap, I
found one *really* big one: Localizer.cache has a hash table length of
262144, each of its 32 segments with about 5300 entries, where a hash key is
a string, sometimes longer than 500 charactes, similar to (see
Localizer.getCacheKey(String,Component)):

fooTitle.bar-org.apache.wicket.markup.html.link.BookmarkablePageLink:fooLink-org.apache.wicket.markup.html.panel.Fragment:track-org.apache.wicket.markup.html.list.ListItem:14-my.company.FooListPanel$1:fooList-my.company.FooListPanel:foos-org.apache.wicket.markup.html.list.ListItem:0-my.company.BarListPanel$1:bars-my.company.FooListPanel:panel-my.company.boxes.BodyBox:2-org.apache.wicket.markup.repeater.RepeatingView:body-my.company.layout.Border:border-my.company.pages.music.FoobarPage:43-de-null

Those numbers pretty much convinced me: The localizer cache has blown away
my application. 

Looking at this hash keys, I suspect the following problem: those strings
are constructed from the position of a localized String on a page, which
is quite a bad thing if you use nested list views or repeating views to
construct your page. For instance, I have a panel with a long (pageable)
list of entries, might be  5000 entries which might appear on various
positions in a repeating view I use as a container for most of my pages.
Let's say there are 5 possible positions, this would cause 2500 thousand
cached entries, each with a key of 300+ characters plus some more characters
for the cached message - feel free to do the maths. From a quick estimate
I'd say: No wonder, this has blown away my app.

As a quick fix, I'd suggest to regularly clear the localizer cache, use a
more sophisticated cache (that expires old entries once in a while!!) or to
disable the cache completely. However, don't try to overwrite
Localizer.newCache() and clear the cache regularly: clearCache() will
replace your cache with a ConcurrentHashMap (not using
Localizer.newCache()). However, quite unlikely, that this will happen as
newCache() is private anyway ;) I am going to add some code to clear the
cache regularly.

Best regards, Stefan

PS: I'll also create a JIRA issue, but I am really short on time right now.

-
---
Stefan Fußenegger
http://talk-on-tech.blogspot.com // looking for a nicer domain ;)
-- 
View this message in context: 
http://www.nabble.com/Localizer-cache-with-150.000%2B-entries-causing-OutOfMemory-tp17734931p17734931.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AbstractTree expandAll is missing

2008-06-09 Thread Dimedrol

Hello All!
I'm fixing bugs in a project, written using Wicket (1.2.6?)
I need to expand all items on my tree, and I see that expandAll method is
missing...
So, to expand 1 item I use:

final TreePath treePathToExpand = new TreePath(node.getPath());
setExpandedState(treePathToExpand, true);

But, how to expand whole tree ?
-- 
View this message in context: 
http://www.nabble.com/AbstractTree-expandAll-is-missing-tp17735081p17735081.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Localizer cache with 150.000+ entries causing OutOfMemory

2008-06-09 Thread Igor Vaynberg
try applying this patch and see if it helps

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

-igor

On Mon, Jun 9, 2008 at 8:11 AM, Stefan Fußenegger
[EMAIL PROTECTED] wrote:

 I am just analysing a heap dump (god bless the
 -XX:+HeapDumpOnOutOfMemoryError flag) of a recent application cache due to
 an OutOfMemoryError (GC overhead limit exceeded to be precise). Using
 jhat, the 175456 instances of class
 org.apache.wicket.util.concurrent.ConcurrentHashMap$Entry immediately got
 my attention. While looking through the 107 instance of ConcurrentHashMap, I
 found one *really* big one: Localizer.cache has a hash table length of
 262144, each of its 32 segments with about 5300 entries, where a hash key is
 a string, sometimes longer than 500 charactes, similar to (see
 Localizer.getCacheKey(String,Component)):

 fooTitle.bar-org.apache.wicket.markup.html.link.BookmarkablePageLink:fooLink-org.apache.wicket.markup.html.panel.Fragment:track-org.apache.wicket.markup.html.list.ListItem:14-my.company.FooListPanel$1:fooList-my.company.FooListPanel:foos-org.apache.wicket.markup.html.list.ListItem:0-my.company.BarListPanel$1:bars-my.company.FooListPanel:panel-my.company.boxes.BodyBox:2-org.apache.wicket.markup.repeater.RepeatingView:body-my.company.layout.Border:border-my.company.pages.music.FoobarPage:43-de-null

 Those numbers pretty much convinced me: The localizer cache has blown away
 my application.

 Looking at this hash keys, I suspect the following problem: those strings
 are constructed from the position of a localized String on a page, which
 is quite a bad thing if you use nested list views or repeating views to
 construct your page. For instance, I have a panel with a long (pageable)
 list of entries, might be  5000 entries which might appear on various
 positions in a repeating view I use as a container for most of my pages.
 Let's say there are 5 possible positions, this would cause 2500 thousand
 cached entries, each with a key of 300+ characters plus some more characters
 for the cached message - feel free to do the maths. From a quick estimate
 I'd say: No wonder, this has blown away my app.

 As a quick fix, I'd suggest to regularly clear the localizer cache, use a
 more sophisticated cache (that expires old entries once in a while!!) or to
 disable the cache completely. However, don't try to overwrite
 Localizer.newCache() and clear the cache regularly: clearCache() will
 replace your cache with a ConcurrentHashMap (not using
 Localizer.newCache()). However, quite unlikely, that this will happen as
 newCache() is private anyway ;) I am going to add some code to clear the
 cache regularly.

 Best regards, Stefan

 PS: I'll also create a JIRA issue, but I am really short on time right now.

 -
 ---
 Stefan Fußenegger
 http://talk-on-tech.blogspot.com // looking for a nicer domain ;)
 --
 View this message in context: 
 http://www.nabble.com/Localizer-cache-with-150.000%2B-entries-causing-OutOfMemory-tp17734931p17734931.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: scriptaculous toaster

2008-06-09 Thread Nino Saturnino Martinez Vazquez Wael



Ryan Sonnek wrote:

Nino,
you overwrote my changes to the Effect class.  Please revert your changes
and restore my Effect.multiple addition.

  

I'll do that ASAP, will probably first be tommorrow.

I can't find *any* reference to this toaster in the core scriptaculous
library.
It's a combination of effects(the example effects from scriptaculous), 
something that fades in shakes and for example squishes.. Did you see 
the example?

  please provide a url.  is this a custom effect?  If so, i think it
should be moved out of the scriptaculous project and into a separate
wicketstuff project.
  Reason being, keeping the core scriptaculous library
uncluttered allows for a quicker upgrade cycle since we don't need to track
down and test every user contributed component.

On Mon, Jun 9, 2008 at 3:08 AM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:

  

Sorry, something were messed up with my svn, so I think I might have
overriden what you just commited(it stated that you just deleted files). But
take a look at it and see if it's okay.. It turned out that I only need to
add an option to set queue on effects... However I also added the parallel
effect, but we could remove it  since i do not use it.

You can see in the scriptacoulus how the toaster works...


Ryan Sonnek wrote:



Okay Nino, I've created a new Effect.multiple that should give you what
you
need.  take a look and let me know what you think.  here's how it works:

AbstractEffect[] effects =   new AbstractEffect[] {
   new Effect.Fade(component1),
   new Effect.Highlight(component2),
   etc...
  }

new Effect.multiple(effects).toJavascript();

On Fri, Jun 6, 2008 at 9:41 PM, Ryan Sonnek [EMAIL PROTECTED]
wrote:



  

I'll take a swing at it and try to check something workable in asap.


On 6/6/08, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED]

wrote:





Hmm

The Effect's as they are now gives me some trouble, because you need to
give the component when creating the component. It would be much more
flexible if it could be changed. And would allow the user to control
which
effects were used..

So what do you say? I could make the change:) API should be okay, and we
could deprecate the old constructor..

Ryan Sonnek wrote:



  

Not sure what this 'toaster' is, but i really like the multiple effect!
 is
it available in 1.8 or is this in scriptaculous 2.0?

We have a scriptaculous header contributor using the
ScriptaculousAjaxBehavior.newJavascriptBindingBehavior().  do you need
something different?


On Wed, Jun 4, 2008 at 8:32 PM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:







Hi Ryan?

I need this effect :
http://github.com/madrobby/scriptaculous/wikis/effect-multiple to be
able
to build the toaster. It's almost done, a scriptaculous header
contributor
would also be very nice.

When im done with the toaster should I just add it to the project?

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






  




--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




  
  

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



FileUploadField, CSS, and empty form values

2008-06-09 Thread Michael Laccetti

I'm trying to attach some CSS to the browse button in a FileUploadField. 
Rather, since this is actually impossible, I'm hiding the actual field, and
creating a pretty looking fake similar to what this page does:
http://www.quirksmode.org/dom/inputfile.html.  The issue is that when I
submit the form, even though the field seems to be populated in the browser,
the value doesn't make it to the form itself.  Is there some magic required
to get the field value to actually populate in the form?

-
--
Michael Laccetti (416)558-9718
S2G Limited   http://www.s2g.ca/
-- 
View this message in context: 
http://www.nabble.com/FileUploadField%2C-CSS%2C-and-empty-form-values-tp17735661p17735661.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can't get round this problem

2008-06-09 Thread Mathias P.W Nilsson

Here is the fragment for sending external data. The form is a class variable
and is visible in the fragment

final class PostenOrderFragment extends Fragment{
private static final long serialVersionUID = 1L;

public PostenOrderFragment( String panel, String id ){
super( panel, id, OrderControl.this );
final PostenOrder order = (PostenOrder) getOrder();
/* Transfer user data. Copy the data from the user to the order 
*/
order.transferUserData( 
((HairlessSession)getSession()).getUser() );


final HiddenField Merchant_id = new HiddenField(  
Merchant_id, new
Model(  ) );
final HiddenField Version = new HiddenField(  Version,   new 
Model( 
));
final HiddenField Customer_refno = new HiddenField(  
Customer_refno, new
Model(   ));
final HiddenField Currency = new HiddenField( Currency, new 
Model( 
));
final HiddenField Amount = new HiddenField(  Amount,  new 
Model(  ));
final HiddenField VAT = new HiddenField(  VAT,   new Model( 
 ));
final HiddenField Payment_method = new HiddenField(  
Payment_method, 
new Model(  ) );
final HiddenField Purchase_date = new HiddenField(  
Purchase_date, new
Model(  ) );
final HiddenField Response_URL = new HiddenField(  
Response_URL, new
Model(  ) );
final HiddenField Card_num = new HiddenField( Card_num,  new 
Model(  )
);
final HiddenField Cvx2 = new HiddenField(  Cvx2,  new Model( 
 ) );
final HiddenField Exp_date = new HiddenField(  Exp_date,  new 
Model( 
) );
final HiddenField Card_type = new HiddenField(  Card_type,  
new Model(
 ) );
final HiddenField MAC = new HiddenField(  MAC, new Model(  
) );
add( Merchant_id );
add( Version);
add( Customer_refno);
add( Currency );
add( Amount );
add( VAT );
add( Payment_method );
add( Purchase_date );
add( Response_URL);
add(Card_num );
add(Cvx2 );
add(Exp_date );
add( Card_type );
add( MAC );




add(new AjaxSubmitLink( placeOrder, form ) {
private static final long serialVersionUID = 1L;

@Override
protected IAjaxCallDecorator getAjaxCallDecorator(){
return new IAjaxCallDecorator(){
private static final long 
serialVersionUID = 1L;
public CharSequence 
decorateScript(CharSequence script)
{
return 
document.getElementById('+ getMarkupId()
+').disabled=true;+script;
}
public CharSequence 
decorateOnFailureScript(CharSequence script)
{
return 
script+document.getElementById('+ getMarkupId()
+').disabled=false;;
}
public CharSequence 
decorateOnSuccessScript(CharSequence script)
{
return 
script+document.getElementById('+ getMarkupId()
+').disabled=false;;
}
};
}

protected void onError(AjaxRequestTarget target, Form 
form){
target.addComponent(feedback);
target.addComponent(form);
   }

@Override
protected void onSubmit(AjaxRequestTarget target, Form 
form ) {

if( target != null ){


target.addComponent(this);
target.addComponent(form);
target.addComponent(feedback);

if( ! 
((Boolean)acceptConditions.getModelObject() ).booleanValue() ){
info( Du måste godkänna 
köpvillkoren );
return;
   

Re: Status of Wicket and Groovy?

2008-06-09 Thread Eelco Hillenius
 Anonymous classes aren't needed in Groovy.  In Groovy, you have closures.

Dmitry hinted in his reply that closures can't be serialized by default...

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Status of Wicket and Groovy?

2008-06-09 Thread James Carman
Yeah, I read that later in the thread.  Oops! :)


On Mon, Jun 9, 2008 at 12:09 PM, Eelco Hillenius
[EMAIL PROTECTED] wrote:
 Anonymous classes aren't needed in Groovy.  In Groovy, you have closures.

 Dmitry hinted in his reply that closures can't be serialized by default...

 Eelco

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PackageResource - why does'nt get Locale directly from Session ?

2008-06-09 Thread Eelco Hillenius
We'd have to have a good reason the break the API. And it's just
something you'd prefer to be different, but it doesn't give you
troubles you can't get around, right? :-)

Eelco

On Mon, Jun 9, 2008 at 3:21 AM, Stefan Simik [EMAIL PROTECTED] wrote:

 Oh yes :-)
 I think, that taking Locale from session could be the most used = the most
 suitable default strategy.
 Session is the most used place for storing Locale.
 I think, that preferred way should be getting Locale from Session as
 default.
 Passing Locale parameter to the PackageResource constructor does'nt seem to
 me like a better way.
 Who wants, can subclass PackageResource and override in you own specific
 way.
 What do you think about it ?

 Stefan




 That's just by design to not make the assumption where the locale
 comes from. But you can override the class and pass
 Session.get().getLocale() and you're done :-)

 Eelco

 --
 View this message in context: 
 http://www.nabble.com/PackageResource---why-does%27nt-get-Locale-directly-from-Session---tp17696134p17730001.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: scriptaculous toaster

2008-06-09 Thread Nino Saturnino Martinez Vazquez Wael

Hi Ryan

So, now I have merged our two versions, I had to add the two new 
interface methods as NOOP's on multiple effect. I use the setQueue to 
obtain the same as the new multiple effect btw. Funny how many ways 
there are todo stuff:)


I guess I should add blind up and blind down effects too?

Nino Saturnino Martinez Vazquez Wael wrote:



Ryan Sonnek wrote:

Nino,
you overwrote my changes to the Effect class.  Please revert your 
changes

and restore my Effect.multiple addition.

  

I'll do that ASAP, will probably first be tommorrow.

I can't find *any* reference to this toaster in the core scriptaculous
library.
It's a combination of effects(the example effects from scriptaculous), 
something that fades in shakes and for example squishes.. Did you see 
the example?

  please provide a url.  is this a custom effect?  If so, i think it
should be moved out of the scriptaculous project and into a separate
wicketstuff project.
  Reason being, keeping the core scriptaculous library
uncluttered allows for a quicker upgrade cycle since we don't need to 
track

down and test every user contributed component.

On Mon, Jun 9, 2008 at 3:08 AM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:

 

Sorry, something were messed up with my svn, so I think I might have
overriden what you just commited(it stated that you just deleted 
files). But
take a look at it and see if it's okay.. It turned out that I only 
need to
add an option to set queue on effects... However I also added the 
parallel

effect, but we could remove it  since i do not use it.

You can see in the scriptacoulus how the toaster works...


Ryan Sonnek wrote:

   
Okay Nino, I've created a new Effect.multiple that should give you 
what

you
need.  take a look and let me know what you think.  here's how it 
works:


AbstractEffect[] effects =   new AbstractEffect[] {
   new Effect.Fade(component1),
   new Effect.Highlight(component2),
   etc...
  }

new Effect.multiple(effects).toJavascript();

On Fri, Jun 6, 2008 at 9:41 PM, Ryan Sonnek [EMAIL PROTECTED]
wrote:



 

I'll take a swing at it and try to check something workable in asap.


On 6/6/08, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED]

wrote:


   

Hmm

The Effect's as they are now gives me some trouble, because you 
need to
give the component when creating the component. It would be much 
more

flexible if it could be changed. And would allow the user to control
which
effects were used..

So what do you say? I could make the change:) API should be okay, 
and we

could deprecate the old constructor..

Ryan Sonnek wrote:



 
Not sure what this 'toaster' is, but i really like the multiple 
effect!

 is
it available in 1.8 or is this in scriptaculous 2.0?

We have a scriptaculous header contributor using the
ScriptaculousAjaxBehavior.newJavascriptBindingBehavior().  do 
you need

something different?


On Wed, Jun 4, 2008 at 8:32 PM, Nino Saturnino Martinez Vazquez 
Wael 

[EMAIL PROTECTED] wrote:





   

Hi Ryan?

I need this effect :
http://github.com/madrobby/scriptaculous/wikis/effect-multiple 
to be

able
to build the toaster. It's almost done, a scriptaculous header
contributor
would also be very nice.

When im done with the toaster should I just add it to the project?

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


- 


To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






  




--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


- 


To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




  
  

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





  




--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: (Class? extends Page?) casting troubles

2008-06-09 Thread Sebastiaan van Erk

Zappaterrini, Larry wrote:

Sebastiaan,

Point 1 is a good one. I haven't puzzled that through completely. Upon
initial inspection it seems that it is just the compiler being pedantic
about a scenario that wouldn't arise in practice. I'll have to think
about it some more.

I might be missing something with point 2, but what is wrong with
ClassFoo clazz = Foo.class?


If Foo is a generic type (as in the example I gave), then the above 
assignment will give you a warning (which I don't know how to get rid 
off without a suppress)...


Foo is a raw type. References to generic type FooT should be parameterized

Regards,
Sebastiaan


Cheers,
Larry

-Original Message-
From: Sebastiaan van Erk [mailto:[EMAIL PROTECTED] 
Sent: Saturday, June 07, 2008 3:57 AM

To: users@wicket.apache.org
Subject: Re: (Class? extends Page?) casting troubles

Zappaterrini, Larry wrote:

Sorry, I should have been more clear about subtype. :) When dealing

with

raw types, the raw type is considered a super type of the generic

type.

So Bar is a super type of Bar?. Since RawType extends the raw type
Bar, consider it to be a peer of Bar?. When you consider them as
peers, a warning is warranted. The new example you use works due to
erasure. Bar? as declared in source code becomes Bar in byte code.

So

the statement becomes:

Bar bar = new RawBar();

Which is perfectly legal. I have found that most of perceived
inconsistencies in Java generics stems  from erasure and sub type
substitution. The golden rule of generics is that the byte code

produced

by compiling generics will never produce an invalid cast so long as

the

code does not produce any warnings. This causes some things that may
seem intuitive to be illegal.


Thanks for your explanation. I still think it's all rather horrible 
though. Type erasure was a huge mistake if you ask me. Two questions for


you though...

1) Can you come up with an example where assigning a Foo? extends Bar 
to a Foo? extends Bar? causes an invalid cast? (So I can understand 
why this intuitive seeming assignment is illegal).


2) How do you get rid of the warning in ClassFoo clazz = Foo.class 
without using Class?? Because it would seem strange if there is no 
warning free way to use a certain language construct...


Regards,
Sebastiaan


-Original Message-
From: Sebastiaan van Erk [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 06, 2008 4:16 PM

To: users@wicket.apache.org
Subject: Re: (Class? extends Page?) casting troubles

Zappaterrini, Larry wrote:

In the example you have detailed, RawBar is not a subtype of Bar?
since it extends the raw type Bar.

I guess it depends on the definition of subtype. It is at least the

case
that the following assignment compiles without warnings (without 
warnings about unchecked casts):


   Bar? bar = new RawBar();

So is it then a subtype? Or isn't it? It's all terribly inconsistent
if 

you ask me. :-(

Regards,
Sebastiaan




-Original Message-
From: Sebastiaan van Erk [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 06, 2008 11:31 AM

To: users@wicket.apache.org
Subject: Re: (Class? extends Page?) casting troubles

ARgh, you always make typos with this stuff.

See correction.

Sebastiaan van Erk wrote:

Martin Funk wrote:


Class? extends Page? means class of (anything that extends

(page of

anything)).

I'm not so sure.

There are 2 separate issues:

ISSUE 1: Foo? extends Bar? is not assignable from a FooRawBar 
where RawBar extends Bar as a raw type. That is, given:


  static class FooT {
  }

  static class BarT {
  }

  static class RawBar extends Bar {
  }

  static class SubBarT extends BarT {
  }

Thus:

   Bar? bar = new RawBar(); // works, because RawBar is a subtype

of

Bar?

But:

   Foo? extends Bar? rawbar = new RawBar(); // DOES NOT WORK -
THIS 

IS CAUSING ONE HALF OF ALL OUR HEADACHES

(correction:)
Foo? extends Bar? rawbar = new FooRawBar(); // DOES NOT

WORK

-

THIS IS CAUSING ONE HALF OF ALL OUR HEADACHES

Btw, this does work (like you expect):
Foo? extends Bar? rawbar2 = new FooSubBar?();


Note that this is the issue that complete baffles me, as RawBar is a



subtype of Bar?, so I *really* *really* *REALLY* have no idea why
the 

compiler chokes on this.

ISSUE 2: The class literal of a generic type returns a class of a

raw

type.  Thus Foo.class return ClassFoo. This is also really messed
up, 

because:

ClassFoo fc = Foo.class;


compiles, but generates a warning (reference to raw type). But if

you

type this in eclipse:

x fc = Foo.class;

and use eclipse quickfix to change x to the correct type, it'll 
change it to precisely ClassFoo (the JLS is very short about this,
see 
also 


http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#1
5.8.2). 

So what the heck is the proper type for the class literal??? I
couldn't 

find any!

Finally, note that when you define a method like this:

  static void method1(Foo? extends Bar? y) {
  }

it works like a charm for a new 

Re: Can't get round this problem

2008-06-09 Thread Nino Saturnino Martinez Vazquez Wael

Okay, im writing inline...

Mathias P.W Nilsson wrote:

Here is the fragment for sending external data. The form is a class variable
and is visible in the fragment

final class PostenOrderFragment extends Fragment{
private static final long serialVersionUID = 1L;

public PostenOrderFragment( String panel, String id ){
super( panel, id, OrderControl.this );
final PostenOrder order = (PostenOrder) getOrder();
/* Transfer user data. Copy the data from the user to the order 
*/
order.transferUserData( 
((HairlessSession)getSession()).getUser() );


final HiddenField Merchant_id = new HiddenField(  
Merchant_id, new
Model(  ) );
final HiddenField Version = new HiddenField(  Version,   new Model( 

));
final HiddenField Customer_refno = new HiddenField(  
Customer_refno, new
Model(   ));
final HiddenField Currency = new HiddenField( Currency, new Model( 

));
final HiddenField Amount = new HiddenField(  Amount,  new Model( 
 ));
final HiddenField VAT = new HiddenField(  VAT,   new Model( 
 ));
		final HiddenField Payment_method = new HiddenField(  Payment_method, 
new Model(  ) );

final HiddenField Purchase_date = new HiddenField(  
Purchase_date, new
Model(  ) );
final HiddenField Response_URL = new HiddenField(  
Response_URL, new
Model(  ) );
final HiddenField Card_num = new HiddenField( Card_num,  new Model( 
 )
);
final HiddenField Cvx2 = new HiddenField(  Cvx2,  new Model( 
 ) );
final HiddenField Exp_date = new HiddenField(  Exp_date,  new Model( 

) );
final HiddenField Card_type = new HiddenField(  Card_type,  
new Model(
 ) );
final HiddenField MAC = new HiddenField(  MAC, new Model(  
) );
add( Merchant_id );
add( Version);
add( Customer_refno);
add( Currency );
add( Amount );
add( VAT );
add( Payment_method );
add( Purchase_date );
add( Response_URL);
add(Card_num );
add(Cvx2 );
add(Exp_date );
add( Card_type );
add( MAC );




add(new AjaxSubmitLink( placeOrder, form ) {
private static final long serialVersionUID = 1L;

@Override
protected IAjaxCallDecorator getAjaxCallDecorator(){
return new IAjaxCallDecorator(){
private static final long 
serialVersionUID = 1L;
public CharSequence 
decorateScript(CharSequence script)
{
return 
document.getElementById('+ getMarkupId()
+').disabled=true;+script;
}
public CharSequence 
decorateOnFailureScript(CharSequence script)
{
return 
script+document.getElementById('+ getMarkupId()
+').disabled=false;;
}
public CharSequence 
decorateOnSuccessScript(CharSequence script)
{
return 
script+document.getElementById('+ getMarkupId()
+').disabled=false;;
}
};
}
  
Im not sure why you need the above, could'nt you just append it to 
target below, and have all code the same place?. I guess I just havent 
used ajaxcalldecorators that much.


protected void onError(AjaxRequestTarget target, Form 
form){
target.addComponent(feedback);
target.addComponent(form);
   }

@Override
protected void onSubmit(AjaxRequestTarget target, Form 
form ) {

if( target != null ){
			
		

target.addComponent(this);
  

Not sure why you need the ajax button added again?

target.addComponent(form);
  
Why do you need the form to be updated? If anything then only the hidden 
field with hash value?


Re: FileUploadField, CSS, and empty form values

2008-06-09 Thread Nino Saturnino Martinez Vazquez Wael
I'd suggest to use firebug to check if it actually works. There is no 
magic in this at least..:)


Michael Laccetti wrote:
I'm trying to attach some CSS to the browse button in a FileUploadField. 
Rather, since this is actually impossible, I'm hiding the actual field, and

creating a pretty looking fake similar to what this page does:
http://www.quirksmode.org/dom/inputfile.html.  The issue is that when I
submit the form, even though the field seems to be populated in the browser,
the value doesn't make it to the form itself.  Is there some magic required
to get the field value to actually populate in the form?

-
--
Michael Laccetti (416)558-9718
S2G Limited   http://www.s2g.ca/
  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PackageResource - why does'nt get Locale directly from Session ?

2008-06-09 Thread Stefan Simik

yes, sure :)
It's OK, it is really my preference only ;)



Eelco Hillenius wrote:
 
 We'd have to have a good reason the break the API. And it's just
 something you'd prefer to be different, but it doesn't give you
 troubles you can't get around, right? :-)
 
 Eelco
 
 On Mon, Jun 9, 2008 at 3:21 AM, Stefan Simik [EMAIL PROTECTED]
 wrote:

 Oh yes :-)
 I think, that taking Locale from session could be the most used = the
 most
 suitable default strategy.
 Session is the most used place for storing Locale.
 I think, that preferred way should be getting Locale from Session as
 default.
 Passing Locale parameter to the PackageResource constructor does'nt seem
 to
 me like a better way.
 Who wants, can subclass PackageResource and override in you own specific
 way.
 What do you think about it ?

 Stefan




 That's just by design to not make the assumption where the locale
 comes from. But you can override the class and pass
 Session.get().getLocale() and you're done :-)

 Eelco

 --
 View this message in context:
 http://www.nabble.com/PackageResource---why-does%27nt-get-Locale-directly-from-Session---tp17696134p17730001.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/PackageResource---why-does%27nt-get-Locale-directly-from-Session---tp17696134p17737813.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FileUploadField, CSS, and empty form values

2008-06-09 Thread Michael Laccetti

Yeah, I have been doing so, and do not see the field contents going through. 
I found an alternative, though, because I stupidly forgot that file upload +
AJAX = no worky.  Instead, I've embedded an iframe, and got the form
submission going on through there, and that seems to be doing the trick. 
Though my CSS issues are still there, but that has nothing to do with Wicket
itself.


Nino.Martinez wrote:
 
 I'd suggest to use firebug to check if it actually works. There is no 
 magic in this at least..:)
 


-
--
Michael Laccetti (416)558-9718
S2G Limited   http://www.s2g.ca/
-- 
View this message in context: 
http://www.nabble.com/FileUploadField%2C-CSS%2C-and-empty-form-values-tp17735661p17737993.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: AutoCompleteTextField scrolls entire page

2008-06-09 Thread Michael Mehrle
I cannot use the generics release for this commercial project. Would need a 
build based on 1.3.x that fixes this.

Michael

-Original Message-
From: Ricky [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 06, 2008 8:22 PM
To: users@wicket.apache.org
Subject: Re: AutoCompleteTextField scrolls entire page

err 1.3-SNAPSHOT for now, or 1.4-m1.

On Fri, Jun 6, 2008 at 11:20 PM, Ricky [EMAIL PROTECTED] wrote:

 Use SNAPSHOT


 On Fri, Jun 6, 2008 at 8:17 PM, Michael Mehrle [EMAIL PROTECTED]
 wrote:

 Where can I get a build of 1.3.4, so I can test this?

 Michael

 -Original Message-
 From: Ricky [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 06, 2008 2:47 PM
 To: users@wicket.apache.org
 Subject: Re: AutoCompleteTextField scrolls entire page

 Hey,
 This is fixed 1.4-m1 and 1.3.4 (to be released at some point, I am not
 sure
 when).

 Rick

 On Fri, Jun 6, 2008 at 5:02 PM, Michael Mehrle [EMAIL PROTECTED]
 wrote:

  I am seeing the following problem with several AutoCompleteTextFields on
  different pages:
 
 
 
  When I type a letter and the menu items are showing I am unable to
  scroll down the list with my mouse and make a selection. What happens
  instead is that the page scrolls up towards the mouse and the
  Autocomplete plus the menu scrolls out of view.
 
 
 
  Again, two developers here have the same problem with two separate
  implementations/pages. So, I am fairly sure this has nothing to do with
  the way we integrated it. My first guess would be the style sheet, but
  we have not made any pertinent changes.
 
 
 
  Any help would be appreciated - this behavior is being encountered on
  Firefox on Windows/Mac. On IE it doesn't work at all and I just get some
  'type mismatch' error message. Safari on Windows doesn't do anything - I
  don't see a menu at all.
 
 
 
  Thanks,
 
 
 
  Michael
 
 







RE: AutoCompleteTextField scrolls entire page

2008-06-09 Thread Michael Mehrle
Marcus - I did NOT resolve it yet - not getting much help here except
for talk about some mystical 1.3.4 release I can't get my hands on. It
breaks with everything we wrote here involving AutoComplete - and all of
it was working fine with 1.3.2 as far as I remember. So, this puppy is
broken and if someone can point me the right way I would love to help
fix it. But at this point I don't know where to start - not exactly a
huge JavaScript/CSS aficionado.

Keep me posted if you find anything - will do the same.

Michael



-Original Message-
From: Marcus Mattila [mailto:[EMAIL PROTECTED] 
Sent: Sunday, June 08, 2008 5:52 AM
To: users@wicket.apache.org
Subject: Re: AutoCompleteTextField scrolls entire page

Hi, we have reproduced the same problem with AutocompleteTextfield. We
use 1.3-SNAPSHOT. Did you get it solved?

Code and css we use is same as in Wicket Examples:
http://www.wicket-library.com/wicket-examples/ajax/?wicket:interface=sou
rces:0:filespanel:file:2:link::ILinkListener::


br,
Marcus


On Sat, Jun 7, 2008 at 12:02 AM, Michael Mehrle [EMAIL PROTECTED]
wrote:
 I am seeing the following problem with several AutoCompleteTextFields
on
 different pages:



 When I type a letter and the menu items are showing I am unable to
 scroll down the list with my mouse and make a selection. What happens
 instead is that the page scrolls up towards the mouse and the
 Autocomplete plus the menu scrolls out of view.



 Again, two developers here have the same problem with two separate
 implementations/pages. So, I am fairly sure this has nothing to do
with
 the way we integrated it. My first guess would be the style sheet, but
 we have not made any pertinent changes.



 Any help would be appreciated - this behavior is being encountered on
 Firefox on Windows/Mac. On IE it doesn't work at all and I just get
some
 'type mismatch' error message. Safari on Windows doesn't do anything -
I
 don't see a menu at all.



 Thanks,



 Michael



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FileUploadField, CSS, and empty form values

2008-06-09 Thread Nino Saturnino Martinez Vazquez Wael

Ahh, yeah I remember something about that...

Great to hear that you got it working. Whats the CSS issue(I've been 
thinking of doing a nice fileupload myself)?


Michael Laccetti wrote:
Yeah, I have been doing so, and do not see the field contents going through. 
I found an alternative, though, because I stupidly forgot that file upload +

AJAX = no worky.  Instead, I've embedded an iframe, and got the form
submission going on through there, and that seems to be doing the trick. 
Though my CSS issues are still there, but that has nothing to do with Wicket

itself.


Nino.Martinez wrote:
  
I'd suggest to use firebug to check if it actually works. There is no 
magic in this at least..:)






-
--
Michael Laccetti (416)558-9718
S2G Limited   http://www.s2g.ca/
  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AutoCompleteTextField scrolls entire page

2008-06-09 Thread Eelco Hillenius
On Mon, Jun 9, 2008 at 10:58 AM, Michael Mehrle [EMAIL PROTECTED] wrote:
 Marcus - I did NOT resolve it yet - not getting much help here except
 for talk about some mystical 1.3.4 release I can't get my hands on. It
 breaks with everything we wrote here involving AutoComplete - and all of
 it was working fine with 1.3.2 as far as I remember. So, this puppy is
 broken and if someone can point me the right way I would love to help
 fix it. But at this point I don't know where to start - not exactly a
 huge JavaScript/CSS aficionado.

If this used to work, but doesn't now, you should be able to track
down the differences between the two releases. The first thing you
could try is to get the exact source of the AC component of 1.3.2 (all
releases are tagged in our SVN repo) and see if that makes the
difference. If it does, a change in that component did, if not,
something larger (the ajax engine for instance) is in play.

Could you also open a JIRA issue for it if you confirmed this is a bug?

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AutoCompleteTextField behaviors and validator

2008-06-09 Thread Cristi Manole
Hello,

I'm using a AutoCompleteTextField and I need to assign two validators and a
behavior to it, like this:

add(telefon = new AutoCompleteTextField(Telefon, new
Model(), new AbstractAutoCompleteTextRenderer() {
@Override
protected String getTextValue(Object object) {
ClientDAO client = (ClientDAO)object;
return client.getTelefon() + | + client.getNume() +
| + client.getPrenume();
}

@Override
protected void renderChoice(Object object, Response
response, String criteria){
ClientDAO client = (ClientDAO)object;
response.write(client.getTelefon() +  -  +
client.getNume() +   + client.getPrenume());
}
}) {
@Override
protected IteratorClientDAO getChoices(String input) {
return jdbcClienti.getClienti(input).iterator();
}
});
telefon.add(new AjaxFormComponentUpdatingBehavior(onchange){
@Override
protected void onUpdate(AjaxRequestTarget target) {
String[] date =
telefon.getModelObject().toString().split(\\|);
telefon.setModelObject(date[0]);
target.addComponent(telefon);
if(date.length == 3) {
selectedClient = jdbcClienti.getClientFor(date[1],
date[2], date[0]);
}
}
});
telefon.add(new StringValidator.ExactLengthValidator(10));
telefon.add(new PatternValidator(\\d+));
telefon.setRequired(true);

using the code above, the onUpdate method is never called. If I move the
validators inside de onUpdate, all will work just fine until there's an
error and then the behavior will again not work.

How can I make all three work as required? Why don't they?

Thank you,
Cristi Manole


RE: AutoCompleteTextField scrolls entire page

2008-06-09 Thread Michael Mehrle
I have not gone back to 1.3.2 yet - will give this a run in a few. If it
works with 1.3.2 I will open a JIRA ticket for 1.3.3. 

FYI, I don't seem the only one experiencing this - someone else posted
about this as he was able to replicate the problem with one of your
wicket demos.

Michael

-Original Message-
From: Eelco Hillenius [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 09, 2008 11:12 AM
To: users@wicket.apache.org
Subject: Re: AutoCompleteTextField scrolls entire page

On Mon, Jun 9, 2008 at 10:58 AM, Michael Mehrle [EMAIL PROTECTED]
wrote:
 Marcus - I did NOT resolve it yet - not getting much help here except
 for talk about some mystical 1.3.4 release I can't get my hands on. It
 breaks with everything we wrote here involving AutoComplete - and all
of
 it was working fine with 1.3.2 as far as I remember. So, this puppy is
 broken and if someone can point me the right way I would love to help
 fix it. But at this point I don't know where to start - not exactly a
 huge JavaScript/CSS aficionado.

If this used to work, but doesn't now, you should be able to track
down the differences between the two releases. The first thing you
could try is to get the exact source of the AC component of 1.3.2 (all
releases are tagged in our SVN repo) and see if that makes the
difference. If it does, a change in that component did, if not,
something larger (the ajax engine for instance) is in play.

Could you also open a JIRA issue for it if you confirmed this is a bug?

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AutoCompleteTextField scrolls entire page

2008-06-09 Thread Igor Vaynberg
before you submit a jira ticket make sure it is also broken in the
wicket-1.3.x svn branch - which will be the 1.3.4 release - nothing
really mystical about it.

-igor

On Mon, Jun 9, 2008 at 11:15 AM, Michael Mehrle [EMAIL PROTECTED] wrote:
 I have not gone back to 1.3.2 yet - will give this a run in a few. If it
 works with 1.3.2 I will open a JIRA ticket for 1.3.3.

 FYI, I don't seem the only one experiencing this - someone else posted
 about this as he was able to replicate the problem with one of your
 wicket demos.

 Michael

 -Original Message-
 From: Eelco Hillenius [mailto:[EMAIL PROTECTED]
 Sent: Monday, June 09, 2008 11:12 AM
 To: users@wicket.apache.org
 Subject: Re: AutoCompleteTextField scrolls entire page

 On Mon, Jun 9, 2008 at 10:58 AM, Michael Mehrle [EMAIL PROTECTED]
 wrote:
 Marcus - I did NOT resolve it yet - not getting much help here except
 for talk about some mystical 1.3.4 release I can't get my hands on. It
 breaks with everything we wrote here involving AutoComplete - and all
 of
 it was working fine with 1.3.2 as far as I remember. So, this puppy is
 broken and if someone can point me the right way I would love to help
 fix it. But at this point I don't know where to start - not exactly a
 huge JavaScript/CSS aficionado.

 If this used to work, but doesn't now, you should be able to track
 down the differences between the two releases. The first thing you
 could try is to get the exact source of the AC component of 1.3.2 (all
 releases are tagged in our SVN repo) and see if that makes the
 difference. If it does, a change in that component did, if not,
 something larger (the ajax engine for instance) is in play.

 Could you also open a JIRA issue for it if you confirmed this is a bug?

 Eelco

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can't get round this problem

2008-06-09 Thread Mathias P.W Nilsson

Thanks!

I haven't posted all code but there is a check box acceptConditions that
must be clicked to get this to work

How can this be implemented in two forms? I'm not quite following. First I
need to have wicket
check all the data and that the conditions is checked. And then, how can I
submit the other none wicket form?
-- 
View this message in context: 
http://www.nabble.com/Can%27t-get-round-this-problem-tp17723379p17738820.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: AutoCompleteTextField scrolls entire page

2008-06-09 Thread Michael Mehrle
Thanks for clearing that up, Igor. I was under the impression that was
the 1.3.3 release. Will definitely give this a run as well and confirm
before I file any reports.

Cheers,

Michael

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 09, 2008 11:25 AM
To: users@wicket.apache.org
Subject: Re: AutoCompleteTextField scrolls entire page

before you submit a jira ticket make sure it is also broken in the
wicket-1.3.x svn branch - which will be the 1.3.4 release - nothing
really mystical about it.

-igor

On Mon, Jun 9, 2008 at 11:15 AM, Michael Mehrle [EMAIL PROTECTED]
wrote:
 I have not gone back to 1.3.2 yet - will give this a run in a few. If
it
 works with 1.3.2 I will open a JIRA ticket for 1.3.3.

 FYI, I don't seem the only one experiencing this - someone else posted
 about this as he was able to replicate the problem with one of your
 wicket demos.

 Michael

 -Original Message-
 From: Eelco Hillenius [mailto:[EMAIL PROTECTED]
 Sent: Monday, June 09, 2008 11:12 AM
 To: users@wicket.apache.org
 Subject: Re: AutoCompleteTextField scrolls entire page

 On Mon, Jun 9, 2008 at 10:58 AM, Michael Mehrle
[EMAIL PROTECTED]
 wrote:
 Marcus - I did NOT resolve it yet - not getting much help here except
 for talk about some mystical 1.3.4 release I can't get my hands on.
It
 breaks with everything we wrote here involving AutoComplete - and all
 of
 it was working fine with 1.3.2 as far as I remember. So, this puppy
is
 broken and if someone can point me the right way I would love to help
 fix it. But at this point I don't know where to start - not exactly a
 huge JavaScript/CSS aficionado.

 If this used to work, but doesn't now, you should be able to track
 down the differences between the two releases. The first thing you
 could try is to get the exact source of the AC component of 1.3.2 (all
 releases are tagged in our SVN repo) and see if that makes the
 difference. If it does, a change in that component did, if not,
 something larger (the ajax engine for instance) is in play.

 Could you also open a JIRA issue for it if you confirmed this is a
bug?

 Eelco

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Can a Panel's id be re-assigned after construction?

2008-06-09 Thread Peter Gardfjell

Hi,

a quick question. Is it possible to assign a new id to a Panel after it has
been constructed?
Something similar to:

  public Panel createPanel() {
return new MyPanel(dummyID, ...);
  }
  ...
  ...
  Panel myPanel = createPanel();
  myPanel.setId(newID);

I would like to have a component that acts as a Panel factory (the
createPanel method above), without requiring the factory to now about the
markup context of the calling code. Hence, the factory method would create
it with a dummy id that is replaced by the consumer to adapt it to its
markup context.

Is something along these lines possible in Wicket? Or is there perhaps
another (wicket way) for achieving tasks like these.

regards, Peter

-- 
View this message in context: 
http://www.nabble.com/Can-a-Panel%27s-id-be-re-assigned-after-construction--tp17739309p17739309.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can a Panel's id be re-assigned after construction?

2008-06-09 Thread Igor Vaynberg
pass the id into the createPanel method

-igor

On Mon, Jun 9, 2008 at 11:51 AM, Peter Gardfjell
[EMAIL PROTECTED] wrote:

 Hi,

 a quick question. Is it possible to assign a new id to a Panel after it has
 been constructed?
 Something similar to:

  public Panel createPanel() {
return new MyPanel(dummyID, ...);
  }
  ...
  ...
  Panel myPanel = createPanel();
  myPanel.setId(newID);

 I would like to have a component that acts as a Panel factory (the
 createPanel method above), without requiring the factory to now about the
 markup context of the calling code. Hence, the factory method would create
 it with a dummy id that is replaced by the consumer to adapt it to its
 markup context.

 Is something along these lines possible in Wicket? Or is there perhaps
 another (wicket way) for achieving tasks like these.

 regards, Peter

 --
 View this message in context: 
 http://www.nabble.com/Can-a-Panel%27s-id-be-re-assigned-after-construction--tp17739309p17739309.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FileUploadField, CSS, and empty form values

2008-06-09 Thread Michael Laccetti

Took me a while to figure out how to get the nice looking stuff to properly
hide the old-and-ugly implementation.  Once I got it worked out (woo
Firebug), things moved along.  I just need to finalize the AJAX callback
between the iframe and the parent page.

Here's a sample of the nice looking file upload field:
http://www.nihilist.ca/images/file_upload_css.jpg


Nino.Martinez wrote:
 Ahh, yeah I remember something about that...
 
 Great to hear that you got it working. Whats the CSS issue(I've been 
 thinking of doing a nice fileupload myself)?


-
--
Michael Laccetti (416)558-9718
S2G Limited   http://www.s2g.ca/
-- 
View this message in context: 
http://www.nabble.com/FileUploadField%2C-CSS%2C-and-empty-form-values-tp17735661p17739810.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can a Panel's id be re-assigned after construction?

2008-06-09 Thread Peter Gardfjell


Of course. In the toy example I attached, the obvious solution is to add an
id parameter.
However, in some cases, for instance when the factory methods contain longer
parameter lists, the extra identifier parameter tends to clutter the API. I
really like the encapsulation that Panels offer, but it kind of bugs me that
they always need to be created in the context of the consumer's markup (that
is, knowing the markup identifier at the consuming end). Maybe I just
haven't fully understood the Wicket paradigm yet...

Still, you did not really answer my original question (although you may have
done so, implicitly... :-).
Just to make things absolutely clear: can a Panel only be assigned an
identifier at the time its constructor  is called?

/Peter



igor.vaynberg wrote:
 
 pass the id into the createPanel method
 
 -igor
 
 On Mon, Jun 9, 2008 at 11:51 AM, Peter Gardfjell
 [EMAIL PROTECTED] wrote:

 Hi,

 a quick question. Is it possible to assign a new id to a Panel after it
 has
 been constructed?
 Something similar to:

  public Panel createPanel() {
return new MyPanel(dummyID, ...);
  }
  ...
  ...
  Panel myPanel = createPanel();
  myPanel.setId(newID);

 I would like to have a component that acts as a Panel factory (the
 createPanel method above), without requiring the factory to now about the
 markup context of the calling code. Hence, the factory method would
 create
 it with a dummy id that is replaced by the consumer to adapt it to its
 markup context.

 Is something along these lines possible in Wicket? Or is there perhaps
 another (wicket way) for achieving tasks like these.

 regards, Peter

 --
 View this message in context:
 http://www.nabble.com/Can-a-Panel%27s-id-be-re-assigned-after-construction--tp17739309p17739309.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Can-a-Panel%27s-id-be-re-assigned-after-construction--tp17739309p17739811.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can a Panel's id be re-assigned after construction?

2008-06-09 Thread Martijn Dashorst
On Mon, Jun 9, 2008 at 9:21 PM, Peter Gardfjell
[EMAIL PROTECTED] wrote:
 Just to make things absolutely clear: can a Panel only be assigned an
 identifier at the time its constructor  is called?

Yes.

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FileUploadField, CSS, and empty form values

2008-06-09 Thread Nino Saturnino Martinez Vazquez Wael

Yup thats nice:)

Michael Laccetti wrote:

Took me a while to figure out how to get the nice looking stuff to properly
hide the old-and-ugly implementation.  Once I got it worked out (woo
Firebug), things moved along.  I just need to finalize the AJAX callback
between the iframe and the parent page.

Here's a sample of the nice looking file upload field:
http://www.nihilist.ca/images/file_upload_css.jpg


Nino.Martinez wrote:
  

Ahh, yeah I remember something about that...

Great to hear that you got it working. Whats the CSS issue(I've been 
thinking of doing a nice fileupload myself)?




-
--
Michael Laccetti (416)558-9718
S2G Limited   http://www.s2g.ca/
  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can a Panel's id be re-assigned after construction?

2008-06-09 Thread Igor Vaynberg
it is possible. you can write a component that is only allowed to have
one child with any id using an IComponentResolver. is that a good
practice? if i were implementing your factory interface i would be
confused as to what id i should use since the panel takes it as a
constructor arg...so which way is better is up to you.

-igor

On Mon, Jun 9, 2008 at 12:21 PM, Peter Gardfjell
[EMAIL PROTECTED] wrote:


 Of course. In the toy example I attached, the obvious solution is to add an
 id parameter.
 However, in some cases, for instance when the factory methods contain longer
 parameter lists, the extra identifier parameter tends to clutter the API. I
 really like the encapsulation that Panels offer, but it kind of bugs me that
 they always need to be created in the context of the consumer's markup (that
 is, knowing the markup identifier at the consuming end). Maybe I just
 haven't fully understood the Wicket paradigm yet...

 Still, you did not really answer my original question (although you may have
 done so, implicitly... :-).
 Just to make things absolutely clear: can a Panel only be assigned an
 identifier at the time its constructor  is called?

 /Peter



 igor.vaynberg wrote:

 pass the id into the createPanel method

 -igor

 On Mon, Jun 9, 2008 at 11:51 AM, Peter Gardfjell
 [EMAIL PROTECTED] wrote:

 Hi,

 a quick question. Is it possible to assign a new id to a Panel after it
 has
 been constructed?
 Something similar to:

  public Panel createPanel() {
return new MyPanel(dummyID, ...);
  }
  ...
  ...
  Panel myPanel = createPanel();
  myPanel.setId(newID);

 I would like to have a component that acts as a Panel factory (the
 createPanel method above), without requiring the factory to now about the
 markup context of the calling code. Hence, the factory method would
 create
 it with a dummy id that is replaced by the consumer to adapt it to its
 markup context.

 Is something along these lines possible in Wicket? Or is there perhaps
 another (wicket way) for achieving tasks like these.

 regards, Peter

 --
 View this message in context:
 http://www.nabble.com/Can-a-Panel%27s-id-be-re-assigned-after-construction--tp17739309p17739309.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 --
 View this message in context: 
 http://www.nabble.com/Can-a-Panel%27s-id-be-re-assigned-after-construction--tp17739309p17739811.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: AutoCompleteTextField scrolls entire page

2008-06-09 Thread Michael Mehrle
Igor - please help me out - I have been trying to download that snapshot
branch/tag but it keeps failing. I'm using maven and am following the
instructions (http://tinyurl.com/5dnxsf), but it keeps failing.

Michael

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 09, 2008 11:25 AM
To: users@wicket.apache.org
Subject: Re: AutoCompleteTextField scrolls entire page

before you submit a jira ticket make sure it is also broken in the
wicket-1.3.x svn branch - which will be the 1.3.4 release - nothing
really mystical about it.

-igor

On Mon, Jun 9, 2008 at 11:15 AM, Michael Mehrle [EMAIL PROTECTED]
wrote:
 I have not gone back to 1.3.2 yet - will give this a run in a few. If
it
 works with 1.3.2 I will open a JIRA ticket for 1.3.3.

 FYI, I don't seem the only one experiencing this - someone else posted
 about this as he was able to replicate the problem with one of your
 wicket demos.

 Michael

 -Original Message-
 From: Eelco Hillenius [mailto:[EMAIL PROTECTED]
 Sent: Monday, June 09, 2008 11:12 AM
 To: users@wicket.apache.org
 Subject: Re: AutoCompleteTextField scrolls entire page

 On Mon, Jun 9, 2008 at 10:58 AM, Michael Mehrle
[EMAIL PROTECTED]
 wrote:
 Marcus - I did NOT resolve it yet - not getting much help here except
 for talk about some mystical 1.3.4 release I can't get my hands on.
It
 breaks with everything we wrote here involving AutoComplete - and all
 of
 it was working fine with 1.3.2 as far as I remember. So, this puppy
is
 broken and if someone can point me the right way I would love to help
 fix it. But at this point I don't know where to start - not exactly a
 huge JavaScript/CSS aficionado.

 If this used to work, but doesn't now, you should be able to track
 down the differences between the two releases. The first thing you
 could try is to get the exact source of the AC component of 1.3.2 (all
 releases are tagged in our SVN repo) and see if that makes the
 difference. If it does, a change in that component did, if not,
 something larger (the ajax engine for instance) is in play.

 Could you also open a JIRA issue for it if you confirmed this is a
bug?

 Eelco

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Getting the snapshot via maven2?

2008-06-09 Thread Michael Mehrle
I have been trying to download that snapshot branch/tag but it keeps
failing. I'm using maven and am following the instructions
(http://tinyurl.com/5dnxsf) but without success. How do I get
today/yesterday's snapshot of 1.3.x?

 

Cheers,

 

Michael

 



Re: AutoCompleteTextField scrolls entire page

2008-06-09 Thread Igor Vaynberg
svn co https://svn.apache.org/repos/asf/wicket/branches/wicket-1.3.x
wicket-1.3.x
cd wicket-1.3.x
mvn install

-igor

On Mon, Jun 9, 2008 at 1:18 PM, Michael Mehrle [EMAIL PROTECTED] wrote:
 Igor - please help me out - I have been trying to download that snapshot
 branch/tag but it keeps failing. I'm using maven and am following the
 instructions (http://tinyurl.com/5dnxsf), but it keeps failing.

 Michael

 -Original Message-
 From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
 Sent: Monday, June 09, 2008 11:25 AM
 To: users@wicket.apache.org
 Subject: Re: AutoCompleteTextField scrolls entire page

 before you submit a jira ticket make sure it is also broken in the
 wicket-1.3.x svn branch - which will be the 1.3.4 release - nothing
 really mystical about it.

 -igor

 On Mon, Jun 9, 2008 at 11:15 AM, Michael Mehrle [EMAIL PROTECTED]
 wrote:
 I have not gone back to 1.3.2 yet - will give this a run in a few. If
 it
 works with 1.3.2 I will open a JIRA ticket for 1.3.3.

 FYI, I don't seem the only one experiencing this - someone else posted
 about this as he was able to replicate the problem with one of your
 wicket demos.

 Michael

 -Original Message-
 From: Eelco Hillenius [mailto:[EMAIL PROTECTED]
 Sent: Monday, June 09, 2008 11:12 AM
 To: users@wicket.apache.org
 Subject: Re: AutoCompleteTextField scrolls entire page

 On Mon, Jun 9, 2008 at 10:58 AM, Michael Mehrle
 [EMAIL PROTECTED]
 wrote:
 Marcus - I did NOT resolve it yet - not getting much help here except
 for talk about some mystical 1.3.4 release I can't get my hands on.
 It
 breaks with everything we wrote here involving AutoComplete - and all
 of
 it was working fine with 1.3.2 as far as I remember. So, this puppy
 is
 broken and if someone can point me the right way I would love to help
 fix it. But at this point I don't know where to start - not exactly a
 huge JavaScript/CSS aficionado.

 If this used to work, but doesn't now, you should be able to track
 down the differences between the two releases. The first thing you
 could try is to get the exact source of the AC component of 1.3.2 (all
 releases are tagged in our SVN repo) and see if that makes the
 difference. If it does, a change in that component did, if not,
 something larger (the ajax engine for instance) is in play.

 Could you also open a JIRA issue for it if you confirmed this is a
 bug?

 Eelco

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can't get round this problem

2008-06-09 Thread Nino Saturnino Martinez Vazquez Wael



Mathias P.W Nilsson wrote:

Thanks!

  

No problem.

I haven't posted all code but there is a check box acceptConditions that
must be clicked to get this to work
  
Okay, but just add that then if it's needed. Always remember when 
working with ajax only to update whats need or you could just use normal 
posting. The idea are to update as little as possible, that will also 
reduce flickering.

How can this be implemented in two forms? I'm not quite following. First I
need to have wicket
check all the data and that the conditions is checked.

I think you got that right:)

 And then, how can I
submit the other none wicket form?
  
Okay then you have a nonvisible non wicket form (yes I know it's not 
very DRY).  You can then set the values in that one instead using your 
javascript, that way you wont be messing with wicket.


Just have the form in the .html and modify your javascript to call that 
one...





--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Detect LoginPage redirection with swarm

2008-06-09 Thread Mark Lichtenberg
Hi - We have a fairly straightforward app in which each page extends  
SecureWebPage such that if a user attempts to directly land on a  
mounted page, they will be redirected to our login page (as supplied  
in our Application.getLoginpage() method). After logging in, the user  
is directed to the originally requested page.


We have a requirement to alert a user that they will be redirected on  
the login page - but I can not find a way to detect this in our Login  
page class. I've tried getRequestCycle().isRedirect(), but this  
returns false whether the page is loaded directly or as an intercept  
page. Anyone know how I should approach this? Thanks.


Mark

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Page refresh

2008-06-09 Thread Ricky
Hi,

My page class consists of :
1.) Panel -A  2.) Panel - B.

Just for FYI - Panel A has Refreshing View and a refreshing view nested
within it (nested tables).

When I do a refresh (F5 or simple refresh clicked on browser) on a page, and
nothing seems to happen and all data that was present is lost in process.
Nothing seems to happen as in:
1.) No query is executed (it is expected to do thing that it was doing at
the time of clicking the link to the page).
2.) I put in debug points on the page constructor, refreshing views in the
panel, panel constructor, but it doesn't go anywhere.
3.) The page version doesn't seem to be changing either?! (it does show
everything normally when i click the link to the page again).

I am overriding isVersioned( ) on the page to return true but to no effect;
( I checked, all children components are getting isVersioned with the same).
I tried isVersioned to false (just to see if something else happens :) ),
but no change ...
(the versionManager behaves as it should, meaning, when the page returns
false, it is not added to the version manager).

Am i missing something!!? any help would be appreciable.

Thanks
Rick


RE: Getting the snapshot via maven2?

2008-06-09 Thread Michael Mehrle
Tried that, but had problems. Anyway, Igor gave me the svn instructions and I 
just built it myself.

Thanks for trying to help.

Michael

-Original Message-
From: Ricky [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 09, 2008 3:37 PM
To: users@wicket.apache.org
Subject: Re: Getting the snapshot via maven2?

use 1.3-SNAPSHOT as version.

Rick

On Mon, Jun 9, 2008 at 4:22 PM, Michael Mehrle [EMAIL PROTECTED]
wrote:

 I have been trying to download that snapshot branch/tag but it keeps
 failing. I'm using maven and am following the instructions
 (http://tinyurl.com/5dnxsf) but without success. How do I get
 today/yesterday's snapshot of 1.3.x?



 Cheers,



 Michael






RE: AutoCompleteTextField scrolls entire page

2008-06-09 Thread Michael Mehrle
Alright, it seems that the 1.3-SNAPSHOT release fixes the scrolling
problem. HOWEVER, in IE I still experience a strange z-depth problem.
Meaning that the drop down menu appears *behind* neighboring form fields
- take a look at this screenshot:

http://screencast.com/t/DsqIA4pxtut

Any thoughts? I'm going to post this in its own thread to make sure a
few more folks look at this.

Thanks,

Michael


-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 09, 2008 1:40 PM
To: users@wicket.apache.org
Subject: Re: AutoCompleteTextField scrolls entire page

svn co https://svn.apache.org/repos/asf/wicket/branches/wicket-1.3.x
wicket-1.3.x
cd wicket-1.3.x
mvn install

-igor

On Mon, Jun 9, 2008 at 1:18 PM, Michael Mehrle [EMAIL PROTECTED]
wrote:
 Igor - please help me out - I have been trying to download that
snapshot
 branch/tag but it keeps failing. I'm using maven and am following the
 instructions (http://tinyurl.com/5dnxsf), but it keeps failing.

 Michael

 -Original Message-
 From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
 Sent: Monday, June 09, 2008 11:25 AM
 To: users@wicket.apache.org
 Subject: Re: AutoCompleteTextField scrolls entire page

 before you submit a jira ticket make sure it is also broken in the
 wicket-1.3.x svn branch - which will be the 1.3.4 release - nothing
 really mystical about it.

 -igor

 On Mon, Jun 9, 2008 at 11:15 AM, Michael Mehrle
[EMAIL PROTECTED]
 wrote:
 I have not gone back to 1.3.2 yet - will give this a run in a few. If
 it
 works with 1.3.2 I will open a JIRA ticket for 1.3.3.

 FYI, I don't seem the only one experiencing this - someone else
posted
 about this as he was able to replicate the problem with one of your
 wicket demos.

 Michael

 -Original Message-
 From: Eelco Hillenius [mailto:[EMAIL PROTECTED]
 Sent: Monday, June 09, 2008 11:12 AM
 To: users@wicket.apache.org
 Subject: Re: AutoCompleteTextField scrolls entire page

 On Mon, Jun 9, 2008 at 10:58 AM, Michael Mehrle
 [EMAIL PROTECTED]
 wrote:
 Marcus - I did NOT resolve it yet - not getting much help here
except
 for talk about some mystical 1.3.4 release I can't get my hands on.
 It
 breaks with everything we wrote here involving AutoComplete - and
all
 of
 it was working fine with 1.3.2 as far as I remember. So, this puppy
 is
 broken and if someone can point me the right way I would love to
help
 fix it. But at this point I don't know where to start - not exactly
a
 huge JavaScript/CSS aficionado.

 If this used to work, but doesn't now, you should be able to track
 down the differences between the two releases. The first thing you
 could try is to get the exact source of the AC component of 1.3.2
(all
 releases are tagged in our SVN repo) and see if that makes the
 difference. If it does, a change in that component did, if not,
 something larger (the ajax engine for instance) is in play.

 Could you also open a JIRA issue for it if you confirmed this is a
 bug?

 Eelco

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Z-depth problem with AutoCompleteTextField in IE

2008-06-09 Thread Michael Mehrle
In Internet Explorer I am experiencing a strange z-depth problem.
Meaning that the drop down menu appears *behind* neighboring form fields
- please take a look at this screenshot:

 

http://screencast.com/t/DsqIA4pxtut

 

Any thoughts? We have not done any custom styling of the
AutoCompleteTextField as far as I know. Can anyone replicate this
problem?

 

Thanks,

 

Michael

 



Re: scriptaculous toaster

2008-06-09 Thread Ryan Sonnek


 It's a combination of effects(the example effects from scriptaculous),
 something that fades in shakes and for example squishes.. Did you see the
 example?


I still think this would best be served in a separate project.


Re: Page refresh

2008-06-09 Thread Igor Vaynberg
paste your code

-igor

On Mon, Jun 9, 2008 at 3:34 PM, Ricky [EMAIL PROTECTED] wrote:
 Hi,

 My page class consists of :
 1.) Panel -A  2.) Panel - B.

 Just for FYI - Panel A has Refreshing View and a refreshing view nested
 within it (nested tables).

 When I do a refresh (F5 or simple refresh clicked on browser) on a page, and
 nothing seems to happen and all data that was present is lost in process.
 Nothing seems to happen as in:
 1.) No query is executed (it is expected to do thing that it was doing at
 the time of clicking the link to the page).
 2.) I put in debug points on the page constructor, refreshing views in the
 panel, panel constructor, but it doesn't go anywhere.
 3.) The page version doesn't seem to be changing either?! (it does show
 everything normally when i click the link to the page again).

 I am overriding isVersioned( ) on the page to return true but to no effect;
 ( I checked, all children components are getting isVersioned with the same).
 I tried isVersioned to false (just to see if something else happens :) ),
 but no change ...
 (the versionManager behaves as it should, meaning, when the page returns
 false, it is not added to the version manager).

 Am i missing something!!? any help would be appreciable.

 Thanks
 Rick


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Status of Wicket and Groovy?

2008-06-09 Thread Antony Stubbs

I started working on the builder a wee back, and intend on bringing it up to
spec.

The only work I had done so far was making it compile compatible with Wicket
1.3 and cleaning up the Maven stuff.

I forked it to github here:
http://github.com/astubbs/wicket-contrib-groovy/commits/wicket1.3Compilecompat

I may have forgotten to commit my latest changes...

Let me know if you have any problems cloning or viewing the site.


Eelco Hillenius wrote:
 
 A quick Google showed me that some work has been done with Groovy
 (wicket-contrib-groovy) and the WicketBuilder by Kevin Galligan. 
 However,
 Kevin seems to have moved on to Seam and wicket-contrib-groovy seems to
 be
 no longer supported.
 
 I couldn't find that he moved on, but it is possible the project isn't
 maintained anymore. However, the integration is pretty simple to
 achieve, and it might even be best for your case to build a set of
 utilities (as that's pretty much what you need to make the integration
 work if I understand it correctly) that suit your needs.
 


-
___

http://stubbisms.wordpress.com http://stubbisms.wordpress.com 
-- 
View this message in context: 
http://www.nabble.com/Status-of-Wicket-and-Groovy--tp17710986p17745477.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Status of Wicket and Groovy?

2008-06-09 Thread Antony Stubbs

Ah yes - It was committed, but the first comment line didn't summarise the
commit.

This is the big commit:


 Author: Antony Stubbs [EMAIL PROTECTED](none)  2008-03-20 17:24:53
 Committer: Antony Stubbs [EMAIL PROTECTED](none)  2008-03-20 17:24:53
 Parent: e7d957ba2dd793898dae1828e1c683bb7635db76 (updated wicket
 dependency)
 Child:  bd620b84e0f99b27e2d68ac51fbfdfd18fe1866a (removed duplicate
 classpath)
 Branches: remotes/origin/wicket1.3Compilecompat, wicket1.3Compilecompat
 Follows: 
 Precedes: 
 
 Changed maven module layout to make more sense
 - renamed module dirs to match module names
 Changed import and other wicket references to match org.apache.wicket
 package name
 Using with 0.9 version of m2elcipse plugin
 Updated version of wicket dependency
 Got rid of repeated info from poms
 
 Signed-off-by: Antony Stubbs [EMAIL PROTECTED]
 

Antony Stubbs wrote:
 
 I started working on the builder a wee back, and intend on bringing it up
 to spec.
 
 The only work I had done so far was making it compile compatible with
 Wicket 1.3 and cleaning up the Maven stuff.
 
 I forked it to github here:
 http://github.com/astubbs/wicket-contrib-groovy/commits/wicket1.3Compilecompat
 
 I may have forgotten to commit my latest changes...
 
 Let me know if you have any problems cloning or viewing the site.
 
 
 Eelco Hillenius wrote:
 
 A quick Google showed me that some work has been done with Groovy
 (wicket-contrib-groovy) and the WicketBuilder by Kevin Galligan. 
 However,
 Kevin seems to have moved on to Seam and wicket-contrib-groovy seems to
 be
 no longer supported.
 
 I couldn't find that he moved on, but it is possible the project isn't
 maintained anymore. However, the integration is pretty simple to
 achieve, and it might even be best for your case to build a set of
 utilities (as that's pretty much what you need to make the integration
 work if I understand it correctly) that suit your needs.
 
 
 


-
___

http://stubbisms.wordpress.com http://stubbisms.wordpress.com 
-- 
View this message in context: 
http://www.nabble.com/Status-of-Wicket-and-Groovy--tp17710986p17745525.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: (Class? extends Page?) casting troubles

2008-06-09 Thread Zappaterrini, Larry
Ah, I forgot the context around which we were discussing Foo.class. That is 
definitely a shortcoming of erasure if ever there were one. Unfortunately the 
best you can do with class literals is Class?. I actually ran into this 
problem early on when moving to Wicket 1.4. I have a custom FormComponent that 
wraps another FormComponent and provides it with an associated Label. This 
object is meant for subclassing, to provide a text field with a label for 
instance. Prior to 1.4 the object took Class? extends FormComponent as an 
argument to its constructor and instantiated the wrapped component from that. 
Subclasses called super with their Class of choice. Enter 1.4 with 
FormComponentT and the Class argument becomes Class? extends 
FormComponent? (looks familiar, right?). It is impossible to provide such an 
object using class literals so I had to rethink the design. Frustrating? You 
bet! I understand why erasure was chosen but I feel it is too limiting 
sometimes. It seems that it is most visible in the instance of using Class 
objects. It makes for interesting discussions anyway...

 


From: Sebastiaan van Erk [mailto:[EMAIL PROTECTED]
Sent: Mon 6/9/2008 12:54 PM
To: users@wicket.apache.org
Subject: Re: (Class? extends Page?) casting troubles



Zappaterrini, Larry wrote:
 Sebastiaan,

 Point 1 is a good one. I haven't puzzled that through completely. Upon
 initial inspection it seems that it is just the compiler being pedantic
 about a scenario that wouldn't arise in practice. I'll have to think
 about it some more.

 I might be missing something with point 2, but what is wrong with
 ClassFoo clazz = Foo.class?

If Foo is a generic type (as in the example I gave), then the above
assignment will give you a warning (which I don't know how to get rid
off without a suppress)...

Foo is a raw type. References to generic type FooT should be parameterized

Regards,
Sebastiaan

 Cheers,
 Larry

 -Original Message-
 From: Sebastiaan van Erk [mailto:[EMAIL PROTECTED]
 Sent: Saturday, June 07, 2008 3:57 AM
 To: users@wicket.apache.org
 Subject: Re: (Class? extends Page?) casting troubles

 Zappaterrini, Larry wrote:
 Sorry, I should have been more clear about subtype. :) When dealing
 with
 raw types, the raw type is considered a super type of the generic
 type.
 So Bar is a super type of Bar?. Since RawType extends the raw type
 Bar, consider it to be a peer of Bar?. When you consider them as
 peers, a warning is warranted. The new example you use works due to
 erasure. Bar? as declared in source code becomes Bar in byte code.
 So
 the statement becomes:

  Bar bar = new RawBar();

 Which is perfectly legal. I have found that most of perceived
 inconsistencies in Java generics stems  from erasure and sub type
 substitution. The golden rule of generics is that the byte code
 produced
 by compiling generics will never produce an invalid cast so long as
 the
 code does not produce any warnings. This causes some things that may
 seem intuitive to be illegal.

 Thanks for your explanation. I still think it's all rather horrible
 though. Type erasure was a huge mistake if you ask me. Two questions for

 you though...

 1) Can you come up with an example where assigning a Foo? extends Bar
 to a Foo? extends Bar? causes an invalid cast? (So I can understand
 why this intuitive seeming assignment is illegal).

 2) How do you get rid of the warning in ClassFoo clazz = Foo.class
 without using Class?? Because it would seem strange if there is no
 warning free way to use a certain language construct...

 Regards,
 Sebastiaan

 -Original Message-
 From: Sebastiaan van Erk [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 06, 2008 4:16 PM
 To: users@wicket.apache.org
 Subject: Re: (Class? extends Page?) casting troubles

 Zappaterrini, Larry wrote:
 In the example you have detailed, RawBar is not a subtype of Bar?
 since it extends the raw type Bar.
 I guess it depends on the definition of subtype. It is at least the
 case
 that the following assignment compiles without warnings (without
 warnings about unchecked casts):

Bar? bar = new RawBar();

 So is it then a subtype? Or isn't it? It's all terribly inconsistent
 if
 you ask me. :-(

 Regards,
 Sebastiaan



 -Original Message-
 From: Sebastiaan van Erk [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 06, 2008 11:31 AM
 To: users@wicket.apache.org
 Subject: Re: (Class? extends Page?) casting troubles

 ARgh, you always make typos with this stuff.

 See correction.

 Sebastiaan van Erk wrote:
 Martin Funk wrote:

 Class? extends Page? means class of (anything that extends
 (page of
 anything)).
 I'm not so sure.
 There are 2 separate issues:

 ISSUE 1: Foo? extends Bar? is not assignable from a FooRawBar
 where RawBar extends Bar as a raw type. That is, given:

   static class FooT {
   }

   static class BarT {
   }

   static class RawBar extends Bar {
   }

   static class SubBarT extends BarT {
   }

 Thus:

 

Re: Lightweight generic busy indicator

2008-06-09 Thread Martin Makundi
Hi!

I put it into the Reference Library - Ajax as Generic Busy Indicator
(for both Ajax and non-Ajax submits)

http://cwiki.apache.org/confluence/display/WICKET/Generic+Busy+Indicator+%28for+both+Ajax+and+non-Ajax+submits%29

**
Martin

2008/6/9 Gwyn Evans [EMAIL PROTECTED]:
 I'd have thought that either under the AJAX or the View layer
 topics in the Reference Library[1] page.  If so, go to the 'topic'
 page for the one you choose ([2] or [3]) and Add page your own page
 which should then automatically appear in the lists.

 If you've already created a page, it's not a problem as it's possible
 to move it around.  As for which one to use, which would you look for
 it under?

 /Gwyn

 [1] http://cwiki.apache.org/WICKET/reference-library.html
 [2] http://cwiki.apache.org/WICKET/ajax.html
 [3] http://cwiki.apache.org/WICKET/view-layer.html

 On Mon, Jun 9, 2008 at 9:50 AM, Martin Makundi
 [EMAIL PROTECTED] wrote:
 Do you think I should add it to the WIKI?

 Thats a great idea, the more info the better:)

 I had a look at the wicket wiki:
 http://cwiki.apache.org/WICKET/#Index-FrameworkDocumentation

 Would you consider it it the right place or would you suggest a more
 suitable location (and would that require any special publishing
 rights)?

 **
 Martin

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to update parent component from a panel?

2008-06-09 Thread freak182

Hello,
Im having problem of updating parents components.Hereis my problem, there is
page and in that page there is a panel. The panel contain a
FormUpdatingComponent that attached to a dropdownchoice. Now when the
dropdown is triggered, i want to update the parents (the page)
textbox/label..is this possible?

Thanks a lot...Cheers
-- 
View this message in context: 
http://www.nabble.com/How-to-update-parent-component-from-a-panel--tp17748294p17748294.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]