Re: Is there any Color Picker ? like the calendar.DatePicker

2008-02-20 Thread Java Programmer
On Feb 20, 2008 8:28 AM, laiqinyi [EMAIL PROTECTED] wrote:

  Is there Color Picker ?
 I can choice any color, than return the color code(like FF 00)
 thanks

 Mead

I don't know if there are ready to use component but nice and
functional JS could be found here
http://www.dhtmlgoodies.com/index.html?whichScript=js_color_picker_v2
Making it Wicket component should be rather simple with provided examples ...

Best regards,
Adr

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



Re: AJAX validation and multiple requests

2008-02-20 Thread Federico Fanton
On Wed, 20 Feb 2008 08:42:14 +0200
Timo Rantalaiho [EMAIL PROTECTED] wrote:

 I think that we just stored the Component instances in that
 case, thogh you should be wary with that and especially with
 a repeater it might get difficult.
 
 A more dynamic way might be to use a marker interface for the
 relevant components and always check their states with a
 visitor. There again you should be careful with the repeater.
 However, for your form handling to work at all I suppose
 that the repeater items must not be recreated until  the form
 is submitted or canceled anyway.

Nice idea! Many thanks for your help :)


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



Re: Is there any Color Picker ? like the calendar.DatePicker

2008-02-20 Thread Sébastien Piller




In the Dojo subproject, there is a DojoColorPicker, but it works not
perfectly on my config. Depending on what you want to do with it, it
may be useful.


Java Programmer a crit:

  On Feb 20, 2008 8:28 AM, laiqinyi [EMAIL PROTECTED] wrote:
  
  
 Is there Color Picker ?
I can choice any color, than return the color code(like FF 00)
thanks

Mead

  
  
I don't know if there are ready to use component but nice and
functional JS could be found here
http://www.dhtmlgoodies.com/index.html?whichScript=js_color_picker_v2
Making it Wicket component should be rather simple with provided examples ...

Best regards,
Adr

-
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: self refreshing table with effects

2008-02-20 Thread okrohne

Hi,

I tried QueryStringUrlCodingStrategy and MixedParamUrlCodingStrategy and
both are throwing
exceptions. I looked at the example in chapter 15.2 , I don't get the point
of:

((WebApplication)getApplication()).unmount(cheeses);
((WebApplication)getApplication()).mountBookmarkablePage(cheeses,
CheeseDetailsPage.class);
((WebApplication)getApplication()).unmount(cheeses);
((WebApplication)getApplication()).mount(new
QueryStringUrlCodingStrategy(cheeses, CheeseDetailsPage.class));
((WebApplication)getApplication()).unmount(cheeses);
((WebApplication)getApplication()).mount(new
MixedParamUrlCodingStrategy(cheeses, CheeseDetailsPage.class, new
String[]{}));

why mount and unmount?

The exceptions are thrown after the first on timer event.


QueryStringUrlCodingStrategy gives:

Root cause:

java.lang.NullPointerException
at
org.apache.wicket.request.target.component.BookmarkableListenerInterfaceRequestTarget.processEvents(BookmarkableListenerInterfaceRequestTarget.java:131)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:90)
at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1166)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1241)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:613)


MixedParamUrlCodingStrategy gives
Root cause:

java.lang.ClassCastException: [Ljava.lang.String;
at
org.apache.wicket.request.target.coding.MixedParamUrlCodingStrategy.appendParameters(MixedParamUrlCodingStrategy.java:153)
at
org.apache.wicket.request.target.coding.BookmarkablePageRequestTargetUrlCodingStrategy.encode(BookmarkablePageRequestTargetUrlCodingStrategy.java:135)
at
org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.pathForTarget(WebRequestCodingStrategy.java:459)
at
org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.encode(WebRequestCodingStrategy.java:236)
at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:224)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:103)
at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1172)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1241)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:613)

Any ideas?

Thanks,
Oliver




Martijn Dashorst wrote:
 
 Use a different URL coding strategy.
 
 see Application#mount()
 
 (Wicket in action chapter 15, soon to be renumbered to chapter 14,
 talks 

Re: Wicket-security wish list

2008-02-20 Thread Maurice Marrink
You don't use implies yourself. the framework will use it for you.
all you have to do is implement the method.

For example our implies looks like this (modified for readability)
public boolean implies(Subject subject)
{
if (subject == null)
return false;

String myName = getName();
for (Principal principal : (SetPrincipal) 
subject.getPrincipals())
{
//each RechtenSet as our principals are called has a list of other
principals it implies and a list of principals that imply this one
if (myName.equals(principal.getName())
|| (principal instanceof RechtenSet  
((RechtenSet)
principal).implies(this)))
{
return true;
}
}
return false;
}
//check if another principal is implied
public boolean implies(RechtenSet rechtenSet)
{
//because the list of implied principals is searched recursively and
may contain loops we use a set to store principals we have already
visited
return internalImplies(rechtenSet, new HashSetRechtenSet());
}
private boolean internalImplies(RechtenSet rechtenSet, SetRechtenSet 
tried)
{
//implies is the list of principals this principal implies
if (rechtenSet == null || implies == null || implies.isEmpty())
{
tried.add(this);
return false;
}
if (!tried.add(this))
return false; // we already tried this principal
for (RechtenSet set : implies)
{
if (set.getName().equals(rechtenSet.getName()))
return true;
if (set.internalImplies(rechtenSet, tried))
return true;
}
return false;
}
We store our principals in a database so we can preserve and easily
modify the imply lists. Not to mention attach them easily to a user :)

Maurice

On Feb 20, 2008 1:40 AM, Warren [EMAIL PROTECTED] wrote:
 Where am I using Principal.implies(Subject subject); and how? I add the
 Principals to my Subject when I authenticate my user, is it here or am I
 setting this up in my app or in my policy file? It is getting clearer how
 things are working. I have always created my own security implementation, I
 have not had any experience with anybody else's.

  -Original Message-
  From: Maurice Marrink [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, February 19, 2008 2:27 PM

  To: [EMAIL PROTECTED]
  Subject: Re: Wicket-security wish list
 
 
  On Feb 19, 2008 10:39 PM, Warren [EMAIL PROTECTED] wrote:
   Maurice,
  
   Session.error() is how I ended up solving my problem. But, I
  formatted the
   message in my session and then ended up calling error(...), that way
   SwarmStrategy was just returning the denied Principals. I did
  not get as far
   as placing the message in a Properties file. I was not sure how to
   accommodate multiple denied Principals. As far as the multiple
  principals in
   my app, I simply formatted my message like this:
  
   Users in User Group XXX do not have Access to Access Denied
  Principal 1
   and Access Denied Principal 2 ...
 
  Ok good to know.
 
  
   I know that this can get a little verbose, but I am trying to set up my
   policy file so that any one permission does not end up in too
  many different
   Principals. This will probably be an issue when using the
  inherit action
   though.
 
  Using the inherit action has noting to do with how many principals are
  linked to a permission.
  Currently inherit action is primarily intended for the following
  situation:
  A page has both secure and normal components, the secure components
  allow for editing of the modelobject of the page (for the sake of this
  example i will assume they are textfields).
  All components should always be visible but only editable if
  sufficient permissions are granted. The policy would look something
  like this:
  grant principal foo.read
  {
  permission ${ComponentPermission} org.MyPage, inherit, render;
  // to allow all components to be rendered
  //using only render would require separate render permissions for each
  component like so
  //permission ${ComponentPermission} org.MyPage:secureTextField1,
  render;  //etc for each secure component
 
  //assuming we have 1 or more links pointing to our page we also need
  the following permission
  permission ${ComponentPermission} org.MyPage, enable;
  //note the absence of the inherit permission compared to the next
  principal
  //by not using inherit the enable action is only granted to the page
  itself not to any of 

Re: (Server-independent) Comet support in Wicket?

2008-02-20 Thread Jörn Zaefferer
On Feb 20, 2008 3:50 AM, Erik van Oosten [EMAIL PROTECTED] wrote:
 Jörn Zaefferer wrote:
  ... The
  architecture must support several both dependent and independent
  components on a single page which get updated based on server-events,
  be it on schedules or events triggered by other users.
 Wicket currently support updates through timers on the client side.

Can you point me at a resource that provides some details on that?


   While the exact
  number of simultaneous users isn't clear yet, up to 10k must be
  possible with the appropriate hardware.
 
 That is quite huge, for any framework. Because of the way Wicket uses
 the HTTP session, you are probably best of with a Terracotta cluster.

To that regard: Is there a document that describes Wicket
architecture? It looks like I need a good understand of the session
usage when dealing larger number of users.

Thanks
Jörn

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



Multi buttons in ajax form

2008-02-20 Thread Pierre Gilquin

hi all,

I try to have to have 2 buttons in a form. This form is used in an ajax window.

in html, they are 2 standards buttons
input type=submit value=Do Task1
input type=submit value=Do Task 2

In the panel of the ajax window, I have an AjaxFormSubmitBehavior:

form.add(new AjaxFormSubmitBehavior(onsubmit) {
   protected void onSubmit(AjaxRequestTarget target) {
   doTask1();
//doTask2();
   modal.close(target);
}
protected void onError(AjaxRequestTarget target) {


When one button is clicked, the onSubmit method is executed. What can I do to 
distinct which button was used ?

In some circumstance, I need one button to be invisible or disabled, I try to make it a real wicket object without 
success the following way :

form.add(new WebComponent(button1).add AjaxFormSubmitBehavior(

Thank in advance for your help.

Pierre 



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



Re: Multi buttons in ajax form

2008-02-20 Thread wicket user
there is a method called findSubmittingButton()

regards
Dipu

On Feb 20, 2008 10:41 AM, Pierre Gilquin [EMAIL PROTECTED] wrote:

 hi all,

 I try to have to have 2 buttons in a form. This form is used in an ajax
 window.

 in html, they are 2 standards buttons
 input type=submit value=Do Task1
 input type=submit value=Do Task 2

 In the panel of the ajax window, I have an AjaxFormSubmitBehavior:

 form.add(new AjaxFormSubmitBehavior(onsubmit) {
protected void onSubmit(AjaxRequestTarget target) {
doTask1();
 //doTask2();
modal.close(target);
 }
 protected void onError(AjaxRequestTarget target) {
 

 When one button is clicked, the onSubmit method is executed. What can I do
 to distinct which button was used ?

 In some circumstance, I need one button to be invisible or disabled, I try
 to make it a real wicket object without
 success the following way :
 form.add(new WebComponent(button1).add AjaxFormSubmitBehavior(

 Thank in advance for your help.

 Pierre


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




Re: Wicket Spy?

2008-02-20 Thread Edvin Syse

you can use IResponseFilter to store the generated markup. in a
company i used to work for we would store markup for the last page and
if the error occured we attached it to the error report - very useful
thing to have.


Thank you, just what I need :))

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



Re: Multi buttons in ajax form

2008-02-20 Thread Pierre G

Sorry for the noise,

I was able to do it with 2 AjaxButton added on the form.

Pierre


Pierre G wrote:
 
 hi all,
 
 I try to have to have 2 buttons in a form. This form is used in an ajax
 window.
 
 in html, they are 2 standards buttons
 input type=submit value=Do Task1
 input type=submit value=Do Task 2
 
 In the panel of the ajax window, I have an AjaxFormSubmitBehavior:
 
 form.add(new AjaxFormSubmitBehavior(onsubmit) {
 protected void onSubmit(AjaxRequestTarget target) {
 doTask1();
 //doTask2();
 modal.close(target);
 }
 protected void onError(AjaxRequestTarget target) {
 
 
 When one button is clicked, the onSubmit method is executed. What can I do
 to distinct which button was used ?
 
 In some circumstance, I need one button to be invisible or disabled, I try
 to make it a real wicket object without 
 success the following way :
 form.add(new WebComponent(button1).add AjaxFormSubmitBehavior(
 
 Thank in advance for your help.
 
 Pierre 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Multi-buttons-in-ajax-form-tp15586379p15586949.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]



Combining Ajax and non Ajax pages

2008-02-20 Thread steviezz

I have a panel on my application home page containing 3 related dropdowns -
area/country/region.  

I use AjaxFormComponentUpdatingBehavior to populate the lower dropdowns when
a higher one changes - eg:

  area changes - country and region dropdowns get reset 
  country changes - region dropdown gets reset 

Code looks like: 

 private DropDownChoice getCountriesDDC(IModel countryChoices,
final DropDownChoice regions) {

logger.debug(Enter getCountriesDDC);

final DropDownChoice countries = new DropDownChoice(countries,
new PropertyModel(this, selectedCountry), 
countryChoices,
new ChoiceRenderer(name, id));

countries.add(new AjaxFormComponentUpdatingBehavior(onchange) 
{
protected void onUpdate(AjaxRequestTarget target) {
regions.clearInput();
regions.setModelObject(null); 
target.addComponent(regions);
}
});

countries.setOutputMarkupId(true);

logger.debug(Exit getCountriesDDC  + countries);

return countries;
}


My application is not a full-blown Ajax app - it still needs to be search
engine and user friendly.  So, when I submit my form having selected the
various dropdowns, I want to forward to a traditional results pages rather
than pull the results into the original page with Ajax.   

But I also want to include the search panel at the top of the results page
and maintain its dropdown state from the original search page (so the
selection matches the displayed results).  For example, user selects North
America / United States / California on the search page, then the results
page should have all 3 dropdowns popluated with all the North American
choices in dropdown 2, and the USA states in dropdown 3 - with USA and
California selected.

I also need to maintain the same search panel dropdown state if the user
uses the main site navigation links to go back to the home page - this will
be from a simple url like /app/home.  

Search dropdown state must also survive a page refresh.  I hate it when
applications (typical flight booking systems, etc) make you re-enter all the
search criteria if you go back to the home page, deviate out of their
restricted page-flow, or refresh the page.  At present, on page refresh, my
the top level area dropdown retains its choices but the country and region
dropdowns have their choices removed (no way to get them back unless you
select a different top level area to re-fire the Ajax Javascript).

In summary, I need to know: 

1.  how to make the dropdown state survive when I include the search panel
on another page

2.  how to make the dropdown state survive when I navigate back to the
original page using a simple home page navigation link (effectively
reloading the home page)   

3.  how to make the dropdown state survive a page refresh (much the same
same as 2).  


Of course, if I am wasting my time because this is stupid, then I'd value
any other suggestions on how to deal with this by redesigning the user
interface.

Thanks. 


-- 
View this message in context: 
http://www.nabble.com/Combining-Ajax-and-non-Ajax-pages-tp15587166p15587166.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]



where is wicket-contrib-tinymce ???

2008-02-20 Thread Maris Orbidans

where is wicket-contrib-tinymce project and svn repo ?

it's not even mentioned in this page

http://wicketstuff.org/confluence/display/STUFFWIKI/Wiki


Maris

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



Re: Handle Hibernate transaction in wicket

2008-02-20 Thread Martijn Lindhout
I use Spring's OpenSessionInViewFilter

2008/2/19, Andrew Williams [EMAIL PROTECTED]:

 I use onBeginRequest and onEndRequest from the WebRequestCycle, seems
 to work well.

 Andy

 On 13 Feb 2008, at 07:59, Sébastien Piller wrote:

  Hello,
 
  I'm searching for a best practice to integrate some hibernate
  transaction with Wicket. I'd like to implement the session-per-
  request that is described here
 http://www.hibernate.org/hib_docs/v3/reference/fr/html_single/#tutorial-firstapp-workingpersistence
 
  I think I can commit the transaction and close the session on the
  onAfterRender method. But where is the best place to start it? On
  the first line of the constructor? Or in the onBeforeRender (I think
  not)? Anywhere else?
 
  And what about the ajax queries? I need to recreate a new
  transaction for each ajax request, need I?
 
  Thank you a lot for your think :)
 
  -
  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]




-- 
Martijn Lindhout
JointEffort IT Services
http://www.jointeffort.nl
[EMAIL PROTECTED]
+31 (0)6 18 47 25 29


Re: Combining Ajax and non Ajax pages

2008-02-20 Thread wicket user
store the backing model in the session and get it from the session, this
will help you retain the state in all the cases

Cheers
Dipu

On Feb 20, 2008 11:38 AM, steviezz [EMAIL PROTECTED] wrote:


 I have a panel on my application home page containing 3 related dropdowns
 -
 area/country/region.

 I use AjaxFormComponentUpdatingBehavior to populate the lower dropdowns
 when
 a higher one changes - eg:

  area changes - country and region dropdowns get reset
  country changes - region dropdown gets reset

 Code looks like:

 private DropDownChoice getCountriesDDC(IModel countryChoices,
final DropDownChoice regions) {

logger.debug(Enter getCountriesDDC);

final DropDownChoice countries = new
 DropDownChoice(countries,
new PropertyModel(this, selectedCountry),
 countryChoices,
new ChoiceRenderer(name, id));

countries.add(new
 AjaxFormComponentUpdatingBehavior(onchange) {
protected void onUpdate(AjaxRequestTarget target) {
regions.clearInput();
regions.setModelObject(null);
target.addComponent(regions);
}
});

countries.setOutputMarkupId(true);

logger.debug(Exit getCountriesDDC  + countries);

return countries;
}


 My application is not a full-blown Ajax app - it still needs to be search
 engine and user friendly.  So, when I submit my form having selected the
 various dropdowns, I want to forward to a traditional results pages rather
 than pull the results into the original page with Ajax.

 But I also want to include the search panel at the top of the results page
 and maintain its dropdown state from the original search page (so the
 selection matches the displayed results).  For example, user selects
 North
 America / United States / California on the search page, then the results
 page should have all 3 dropdowns popluated with all the North American
 choices in dropdown 2, and the USA states in dropdown 3 - with USA and
 California selected.

 I also need to maintain the same search panel dropdown state if the user
 uses the main site navigation links to go back to the home page - this
 will
 be from a simple url like /app/home.

 Search dropdown state must also survive a page refresh.  I hate it when
 applications (typical flight booking systems, etc) make you re-enter all
 the
 search criteria if you go back to the home page, deviate out of their
 restricted page-flow, or refresh the page.  At present, on page refresh,
 my
 the top level area dropdown retains its choices but the country and region
 dropdowns have their choices removed (no way to get them back unless you
 select a different top level area to re-fire the Ajax Javascript).

 In summary, I need to know:

 1.  how to make the dropdown state survive when I include the search panel
 on another page

 2.  how to make the dropdown state survive when I navigate back to the
 original page using a simple home page navigation link (effectively
 reloading the home page)

 3.  how to make the dropdown state survive a page refresh (much the same
 same as 2).


 Of course, if I am wasting my time because this is stupid, then I'd value
 any other suggestions on how to deal with this by redesigning the user
 interface.

 Thanks.


 --
 View this message in context:
 http://www.nabble.com/Combining-Ajax-and-non-Ajax-pages-tp15587166p15587166.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: where is wicket-contrib-tinymce ???

2008-02-20 Thread Java Programmer
On Feb 20, 2008 10:42 PM, Maris Orbidans [EMAIL PROTECTED] wrote:
 where is wicket-contrib-tinymce project and svn repo ?

 it's not even mentioned in this page

 http://wicketstuff.org/confluence/display/STUFFWIKI/Wiki

https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-contrib-tinymce

Adr

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



Re: Handle Hibernate transaction in wicket

2008-02-20 Thread James Carman
It sounds like you're looking for transaction-per-request and not
session-per-request.  The session-per-request part is easy.  Just
use the OpenSessionInViewFilter from Spring (as stated by someone else
on this thread).  The OpenSessionInViewFilter doesn't begin a
transaction for you automatically.  It merely opens the session and
closes it for you.


On 2/13/08, Sébastien Piller [EMAIL PROTECTED] wrote:
 Hello,

 I'm searching for a best practice to integrate some hibernate
 transaction with Wicket. I'd like to implement the session-per-request
 that is described here
 http://www.hibernate.org/hib_docs/v3/reference/fr/html_single/#tutorial-firstapp-workingpersistence

 I think I can commit the transaction and close the session on the
 onAfterRender method. But where is the best place to start it? On the
 first line of the constructor? Or in the onBeforeRender (I think not)?
 Anywhere else?

 And what about the ajax queries? I need to recreate a new transaction
 for each ajax request, need I?

 Thank you a lot for your think :)

 -
 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: (Server-independent) Comet support in Wicket?

2008-02-20 Thread Erik van Oosten

Jörn Zaefferer wrote:

On Feb 20, 2008 3:50 AM, Erik van Oosten [EMAIL PROTECTED] wrote:
  

Jörn Zaefferer wrote:


... The
architecture must support several both dependent and independent
components on a single page which get updated based on server-events,
be it on schedules or events triggered by other users.
  

Wicket currently support updates through timers on the client side.



Can you point me at a resource that provides some details on that?
  


http://people.apache.org/~tobrien/wicket/apidocs/org/apache/wicket/ajax/AjaxSelfUpdatingTimerBehavior.html
I've never used it. But I guess you'll just do something like:

Component p  = new MyPanel(mypanelid);
add(p);
p.setOutputMarkupId(true);
p.add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(2));

The component will now re-render itself every 2 seconds.


 While the exact
number of simultaneous users isn't clear yet, up to 10k must be
possible with the appropriate hardware.

  

That is quite huge, for any framework. Because of the way Wicket uses
the HTTP session, you are probably best of with a Terracotta cluster.



To that regard: Is there a document that describes Wicket
architecture? It looks like I need a good understand of the session
usage when dealing larger number of users.
  

Yes, that would be essential (as with any framework).

Important reads:
http://people.apache.org/~tobrien/wicket/apidocs/org/apache/wicket/protocol/http/pagestore/DiskPageStore.html
http://www.nabble.com/DiskPageStore-improvements-for-1.3.1-p14711582.html
http://cwiki.apache.org/WICKET/wicket-inside.html

I did not yet find a link that explains what Wicket puts in the session. 
But basically (in Wicket 1.3) it is the entire component tree instance 
of the last page that was rendered to the user (including all model 
instances, but excluding data in detachable models). Nothing else goes 
to the session.
The page does not go the session when it includes bookmarkable links 
only (which is very rare). Another use case that is supported is login 
forms. (For both: look up stateless pages).


Regards,
   Erik.


--
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/

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



Re: where is wicket-contrib-tinymce ???

2008-02-20 Thread Nino Saturnino Martinez Vazquez Wael

its also in maven repo:

http://wicketstuff.org/maven/repository/org/wicketstuff/wicket-contrib-tinymce/

Java Programmer wrote:

On Feb 20, 2008 10:42 PM, Maris Orbidans [EMAIL PROTECTED] wrote:
  

where is wicket-contrib-tinymce project and svn repo ?

it's not even mentioned in this page

http://wicketstuff.org/confluence/display/STUFFWIKI/Wiki



https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-contrib-tinymce

Adr

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


  


--
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: (Server-independent) Comet support in Wicket?

2008-02-20 Thread Stefan Fußenegger

wicketstuff-push might be what you are looking for: wicket cometd support
with jetty. but i don't think that anybody has used it with 10k simultaneous
users yet.

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



Jörn Zaefferer-2 wrote:
 
 Hi,
 
 I've started evaluating Wicket today for an application written from
 scratch. First impressions are very well, there is just one
 requirement on which I couldn't find enough useful information yet:
 Comet support in Wicket or Comet with Wicket.
 
 Before looking at Wicket I tried to use lift which has Comet support
 built in (based on Scala Actors). This post
 (http://blogs.webtide.com/gregw/2006/07/25/1153845234453.html)
 suggests that its not possible to implement scaleable Comet support
 within a web framework, instead it must be supported by the
 application server, eg. Jetty 6.
 
 Post about Comet and Wicket, eg. this one
 (http://www.mail-archive.com/[EMAIL PROTECTED]/msg17308.html)
 don't give me any actual information about the current state of afairs
 (its from 2006, the linked sf.net issue is now private). This issue
 (http://wicketstuff.org/jira/browse/DOJO-23) about integration with
 cometd isn't too helpful either, I can't find any documentation on
 that.
 
 To provide some information on the actual requirements I have: The
 architecture must support several both dependent and independent
 components on a single page which get updated based on server-events,
 be it on schedules or events triggered by other users. While the exact
 number of simultaneous users isn't clear yet, up to 10k must be
 possible with the appropriate hardware.
 
 Thanks
 Jörn Zaefferer
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 


-
---
Stefan Fußenegger
http://talk-on-tech.blogspot.com // looking for a nicer domain ;)
-- 
View this message in context: 
http://www.nabble.com/%28Server-independent%29-Comet-support-in-Wicket--tp15574656p15589149.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: Restarting AjaxTimeBehavior

2008-02-20 Thread Juan Gabriel Arias
Sorry, but... any ideas? Should i create an issue in jira?

Thanks!
Juan

On Feb 19, 2008 12:56 PM, Juan Gabriel Arias [EMAIL PROTECTED] wrote:

 Hi all,
 is there a way to do that? Restart the AjaxTimeBehavior?

 I have a panel, that should update itself when some event occurs. So, i
 use AjaxTimeBehavior to check periodically for that condition.

 But i also have another component making user-fired ajax requests. And i
 wanted to check my business condition and restart the interval timeout in
 both cases, not only in when AjaxTimeBehavior ends its time-out period. Just
 for avoiding inmediate/unnecesary ajax requests...

 Looking AbstractAjaxTimerBehavior code, i saw

 protected final void respond(final AjaxRequestTarget target)
 {
 onTimer(target);

 if (!stopped)
 {
 target.getHeaderResponse
 ().renderOnLoadJavascript(getJsTimeoutCall(updateInterval));
 }
 }

 I belileve that i should do somethin similar... but this is all protected,
 or private...

 Does this make any sense for you?

 regards!
 Juan



Re: Restarting AjaxTimeBehavior

2008-02-20 Thread Martijn Dashorst
I don't think anyone has come up with this usecase. So a JIRA would be
good, a patch better.

Martijn

On 2/20/08, Juan Gabriel Arias [EMAIL PROTECTED] wrote:
 Sorry, but... any ideas? Should i create an issue in jira?

 Thanks!
 Juan

 On Feb 19, 2008 12:56 PM, Juan Gabriel Arias [EMAIL PROTECTED] wrote:

  Hi all,
  is there a way to do that? Restart the AjaxTimeBehavior?
 
  I have a panel, that should update itself when some event occurs. So, i
  use AjaxTimeBehavior to check periodically for that condition.
 
  But i also have another component making user-fired ajax requests. And i
  wanted to check my business condition and restart the interval timeout in
  both cases, not only in when AjaxTimeBehavior ends its time-out period. Just
  for avoiding inmediate/unnecesary ajax requests...
 
  Looking AbstractAjaxTimerBehavior code, i saw
 
  protected final void respond(final AjaxRequestTarget target)
  {
  onTimer(target);
 
  if (!stopped)
  {
  target.getHeaderResponse
  ().renderOnLoadJavascript(getJsTimeoutCall(updateInterval));
  }
  }
 
  I belileve that i should do somethin similar... but this is all protected,
  or private...
 
  Does this make any sense for you?
 
  regards!
  Juan
 



-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.1 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.1

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



Re: Handle Hibernate transaction in wicket

2008-02-20 Thread Nino Saturnino Martinez Vazquez Wael

see blog tutorial on howto set this up with wicket...:)

Martijn Lindhout wrote:

I use Spring's OpenSessionInViewFilter

2008/2/19, Andrew Williams [EMAIL PROTECTED]:
  

I use onBeginRequest and onEndRequest from the WebRequestCycle, seems
to work well.

Andy

On 13 Feb 2008, at 07:59, Sébastien Piller wrote:



Hello,

I'm searching for a best practice to integrate some hibernate
transaction with Wicket. I'd like to implement the session-per-
request that is described here
  

http://www.hibernate.org/hib_docs/v3/reference/fr/html_single/#tutorial-firstapp-workingpersistence


I think I can commit the transaction and close the session on the
onAfterRender method. But where is the best place to start it? On
the first line of the constructor? Or in the onBeforeRender (I think
not)? Anywhere else?

And what about the ajax queries? I need to recreate a new
transaction for each ajax request, need I?

Thank you a lot for your think :)

-
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]






  


--
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: Handle Hibernate transaction in wicket

2008-02-20 Thread Pills

Thank you all for your ideas.


At the moment, I handle it manually (transaction and session), and until
now, I don't got much problems.

I don't want to use anything from spring, as it seems a lot more difficult
than anything else in my project. 

I've put a closeSession on the onAfterRender method, and every part of my
code that use the DB are properly surrounded with transactions... I don't
have any problem, and even if it is a bit slower than a best practice, it's
enough for me ;)
-- 
View this message in context: 
http://www.nabble.com/Handle-Hibernate-transaction-in-wicket-tp15451303p15590755.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]



NoClassDefFoundError with DatePicker on app reload

2008-02-20 Thread Sébastien Piller




Hello,

I've a problem with the DatePicker component. Every time I reload my
application (in Eclipse - Run - 'My project' on MyEclipse
Tomcat, or with an application undeploy/redeploy on Tomcat), I got the
stacktrace below.
java.lang.NoClassDefFoundError:
org.apache.wicket.extensions.yui.calendar.DatePicker
   at booby.dbadmin.people.FormPerson.(FormPerson.java:174)
   at
cosimoo.wizardorderprocess.WizardOrderProcess$Address.(WizardOrderProcess.java:90)
   at
cosimoo.wizardorderprocess.WizardOrderProcess.(WizardOrderProcess.java:693)
   at
cosimoo.PagePassOrderOrCustomizeNewProduct$1.onClick(PagePassOrderOrCustomizeNewProduct.java:21)
   at
org.apache.wicket.markup.html.link.Link.onLinkClicked(Link.java:214)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at
org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:183)
   at
org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)
   at
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:90)
   at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1166)
   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1241)
   at
org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316)
   at
org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
   at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354)
   at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
   at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
   at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
   at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
   at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
   at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
   at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
   at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
   at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
   at java.lang.Thread.run(Unknown Source)

However, I'm sure that class is in my path... I can see it under
/libs/wicket-extensions-1.3.1.jar. And if I make a clean start (ie stop
tomcat, manually clean the webapps folder, restart tomcat and copy my
file.war), then everything works fine.

Is it a classloader issue or something like that? How to avoid this?



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



Good news on Wicket in Action

2008-02-20 Thread Erik van Oosten

http://martijndashorst.com/blog/2008/02/20/wicket-in-action-fit-for-production/


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



Re: Handle Hibernate transaction in wicket

2008-02-20 Thread James Carman
Once you get used to Spring, you'll really appreciate it.  I wouldn't
write it off as too difficult if I were you.  It's definitely worth
learning (and it helps your resume; it's in high demand).

On 2/20/08, Pills [EMAIL PROTECTED] wrote:

 Thank you all for your ideas.


 At the moment, I handle it manually (transaction and session), and until
 now, I don't got much problems.

 I don't want to use anything from spring, as it seems a lot more difficult
 than anything else in my project.

 I've put a closeSession on the onAfterRender method, and every part of my
 code that use the DB are properly surrounded with transactions... I don't
 have any problem, and even if it is a bit slower than a best practice, it's
 enough for me ;)
 --
 View this message in context: 
 http://www.nabble.com/Handle-Hibernate-transaction-in-wicket-tp15451303p15590755.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: Wicket-security wish list

2008-02-20 Thread Maurice Marrink
Johan is correct, you should use SecurePageLinks or other Links that
are protected to prevent users from ever seeing or clicking the link.

Maurice

On Feb 20, 2008 5:21 PM, Johan Compagner [EMAIL PROTECTED] wrote:
 Why do you get access denied pages a lot in your app?
 I would say a user shouldnt be abe to click on that link in the first
 place. Only maybe when he tampers with it. But if you have session
 pages that that shouldnt be a problem. (only bookmakrable pages where
 a user has to first login for)


 On 2/19/08, Warren [EMAIL PROTECTED] wrote:
  Maurice,
 
  I was thinking about this Access Denied message problem I have been
  working on and thought up some features that might be useful in future
  releases. It would be nice to be able to configure Access Denied messages
  directly into the hive like this:
 
  grant principal com.scanman.security.authorization.ScanManPrincipal ScanMan
  Receiving Principal Access Denied Message Here
  {
permission ${ComponentPermission} ${RecvMenu}, inherit, render, 
  enable,
  Permission Access Denied Message Here;
  };
  grant principal com.scanman.security.authorization.ScanManPrincipal ScanMan
  Ordering Principal Access Denied Message Here
  {
permission ${ComponentPermission} ${OrderMenu}, inherit, render,
  enable, Permission Access Denied Message Here;
  };
 
  I believe you are following some kind of standard for how the hive is
  set-up, so I am not sure this would work. But anyway, you could then set-up
  the configuration of how these messages were used in the
  SwarmWebApplication. For Example, put them into the error queue, or take
  advantage of message resources, message keys and localization and so on. I
  ended up putting these messages into the error queue from MySwarmStrategy
  and it works great.
 
  I can't imagine that a feature like this would not be of some value to other
  users. My app has a lot of different levels of security and permissions that
  the Administrative user can configure within a separate Point of Sale app.
  Messages of this sort are valuable to a user so that security levels and
  permissions can be tweaked to best suit a companies policies. A simple
  Access Denied message gives little clue as to why access was denied.
 
  That's my two cents. Thanks for all the help you have given me. Your project
  surely deserves a lot of credit.
 
  Thanks,
 
  Warren Bell
 
 
  -
  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: Handle Hibernate transaction in wicket

2008-02-20 Thread Sébastien Piller
Yes, I read a bit about Spring some time ago, but atm I'm working on a 
project that will be released soon. I can't afford to rewrite half my 
code on the lasts weeks ;)


Next time, I'll take some time to getting started with it. I'm sure it's 
worth, that's what I read all the day. But I must consider my 
colleagues, too... They are not very very interested with dev, and 
already have difficulties to write php... so, with Spring, they will 
shot themselves :)


Thx

James Carman a écrit :

Once you get used to Spring, you'll really appreciate it.  I wouldn't
write it off as too difficult if I were you.  It's definitely worth
learning (and it helps your resume; it's in high demand).


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



Re: Handle Hibernate transaction in wicket

2008-02-20 Thread James Carman
Actually, Spring lets you (more importantly them) not worry about the
transaction stuff at all.  The person (you, perhaps) who is wiring
things together can add in the transaction stuff in the XML file.

On 2/20/08, Sébastien Piller [EMAIL PROTECTED] wrote:
 Yes, I read a bit about Spring some time ago, but atm I'm working on a
 project that will be released soon. I can't afford to rewrite half my
 code on the lasts weeks ;)

 Next time, I'll take some time to getting started with it. I'm sure it's
 worth, that's what I read all the day. But I must consider my
 colleagues, too... They are not very very interested with dev, and
 already have difficulties to write php... so, with Spring, they will
 shot themselves :)

 Thx

 James Carman a écrit :
  Once you get used to Spring, you'll really appreciate it.  I wouldn't
  write it off as too difficult if I were you.  It's definitely worth
  learning (and it helps your resume; it's in high demand).

 -
 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: AjaxFallbackDefaultDataTable not refreshing in IE6

2008-02-20 Thread Beyonder Unknown

I built a simple app simulating my application, but i cannot reproduce the bug. 
I noticed that the table header is generated as a hrefspan/a combo. I 
encountered a problem before about IE not like span inside an anchor tag. How 
can I fix this ajax error? 

ERROR: Error while parsing response: Object required
 

Thanks,
Wen Tong

--
The only constant in life is change.

- Original Message 
From: Igor Vaynberg [EMAIL PROTECTED]
To: users@wicket.apache.org
Sent: Friday, February 15, 2008 1:49:37 PM
Subject: Re: AjaxFallbackDefaultDataTable not refreshing in IE6

yes

-igor


On Fri, Feb 15, 2008 at 1:48 PM, Beyonder Unknown [EMAIL PROTECTED] wrote:

  I'm still building the code to the simplest possible, so that its easy to 
 debug. I'll attached ones i got it working. Is it okay, to cut and paste the 
 code in the comment?


  Thanks,
  Wen Tong


  --
  The only constant in life is change.

  - Original Message 

 From: Igor Vaynberg [EMAIL PROTECTED]
  To: users@wicket.apache.org

 Sent: Friday, February 15, 2008 1:36:11 PM
  Subject: Re: AjaxFallbackDefaultDataTable not refreshing in IE6


 where is the quickstart?

  -igor



 On Fri, Feb 15, 2008 at 1:30 PM, Beyonder Unknown [EMAIL PROTECTED] wrote:
  
Will do.  ( https://issues.apache.org/jira/browse/WICKET-1349 )
  
  

   Thanks,
Wen Tong
  
--
The only constant in life is change.
  
- Original Message 
  

  From: Igor Vaynberg [EMAIL PROTECTED]
To: users@wicket.apache.org
  

  Sent: Friday, February 15, 2008 1:15:52 PM
Subject: Re: AjaxFallbackDefaultDataTable not refreshing in IE6
  
  

  please enter a bug report along with a quickstart
  
-igor


 
  
  
  
On Fri, Feb 15, 2008 at 1:12 PM, Beyonder Unknown [EMAIL PROTECTED] 
 wrote:
 Hi Igor,

  Its wicket 1.3.1.

  Thanks,
  Allan


  --
  The only constant in life is change.

  - Original Message 


 From: Igor Vaynberg [EMAIL PROTECTED]
  To: users@wicket.apache.org
  Sent: Friday, February 15, 2008 12:40:53 PM
  Subject: Re: AjaxFallbackDefaultDataTable not refreshing in IE6

  what wicket version is doing that?

  -igor


  On Fri, Feb 15, 2008 at 12:16 PM, Beyonder Unknown [EMAIL PROTECTED] 
 wrote:
  
One thing I noticed is that the javascript generated is appended 
 with ^. Could it be that IE is not parsing this properly?
  
excerpt from Wicket Ajax Debug Window
  
  
   for (var i=0; iformLen; i++) {
   var elm = formObj.elements[i]^;
   if (elm.type == checkbox  elm.className 
 == parent) {
   elm.checked = state;
   return;
   }
   }
  
  
  
Thanks,
  
   Wen Tong
  
--
The only constant in life is change.
  
  
  
   - Original Message 
From: Beyonder Unknown [EMAIL PROTECTED]
To: WICKET USER users@wicket.apache.org
Sent: Friday, February 15, 2008 12:00:41 PM
Subject: AjaxFallbackDefaultDataTable not refreshing in IE6
  
  
Hi Guys,
  
The AjaxFallbackDefaultDataTable (with SortableDataProvider) 
 component that I'm using is not refreshing in IE6, but works fine with 
 firefox. The Wicket Ajax Debugger says:
  
ERROR: Error while parsing response: Object required
INFO: Invoking post-call handler(s)...
INFO: invoking failure handler(s)...
  
  
Have any of you encountered this before?  Any help will be greatly 
 appreciated.
  
Best,
Wen Tong
  
--
The only constant in life is change.
  
  
  
  
 
 
Looking for last minute shopping deals?
Find them fast with Yahoo! Search.  
 http://tools.search.yahoo.com/newsearch/category.php?category=shopping
  

 -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
  
  
  
 
 
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile.  Try it now.  
 http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
  
  
  
  

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

  -
 

Re: Wicket-security wish list

2008-02-20 Thread Johan Compagner
Why do you get access denied pages a lot in your app?
I would say a user shouldnt be abe to click on that link in the first
place. Only maybe when he tampers with it. But if you have session
pages that that shouldnt be a problem. (only bookmakrable pages where
a user has to first login for)

On 2/19/08, Warren [EMAIL PROTECTED] wrote:
 Maurice,

 I was thinking about this Access Denied message problem I have been
 working on and thought up some features that might be useful in future
 releases. It would be nice to be able to configure Access Denied messages
 directly into the hive like this:

 grant principal com.scanman.security.authorization.ScanManPrincipal ScanMan
 Receiving Principal Access Denied Message Here
 {
   permission ${ComponentPermission} ${RecvMenu}, inherit, render, 
 enable,
 Permission Access Denied Message Here;
 };
 grant principal com.scanman.security.authorization.ScanManPrincipal ScanMan
 Ordering Principal Access Denied Message Here
 {
   permission ${ComponentPermission} ${OrderMenu}, inherit, render,
 enable, Permission Access Denied Message Here;
 };

 I believe you are following some kind of standard for how the hive is
 set-up, so I am not sure this would work. But anyway, you could then set-up
 the configuration of how these messages were used in the
 SwarmWebApplication. For Example, put them into the error queue, or take
 advantage of message resources, message keys and localization and so on. I
 ended up putting these messages into the error queue from MySwarmStrategy
 and it works great.

 I can't imagine that a feature like this would not be of some value to other
 users. My app has a lot of different levels of security and permissions that
 the Administrative user can configure within a separate Point of Sale app.
 Messages of this sort are valuable to a user so that security levels and
 permissions can be tweaked to best suit a companies policies. A simple
 Access Denied message gives little clue as to why access was denied.

 That's my two cents. Thanks for all the help you have given me. Your project
 surely deserves a lot of credit.

 Thanks,

 Warren Bell


 -
 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: self refreshing table with effects

2008-02-20 Thread Johan Compagner
Please make a jira issue for this with an example

On 2/20/08, okrohne [EMAIL PROTECTED] wrote:

 Hi,

 I tried QueryStringUrlCodingStrategy and MixedParamUrlCodingStrategy and
 both are throwing
 exceptions. I looked at the example in chapter 15.2 , I don't get the point
 of:

 ((WebApplication)getApplication()).unmount(cheeses);
 ((WebApplication)getApplication()).mountBookmarkablePage(cheeses,
 CheeseDetailsPage.class);
 ((WebApplication)getApplication()).unmount(cheeses);
 ((WebApplication)getApplication()).mount(new
 QueryStringUrlCodingStrategy(cheeses, CheeseDetailsPage.class));
 ((WebApplication)getApplication()).unmount(cheeses);
 ((WebApplication)getApplication()).mount(new
 MixedParamUrlCodingStrategy(cheeses, CheeseDetailsPage.class, new
 String[]{}));

 why mount and unmount?

 The exceptions are thrown after the first on timer event.


 QueryStringUrlCodingStrategy gives:

 Root cause:

 java.lang.NullPointerException
 at
 org.apache.wicket.request.target.component.BookmarkableListenerInterfaceRequestTarget.processEvents(BookmarkableListenerInterfaceRequestTarget.java:131)
 at
 org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:90)
 at
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1166)
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1241)
 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316)
 at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
 at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354)
 at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
 at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
 at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
 at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
 at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
 at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
 at
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
 at java.lang.Thread.run(Thread.java:613)


 MixedParamUrlCodingStrategy gives
 Root cause:

 java.lang.ClassCastException: [Ljava.lang.String;
 at
 org.apache.wicket.request.target.coding.MixedParamUrlCodingStrategy.appendParameters(MixedParamUrlCodingStrategy.java:153)
 at
 org.apache.wicket.request.target.coding.BookmarkablePageRequestTargetUrlCodingStrategy.encode(BookmarkablePageRequestTargetUrlCodingStrategy.java:135)
 at
 org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.pathForTarget(WebRequestCodingStrategy.java:459)
 at
 org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.encode(WebRequestCodingStrategy.java:236)
 at
 org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:224)
 at
 org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:103)
 at
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1172)
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1241)
 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316)
 at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
 at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354)
 at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
 at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
 at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
 at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
 at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
 at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
 at
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
 at java.lang.Thread.run(Thread.java:613)

 Any 

Re: Restarting AjaxTimeBehavior

2008-02-20 Thread Juan Gabriel Arias
Ok, i'll try to do that.

Thanks!
juan


Re: Custom JavaScript Panel ?

2008-02-20 Thread Beyonder Unknown
Hi Warren,

Try this. Have your panel implement IHeaderContributor, and implement the 
method:

/**
 * This method will call this javascript to set the button to its default 
state.
 */
public void renderHead(IHeaderResponse response) {
response.renderOnDomReadyJavascript(foo(););
}
 

Hope this helps.

Best,
Wen Tong


--
The only constant in life is change.

- Original Message 
From: Warren [EMAIL PROTECTED]
To: users@wicket.apache.org
Sent: Tuesday, February 19, 2008 3:22:42 PM
Subject: Custom JavaScript Panel ?

I am trying to design a Panel that dynamically creates JavaScript into the
head markup. I understand how to do this statically, but not dynamically.
My app runs on wireless PDA scanning devices used in grocery stores. One of
the requirements is that it does not allow the user to place focus on any
other part of the page other than where I want it. I did this statically on
every JSP I had in my last Struts version app. It would be nice to add a
panel to each page that would dynamically create the JavaScript needed based
on the relevant components that need focus. Something like this:

public class MyPage extends WebPage
{

public MyPage()
{

add(...);
add(...);
add(...);

...

add(new ForceFocusPanel(forceFocus, this));
}

...

}


public class ForceFocusPanel extends Panel
{
public ForceFocusPanel()
{
// Iterate thru components on the original page and add relevant ones 
and
the necessary JavaScript
// to some kind of repeater or ListView ?
// Add this repeater to the markup template to appear in the head 
markup ?
add(relevantFocusComponent);
}
}

ForceFocusPanel.html

wicket:head
script type=text/javascript
??? wicket:id=relevantFocusComponents /
/script
/wicket:head
wicket:panel
/wicket:panel

Here are my questions,

1. Please stop me if I am trying to reinvent the wheel and point me to that
magical component if there is one.

2. Since I only want to modify the original Page's head markup, do I have
to include the Panel's wicket:id somewhere on the original Page's markup?

3. What method do I use to get the Page's components so that I can iterate
over them?

4. What type of component would I add to my Panel that would contain the
relevant focus components JavaScript? A repeater of some kind or ListView?

5. What type of markup would I use to place this repeater component into my
Panel's head markup and will this even work within the head markup?

wicket:head
script type=text/javascript
...
??? wicket:id=relevantFocusComponents /
...
/script
/wicket:head

I know this is a lot of questions, and by no means am I asking anyone to
write code for me. I am just looking for hints, suggestions or point me to
some examples if available.

Thanks,

Warren Bell


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






  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

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



RE: Wicket-security wish list

2008-02-20 Thread Warren
Yes, this would work if you did not need to give the user any type of
indication why they can not go to that page. My app is very flexible in that
an administrator can adjust security settings based on their company's
policies. Say for instance, I have a whole ordering section of my app where
a user can go and place orders for product. A user in the user group
Cashiers can not order in one company but can in another. The Administrator
would simply add or exclude the ordering permission for the Cashier's group
based on what the companies policies are. The Administrator does this in
another stand alone app. My app reads these permissions from the other app's
database and converts them to Principals and then adds those Principals to
the Subject thru a loop. One permission in the other app will equal one or
more permissions in one Principal in my app.

DefaultSubject subject = new DefaultSubject();
for (MapString, String securityLevel :
user.getUserGroup().getSecurityLevels())
{
subject.addPrincipal(new ScanManPrincipal(securityLevel.get(level)));
}
return subject;

You may wonder, why doesn't the cashier simply say Hey I can't order. Well
in that situation maybe, but in other situations it's not so clear why a
user was denied access, and in my experience, the users of my app are not
the brightest. Now a permission like Show Cost, you would just show or not
show the cost with no explanation.

 -Original Message-
 From: Maurice Marrink [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, February 20, 2008 8:28 AM
 To: users@wicket.apache.org
 Subject: Re: Wicket-security wish list


 Johan is correct, you should use SecurePageLinks or other Links that
 are protected to prevent users from ever seeing or clicking the link.

 Maurice

 On Feb 20, 2008 5:21 PM, Johan Compagner [EMAIL PROTECTED] wrote:
  Why do you get access denied pages a lot in your app?
  I would say a user shouldnt be abe to click on that link in the first
  place. Only maybe when he tampers with it. But if you have session
  pages that that shouldnt be a problem. (only bookmakrable pages where
  a user has to first login for)
 
 
  On 2/19/08, Warren [EMAIL PROTECTED] wrote:
   Maurice,
  
   I was thinking about this Access Denied message problem I have been
   working on and thought up some features that might be useful in future
   releases. It would be nice to be able to configure Access
 Denied messages
   directly into the hive like this:
  
   grant principal
 com.scanman.security.authorization.ScanManPrincipal ScanMan
   Receiving Principal Access Denied Message Here
   {
 permission ${ComponentPermission} ${RecvMenu},
 inherit, render, enable,
   Permission Access Denied Message Here;
   };
   grant principal
 com.scanman.security.authorization.ScanManPrincipal ScanMan
   Ordering Principal Access Denied Message Here
   {
 permission ${ComponentPermission} ${OrderMenu},
 inherit, render,
   enable, Permission Access Denied Message Here;
   };
  
   I believe you are following some kind of standard for how the hive is
   set-up, so I am not sure this would work. But anyway, you
 could then set-up
   the configuration of how these messages were used in the
   SwarmWebApplication. For Example, put them into the error
 queue, or take
   advantage of message resources, message keys and localization
 and so on. I
   ended up putting these messages into the error queue from
 MySwarmStrategy
   and it works great.
  
   I can't imagine that a feature like this would not be of some
 value to other
   users. My app has a lot of different levels of security and
 permissions that
   the Administrative user can configure within a separate
 Point of Sale app.
   Messages of this sort are valuable to a user so that security
 levels and
   permissions can be tweaked to best suit a companies policies. A simple
   Access Denied message gives little clue as to why access was denied.
  
   That's my two cents. Thanks for all the help you have given
 me. Your project
   surely deserves a lot of credit.
  
   Thanks,
  
   Warren Bell
  
  
   -
   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: Custom JavaScript Panel ?

2008-02-20 Thread Warren
Thanks, I will give it a try.

 -Original Message-
 From: Beyonder Unknown [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, February 20, 2008 9:16 AM
 To: users@wicket.apache.org
 Subject: Re: Custom JavaScript Panel ?


 Hi Warren,

 Try this. Have your panel implement IHeaderContributor, and
 implement the method:

 /**
  * This method will call this javascript to set the button to
 its default state.
  */
 public void renderHead(IHeaderResponse response) {
 response.renderOnDomReadyJavascript(foo(););
 }


 Hope this helps.

 Best,
 Wen Tong


 --
 The only constant in life is change.

 - Original Message 
 From: Warren [EMAIL PROTECTED]
 To: users@wicket.apache.org
 Sent: Tuesday, February 19, 2008 3:22:42 PM
 Subject: Custom JavaScript Panel ?

 I am trying to design a Panel that dynamically creates JavaScript into the
 head markup. I understand how to do this statically, but not
 dynamically.
 My app runs on wireless PDA scanning devices used in grocery
 stores. One of
 the requirements is that it does not allow the user to place focus on any
 other part of the page other than where I want it. I did this
 statically on
 every JSP I had in my last Struts version app. It would be nice to add a
 panel to each page that would dynamically create the JavaScript
 needed based
 on the relevant components that need focus. Something like this:

 public class MyPage extends WebPage
 {

 public MyPage()
 {

 add(...);
 add(...);
 add(...);

 ...

 add(new ForceFocusPanel(forceFocus, this));
 }

 ...

 }


 public class ForceFocusPanel extends Panel
 {
 public ForceFocusPanel()
 {
 // Iterate thru components on the original page and add
 relevant ones and
 the necessary JavaScript
 // to some kind of repeater or ListView ?
 // Add this repeater to the markup template to appear in
 the head markup ?
 add(relevantFocusComponent);
 }
 }

 ForceFocusPanel.html

 wicket:head
 script type=text/javascript
 ??? wicket:id=relevantFocusComponents /
 /script
 /wicket:head
 wicket:panel
 /wicket:panel

 Here are my questions,

 1. Please stop me if I am trying to reinvent the wheel and point
 me to that
 magical component if there is one.

 2. Since I only want to modify the original Page's head markup,
 do I have
 to include the Panel's wicket:id somewhere on the original Page's markup?

 3. What method do I use to get the Page's components so that I can iterate
 over them?

 4. What type of component would I add to my Panel that would contain the
 relevant focus components JavaScript? A repeater of some kind
 or ListView?

 5. What type of markup would I use to place this repeater
 component into my
 Panel's head markup and will this even work within the head markup?

 wicket:head
 script type=text/javascript
 ...
 ??? wicket:id=relevantFocusComponents /
 ...
 /script
 /wicket:head

 I know this is a lot of questions, and by no means am I asking anyone to
 write code for me. I am just looking for hints, suggestions or point me to
 some examples if available.

 Thanks,

 Warren Bell


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







 __
 __
 Looking for last minute shopping deals?
 Find them fast with Yahoo! Search.
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

-
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]



Tab switching events?

2008-02-20 Thread Michael Mehrle
I have a TabbedPanel (a) that contains two panels which in turn each
contain one TabbedPanel (b) and (c). When I switch a tab in (b) or (c) I
need to retain the tab selection of (a) in their link logic. I am
currently overriding newLink() for all panels using
IndexedParamUrlCodingStrategy.

One approach I am considering is to capture the event when (a) is being
switched to another tab, catching its tab index and putting it into an
instance variable of the enclosing page.

Questions:

1) How do I catch that tab switching event?

2) Does anyone know a better way of correlating link generation logic
with nested tabbed panels?

Thanks in advance!

Michael


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



Multiple RadioGroups in an Table...can it be done?

2008-02-20 Thread Doug Leeper

I have two columns in a DataView that have two separate radio based values.

From my reading/understanding is that a Radio will traverse up the component
tree to find the nearest RadioGroup.

If this is correct, how would one have a two radio groups displayed in a
DataView?
-- 
View this message in context: 
http://www.nabble.com/Multiple-RadioGroups-in-an-Table...can-it-be-done--tp15596385p15596385.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: NoClassDefFoundError with DatePicker on app reload

2008-02-20 Thread Gerolf Seitz
i experienced the same issue.
i got around it by adding this to my context.xml (big thanks to Nick
Heudecker):
context 
  manager className=*org.apache.catalina.session.PersistentManager
saveOnRestart=false/
/context

see http://tomcat.apache.org/tomcat-6.0-doc/config/manager.html

  gerolf
*
On Wed, Feb 20, 2008 at 4:46 PM, Sébastien Piller [EMAIL PROTECTED]
wrote:

  Hello,

 I've a problem with the DatePicker component. Every time I reload my
 application (in Eclipse - Run - 'My project' on MyEclipse Tomcat, or with
 an application undeploy/redeploy on Tomcat), I got the stacktrace below.

 java.lang.NoClassDefFoundError:
 org.apache.wicket.extensions.yui.calendar.DatePicker
 at booby.dbadmin.people.FormPerson.(FormPerson.java:174)
 at cosimoo.wizardorderprocess.WizardOrderProcess$Address.(
 WizardOrderProcess.java:90)
 at cosimoo.wizardorderprocess.WizardOrderProcess.(
 WizardOrderProcess.java:693)
 at cosimoo.PagePassOrderOrCustomizeNewProduct$1.onClick(
 PagePassOrderOrCustomizeNewProduct.java:21)
 at org.apache.wicket.markup.html.link.Link.onLinkClicked(Link.java
 :214)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at org.apache.wicket.RequestListenerInterface.invoke(
 RequestListenerInterface.java:183)
 at
 org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents
 (ListenerInterfaceRequestTarget.java:73)
 at
 org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(
 AbstractRequestCycleProcessor.java:90)
 at org.apache.wicket.RequestCycle.processEventsAndRespond(
 RequestCycle.java:1166)
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1241)
 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316)
 at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
 at org.apache.wicket.protocol.http.WicketFilter.doGet(
 WicketFilter.java:354)
 at org.apache.wicket.protocol.http.WicketFilter.doFilter(
 WicketFilter.java:194)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
 ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(
 ApplicationFilterChain.java:206)
 at org.apache.catalina.core.StandardWrapperValve.invoke(
 StandardWrapperValve.java:230)
 at org.apache.catalina.core.StandardContextValve.invoke(
 StandardContextValve.java:175)
 at org.apache.catalina.core.StandardHostValve.invoke(
 StandardHostValve.java:128)
 at org.apache.catalina.valves.ErrorReportValve.invoke(
 ErrorReportValve.java:104)
 at org.apache.catalina.core.StandardEngineValve.invoke(
 StandardEngineValve.java:109)
 at org.apache.catalina.connector.CoyoteAdapter.service(
 CoyoteAdapter.java:261)
 at org.apache.coyote.http11.Http11Processor.process(
 Http11Processor.java:844)
 at
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
 Http11Protocol.java:581)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java
 :447)
 at java.lang.Thread.run(Unknown Source)

 However, I'm sure that class is in my path... I can see it under
 /libs/wicket-extensions-1.3.1.jar. And if I make a clean start (ie stop
 tomcat, manually clean the webapps folder, restart tomcat and copy my
 file.war), then everything works fine.

 Is it a classloader issue or something like that? How to avoid this?
  - To
 unsubscribe, e-mail: [EMAIL PROTECTED] For additional
 commands, e-mail: [EMAIL PROTECTED]


Re: need to sanitize uploaded file names before saving?

2008-02-20 Thread Abdul Habra
When I save uploaded files, I never use the client's name of the file. That 
could cause problems, and could be a security risk.
   
  For example, a windows client may have a file name which contains spaces, 
however on a unix system this will not be a valid file name.
   
  Another example if u r running on a windows server, somebody may upload a 
file named dir.bat and put in it whatever commands they like, then ... I leave 
it to your imagination :)
   
  
Alex Jacoby [EMAIL PROTECTED] wrote:
  I'm saving uploaded files to a directory on the local file system. I 
was just wondering: would it be possible for someone to give their 
uploaded file a name like ../../secretdir/passwd so that they could 
theoretically clobber another file (if permissions weren't somehow 
blocking it)?

If so, is this something that wicket does or could check for? The 
javadocs for FileItem.getName say that while most browsers provide 
only a basename (no path), Opera does include a full path, so it would 
seem that a malicious user could do some directory traversal trickery...

It's not hard to check for ../ or a leading / (or just / 
ANYWHERE I suppose), but I'd skip it if it weren't necessary.

Thanks,
Alex

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




Re: NoClassDefFoundError with DatePicker on app reload

2008-02-20 Thread Martijn Dashorst
Do these two want to look up something Wicket related that is not yet
on the classpath?

private static final ResourceReference YUI = new
JavascriptResourceReference(YuiLib.class, );

private static final ResourceReference WICKET_DATE = new
JavascriptResourceReference(
DatePicker.class, wicket-date.js);

Martijn

On 2/20/08, Martijn Dashorst [EMAIL PROTECTED] wrote:
 Probably a bug in the datepicker which tries to initialize a class
 instance variable upon deserialization. Probably it tries to bind to
 the Application.

 Could you file a bug in JIRA?

 Martijn

 On 2/20/08, Sébastien Piller [EMAIL PROTECTED] wrote:
 
   Hello,
 
   I've a problem with the DatePicker component. Every time I reload my
  application (in Eclipse - Run - 'My project' on MyEclipse Tomcat, or with
  an application undeploy/redeploy on Tomcat), I got the stacktrace below.
 
  java.lang.NoClassDefFoundError:
  org.apache.wicket.extensions.yui.calendar.DatePicker
   at booby.dbadmin.people.FormPerson.(FormPerson.java:174)
   at
  cosimoo.wizardorderprocess.WizardOrderProcess$Address.(WizardOrderProcess.java:90)
   at
  cosimoo.wizardorderprocess.WizardOrderProcess.(WizardOrderProcess.java:693)
   at
  cosimoo.PagePassOrderOrCustomizeNewProduct$1.onClick(PagePassOrderOrCustomizeNewProduct.java:21)
   at
  org.apache.wicket.markup.html.link.Link.onLinkClicked(Link.java:214)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
  Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown
  Source)
   at
  sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
  Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at
  org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:183)
   at
  org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)
   at
  org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:90)
   at
  org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1166)
   at
  org.apache.wicket.RequestCycle.step(RequestCycle.java:1241)
   at
  org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316)
   at
  org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
   at
  org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354)
   at
  org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
   at
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at
  org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
   at
  org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
   at
  org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
   at
  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
   at
  org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at
  org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
   at
  org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
   at
  org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
   at
  org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
   at java.lang.Thread.run(Unknown Source)
   However, I'm sure that class is in my path... I can see it under
  /libs/wicket-extensions-1.3.1.jar. And if I make a clean start (ie stop
  tomcat, manually clean the webapps folder, restart tomcat and copy my
  file.war), then everything works fine.
 
   Is it a classloader issue or something like that? How to avoid this?
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]


 --
 Buy Wicket in Action: http://manning.com/dashorst
 Apache Wicket 1.3.1 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.1



-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.1 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.1

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



Re: NoClassDefFoundError with DatePicker on app reload

2008-02-20 Thread Gerolf Seitz
iirc, YuiLib calls Application.get() to check whether the app is in
deployment/development mode.

  gerolf

On Wed, Feb 20, 2008 at 9:26 PM, Martijn Dashorst 
[EMAIL PROTECTED] wrote:

 Erhm, are they trying to do something like Application.get()?

 That would cause an exception, causing the initialization to be
 borked, causing all kinds of runtime errors. It will also explain the
 NoClassDefFoundError.

 Martijn

 On 2/20/08, Martijn Dashorst [EMAIL PROTECTED] wrote:
  Do these two want to look up something Wicket related that is not yet
  on the classpath?
 
  private static final ResourceReference YUI = new
  JavascriptResourceReference(YuiLib.class, );
 
  private static final ResourceReference WICKET_DATE = new
  JavascriptResourceReference(
  DatePicker.class, wicket-date.js);
 
  Martijn
 
  On 2/20/08, Martijn Dashorst [EMAIL PROTECTED] wrote:
   Probably a bug in the datepicker which tries to initialize a class
   instance variable upon deserialization. Probably it tries to bind to
   the Application.
  
   Could you file a bug in JIRA?
  
   Martijn
  
   On 2/20/08, Sébastien Piller [EMAIL PROTECTED] wrote:
   
 Hello,
   
 I've a problem with the DatePicker component. Every time I reload
 my
application (in Eclipse - Run - 'My project' on MyEclipse Tomcat,
 or with
an application undeploy/redeploy on Tomcat), I got the stacktrace
 below.
   
java.lang.NoClassDefFoundError:
org.apache.wicket.extensions.yui.calendar.DatePicker
 at booby.dbadmin.people.FormPerson.(FormPerson.java:174)
 at
cosimoo.wizardorderprocess.WizardOrderProcess$Address.(
 WizardOrderProcess.java:90)
 at
cosimoo.wizardorderprocess.WizardOrderProcess.(
 WizardOrderProcess.java:693)
 at
cosimoo.PagePassOrderOrCustomizeNewProduct$1.onClick(
 PagePassOrderOrCustomizeNewProduct.java:21)
 at
org.apache.wicket.markup.html.link.Link.onLinkClicked(Link.java:214)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown
Source)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at
org.apache.wicket.RequestListenerInterface.invoke(
 RequestListenerInterface.java:183)
 at
   
 org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents
 (ListenerInterfaceRequestTarget.java:73)
 at
   
 org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(
 AbstractRequestCycleProcessor.java:90)
 at
org.apache.wicket.RequestCycle.processEventsAndRespond(
 RequestCycle.java:1166)
 at
org.apache.wicket.RequestCycle.step(RequestCycle.java:1241)
 at
org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316)
 at
org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
 at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java
 :354)
 at
org.apache.wicket.protocol.http.WicketFilter.doFilter(
 WicketFilter.java:194)
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
 ApplicationFilterChain.java:235)
 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(
 ApplicationFilterChain.java:206)
 at
org.apache.catalina.core.StandardWrapperValve.invoke(
 StandardWrapperValve.java:230)
 at
org.apache.catalina.core.StandardContextValve.invoke(
 StandardContextValve.java:175)
 at
org.apache.catalina.core.StandardHostValve.invoke(
 StandardHostValve.java:128)
 at
org.apache.catalina.valves.ErrorReportValve.invoke(
 ErrorReportValve.java:104)
 at
org.apache.catalina.core.StandardEngineValve.invoke(
 StandardEngineValve.java:109)
 at
org.apache.catalina.connector.CoyoteAdapter.service(
 CoyoteAdapter.java:261)
 at
org.apache.coyote.http11.Http11Processor.process(
 Http11Processor.java:844)
 at
   
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
 Http11Protocol.java:581)
 at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java
 :447)
 at java.lang.Thread.run(Unknown Source)
 However, I'm sure that class is in my path... I can see it under
/libs/wicket-extensions-1.3.1.jar. And if I make a clean start (ie
 stop
tomcat, manually clean the webapps folder, restart tomcat and copy
 my
file.war), then everything works fine.
   
 Is it a classloader issue or something like that? How to avoid
 this?
   
 -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  
  
   --
   Buy Wicket in Action: http://manning.com/dashorst
   Apache Wicket 1.3.1 is released
   Get it now: 

Re: NoClassDefFoundError with DatePicker on app reload

2008-02-20 Thread Martijn Dashorst
Then that is the problem and should be fixed.

Martijn

On 2/20/08, Gerolf Seitz [EMAIL PROTECTED] wrote:
 iirc, YuiLib calls Application.get() to check whether the app is in
 deployment/development mode.

   gerolf

 On Wed, Feb 20, 2008 at 9:26 PM, Martijn Dashorst 
 [EMAIL PROTECTED] wrote:

  Erhm, are they trying to do something like Application.get()?
 
  That would cause an exception, causing the initialization to be
  borked, causing all kinds of runtime errors. It will also explain the
  NoClassDefFoundError.
 
  Martijn
 
  On 2/20/08, Martijn Dashorst [EMAIL PROTECTED] wrote:
   Do these two want to look up something Wicket related that is not yet
   on the classpath?
  
   private static final ResourceReference YUI = new
   JavascriptResourceReference(YuiLib.class, );
  
   private static final ResourceReference WICKET_DATE = new
   JavascriptResourceReference(
   DatePicker.class, wicket-date.js);
  
   Martijn
  
   On 2/20/08, Martijn Dashorst [EMAIL PROTECTED] wrote:
Probably a bug in the datepicker which tries to initialize a class
instance variable upon deserialization. Probably it tries to bind to
the Application.
   
Could you file a bug in JIRA?
   
Martijn
   
On 2/20/08, Sébastien Piller [EMAIL PROTECTED] wrote:

  Hello,

  I've a problem with the DatePicker component. Every time I reload
  my
 application (in Eclipse - Run - 'My project' on MyEclipse Tomcat,
  or with
 an application undeploy/redeploy on Tomcat), I got the stacktrace
  below.

 java.lang.NoClassDefFoundError:
 org.apache.wicket.extensions.yui.calendar.DatePicker
  at booby.dbadmin.people.FormPerson.(FormPerson.java:174)
  at
 cosimoo.wizardorderprocess.WizardOrderProcess$Address.(
  WizardOrderProcess.java:90)
  at
 cosimoo.wizardorderprocess.WizardOrderProcess.(
  WizardOrderProcess.java:693)
  at
 cosimoo.PagePassOrderOrCustomizeNewProduct$1.onClick(
  PagePassOrderOrCustomizeNewProduct.java:21)
  at
 org.apache.wicket.markup.html.link.Link.onLinkClicked(Link.java:214)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
 Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown
 Source)
  at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
 Source)
  at java.lang.reflect.Method.invoke(Unknown Source)
  at
 org.apache.wicket.RequestListenerInterface.invoke(
  RequestListenerInterface.java:183)
  at

  org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents
  (ListenerInterfaceRequestTarget.java:73)
  at

  org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(
  AbstractRequestCycleProcessor.java:90)
  at
 org.apache.wicket.RequestCycle.processEventsAndRespond(
  RequestCycle.java:1166)
  at
 org.apache.wicket.RequestCycle.step(RequestCycle.java:1241)
  at
 org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316)
  at
 org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
  at
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java
  :354)
  at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(
  WicketFilter.java:194)
  at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
  ApplicationFilterChain.java:235)
  at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(
  ApplicationFilterChain.java:206)
  at
 org.apache.catalina.core.StandardWrapperValve.invoke(
  StandardWrapperValve.java:230)
  at
 org.apache.catalina.core.StandardContextValve.invoke(
  StandardContextValve.java:175)
  at
 org.apache.catalina.core.StandardHostValve.invoke(
  StandardHostValve.java:128)
  at
 org.apache.catalina.valves.ErrorReportValve.invoke(
  ErrorReportValve.java:104)
  at
 org.apache.catalina.core.StandardEngineValve.invoke(
  StandardEngineValve.java:109)
  at
 org.apache.catalina.connector.CoyoteAdapter.service(
  CoyoteAdapter.java:261)
  at
 org.apache.coyote.http11.Http11Processor.process(
  Http11Processor.java:844)
  at

  org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
  Http11Protocol.java:581)
  at
 org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java
  :447)
  at java.lang.Thread.run(Unknown Source)
  However, I'm sure that class is in my path... I can see it under
 /libs/wicket-extensions-1.3.1.jar. And if I make a clean start (ie
  stop
 tomcat, manually clean the webapps folder, restart tomcat and copy
  my
 file.war), then everything works fine.

  Is it a classloader issue or something like that? How to avoid
  this?

  

Re: NoClassDefFoundError with DatePicker on app reload

2008-02-20 Thread Martijn Dashorst
BTW, I just had such a scenario on the job, therefore I might be able
to pinpoint this quickly.

Martijn

On 2/20/08, Martijn Dashorst [EMAIL PROTECTED] wrote:
 Then that is the problem and should be fixed.

 Martijn

 On 2/20/08, Gerolf Seitz [EMAIL PROTECTED] wrote:
  iirc, YuiLib calls Application.get() to check whether the app is in
  deployment/development mode.
 
gerolf
 
  On Wed, Feb 20, 2008 at 9:26 PM, Martijn Dashorst 
  [EMAIL PROTECTED] wrote:
 
   Erhm, are they trying to do something like Application.get()?
  
   That would cause an exception, causing the initialization to be
   borked, causing all kinds of runtime errors. It will also explain the
   NoClassDefFoundError.
  
   Martijn
  
   On 2/20/08, Martijn Dashorst [EMAIL PROTECTED] wrote:
Do these two want to look up something Wicket related that is not yet
on the classpath?
   
private static final ResourceReference YUI = new
JavascriptResourceReference(YuiLib.class, );
   
private static final ResourceReference WICKET_DATE = new
JavascriptResourceReference(
DatePicker.class, wicket-date.js);
   
Martijn
   
On 2/20/08, Martijn Dashorst [EMAIL PROTECTED] wrote:
 Probably a bug in the datepicker which tries to initialize a class
 instance variable upon deserialization. Probably it tries to bind to
 the Application.

 Could you file a bug in JIRA?

 Martijn

 On 2/20/08, Sébastien Piller [EMAIL PROTECTED] wrote:
 
   Hello,
 
   I've a problem with the DatePicker component. Every time I reload
   my
  application (in Eclipse - Run - 'My project' on MyEclipse Tomcat,
   or with
  an application undeploy/redeploy on Tomcat), I got the stacktrace
   below.
 
  java.lang.NoClassDefFoundError:
  org.apache.wicket.extensions.yui.calendar.DatePicker
   at booby.dbadmin.people.FormPerson.(FormPerson.java:174)
   at
  cosimoo.wizardorderprocess.WizardOrderProcess$Address.(
   WizardOrderProcess.java:90)
   at
  cosimoo.wizardorderprocess.WizardOrderProcess.(
   WizardOrderProcess.java:693)
   at
  cosimoo.PagePassOrderOrCustomizeNewProduct$1.onClick(
   PagePassOrderOrCustomizeNewProduct.java:21)
   at
  org.apache.wicket.markup.html.link.Link.onLinkClicked(Link.java:214)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
  Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown
  Source)
   at
  sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
  Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at
  org.apache.wicket.RequestListenerInterface.invoke(
   RequestListenerInterface.java:183)
   at
 
   org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents
   (ListenerInterfaceRequestTarget.java:73)
   at
 
   org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(
   AbstractRequestCycleProcessor.java:90)
   at
  org.apache.wicket.RequestCycle.processEventsAndRespond(
   RequestCycle.java:1166)
   at
  org.apache.wicket.RequestCycle.step(RequestCycle.java:1241)
   at
  org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316)
   at
  org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
   at
  org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java
   :354)
   at
  org.apache.wicket.protocol.http.WicketFilter.doFilter(
   WicketFilter.java:194)
   at
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
   ApplicationFilterChain.java:235)
   at
  org.apache.catalina.core.ApplicationFilterChain.doFilter(
   ApplicationFilterChain.java:206)
   at
  org.apache.catalina.core.StandardWrapperValve.invoke(
   StandardWrapperValve.java:230)
   at
  org.apache.catalina.core.StandardContextValve.invoke(
   StandardContextValve.java:175)
   at
  org.apache.catalina.core.StandardHostValve.invoke(
   StandardHostValve.java:128)
   at
  org.apache.catalina.valves.ErrorReportValve.invoke(
   ErrorReportValve.java:104)
   at
  org.apache.catalina.core.StandardEngineValve.invoke(
   StandardEngineValve.java:109)
   at
  org.apache.catalina.connector.CoyoteAdapter.service(
   CoyoteAdapter.java:261)
   at
  org.apache.coyote.http11.Http11Processor.process(
   Http11Processor.java:844)
   at
 
   org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
   Http11Protocol.java:581)
   at
  org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java
   :447)
   at java.lang.Thread.run(Unknown Source)
   However, I'm sure that class is in my path... I can see it under
  /libs/wicket-extensions-1.3.1.jar. And if I 

Re: self refreshing table with effects

2008-02-20 Thread Martijn Dashorst
The example as is doesn't make sense in an application, but is
necessary in the context of a book explaining what the effect is of a
URL encoding strategy: it shows how the same link will render with
each URL coding strategy. Therefore it unmounts and mounts.

Martijn

On 2/20/08, okrohne [EMAIL PROTECTED] wrote:

  Hi,

  I tried QueryStringUrlCodingStrategy and MixedParamUrlCodingStrategy and
  both are throwing
  exceptions. I looked at the example in chapter 15.2 , I don't get the point
  of:

  ((WebApplication)getApplication()).unmount(cheeses);
 ((WebApplication)getApplication()).mountBookmarkablePage(cheeses,
  CheeseDetailsPage.class);
 ((WebApplication)getApplication()).unmount(cheeses);
 ((WebApplication)getApplication()).mount(new
  QueryStringUrlCodingStrategy(cheeses, CheeseDetailsPage.class));
 ((WebApplication)getApplication()).unmount(cheeses);
 ((WebApplication)getApplication()).mount(new
  MixedParamUrlCodingStrategy(cheeses, CheeseDetailsPage.class, new
  String[]{}));

  why mount and unmount?

  The exceptions are thrown after the first on timer event.


  QueryStringUrlCodingStrategy gives:

  Root cause:

  java.lang.NullPointerException
  at
  
 org.apache.wicket.request.target.component.BookmarkableListenerInterfaceRequestTarget.processEvents(BookmarkableListenerInterfaceRequestTarget.java:131)
  at
  
 org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:90)
  at
  
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1166)
  at org.apache.wicket.RequestCycle.step(RequestCycle.java:1241)

 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316)
  at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
  at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354)
  at
  org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
  at
  
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  at
  
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at
  
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
  at
  
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
  at
  org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
  at
  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
  at
  
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  at
  org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
  at
  org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
  at
  
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
  at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
  at java.lang.Thread.run(Thread.java:613)



 MixedParamUrlCodingStrategy gives
  Root cause:

  java.lang.ClassCastException: [Ljava.lang.String;
  at
  
 org.apache.wicket.request.target.coding.MixedParamUrlCodingStrategy.appendParameters(MixedParamUrlCodingStrategy.java:153)
  at
  
 org.apache.wicket.request.target.coding.BookmarkablePageRequestTargetUrlCodingStrategy.encode(BookmarkablePageRequestTargetUrlCodingStrategy.java:135)
  at
  
 org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.pathForTarget(WebRequestCodingStrategy.java:459)
  at
  
 org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.encode(WebRequestCodingStrategy.java:236)
  at
  
 org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:224)
  at
  
 org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:103)
  at
  
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1172)
  at org.apache.wicket.RequestCycle.step(RequestCycle.java:1241)

 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316)
  at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
  at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354)
  at
  org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
  at
  
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  at
  
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at
  
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
  at
  
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
  at
  org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
  at
  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
  at
  
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  at
  

Re: Opening DynamicWebResource from Button/AjaxButton?

2008-02-20 Thread UPBrandon

As I mentioned in my previous response, I couldn't use
getRequestCycle().setRequestTarget() directly because of the way the API
works (you can use a ResourceReference but not a Resource.)  Instead, I
ended up with something like this:

new AjaxButton(buttonId, form) {
protected void onSubmit(AjaxRequestTarget target, Form form) {
ResourceReference pdfReference = new ResourceReference() {
protected Resource newResource() {
return new BillPdfWebResource(...);
}
};
String url = 
getRequestCycle().get().urlFor(pdfReference).toString();
getRequestCycle().setRequestTarget(new 
RedirectRequestTarget(url) );
}
}

It works... but only once.  When I click on the button, everything works, my
PDF gets generated and downloaded but then my app becomes unresponsive.  I
can't interact with the site at all until I start over.  Is there a better
way to go about this that wouldn't cause that side effect?  Whatever
approach I take, I need to be able to submit a form when the PDF is
generated.  My example doesn't show it but my BillPdfWebResource class
generates a PDF based on the user's selection and my Form's Model needs to
be updated.  Any suggestions?

-Brandon


igor.vaynberg wrote:
 
 onsubmit() {
   getrequestcycle().setrequesttarget(new
 redirectrequesttarget(urlfor(resourceref)));
 }
 
 -igor
 
 
 On Feb 13, 2008 8:18 AM, UPBrandon [EMAIL PROTECTED] wrote:

 In a project I am working on, I wrote a DynamicWebResource that generates
 a
 PDF file and, by setting the Content-Disposition in the header, got it so
 that the user is prompted to download the PDF when they click on a
 ResourceLink to my PDF-generating resource.

 That all works fine but now I need to open the PDF from a button.  I want
 to
 allow the user to select a value in a form and press a button to view
 somewhat of a report for the item they selected.  However, there doesn't
 appear to be any type of button that would lead a user to my
 DynamicWebResource.  Is there any way to have a button do a submit
 (update
 the model) and then lead the user to a resource?

 -Brandon
 --
 View this message in context:
 http://www.nabble.com/Opening-DynamicWebResource-from-Button-AjaxButton--tp15459841p15459841.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/Opening-DynamicWebResource-from-Button-AjaxButton--tp15459841p15600541.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: need to sanitize uploaded file names before saving?

2008-02-20 Thread Peter Ertl

Why not simply use

  new java.io.File(client_file_name).getName() ?

 Returns the name of the file or directory denoted by this abstract  
pathname.

 This is just the last name in the pathname's name sequence.
 If the pathname's name sequence is empty, then the empty string is  
returned.





Am 20.02.2008 um 22:03 schrieb Alex Jacoby:

Good points -- I was munging the filename a bit, but basically  
leaving it unchanged so that it would be simpler to debug.


I'm still curious about the directory traversal thing... I've tried  
using tamper data to change the filename, but I get a  
MalformedStreamException each time I try [1].


Side note: I think spaces are allowed in filenames in unix file  
systems.  Just quoted or escaped.  (Regardless, your point is still  
taken.)


Alex

[1]
org.apache.wicket.util.upload.MultipartFormInputStream 
$MalformedStreamException: Stream ended unexpectedly
	at  
org 
.apache 
.wicket 
.util 
.upload 
.MultipartFormInputStream.readBodyData(MultipartFormInputStream.java: 
568)


On Feb 20, 2008, at 3:24 PM, Abdul Habra wrote:

When I save uploaded files, I never use the client's name of the  
file. That could cause problems, and could be a security risk.


For example, a windows client may have a file name which contains  
spaces, however on a unix system this will not be a valid file name.


Another example if u r running on a windows server, somebody may  
upload a file named dir.bat and put in it whatever commands they  
like, then ... I leave it to your imagination :)



Alex Jacoby [EMAIL PROTECTED] wrote:
I'm saving uploaded files to a directory on the local file system. I
was just wondering: would it be possible for someone to give their
uploaded file a name like ../../secretdir/passwd so that they could
theoretically clobber another file (if permissions weren't somehow
blocking it)?

If so, is this something that wicket does or could check for? The
javadocs for FileItem.getName say that while most browsers provide
only a basename (no path), Opera does include a full path, so it  
would
seem that a malicious user could do some directory traversal  
trickery...


It's not hard to check for ../ or a leading / (or just /
ANYWHERE I suppose), but I'd skip it if it weren't necessary.

Thanks,
Alex

-
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: need to sanitize uploaded file names before saving?

2008-02-20 Thread Alex Jacoby
I'm now running it through Files.filename() followed by a replaceAll  
for non-word, non-dot chars.  It seems to work OK.  Have I overlooked  
anything?  (They can still put a bad extension on the file, but since  
they're restricted to the data directory of my choosing I'm OK with  
that.)


Thanks,
Alex

On Feb 20, 2008, at 4:03 PM, Alex Jacoby wrote:

Good points -- I was munging the filename a bit, but basically  
leaving it unchanged so that it would be simpler to debug.


I'm still curious about the directory traversal thing... I've tried  
using tamper data to change the filename, but I get a  
MalformedStreamException each time I try [1].


Side note: I think spaces are allowed in filenames in unix file  
systems.  Just quoted or escaped.  (Regardless, your point is still  
taken.)


Alex

[1]
org.apache.wicket.util.upload.MultipartFormInputStream 
$MalformedStreamException: Stream ended unexpectedly
	at  
org 
.apache 
.wicket 
.util 
.upload 
.MultipartFormInputStream.readBodyData(MultipartFormInputStream.java: 
568)


On Feb 20, 2008, at 3:24 PM, Abdul Habra wrote:

When I save uploaded files, I never use the client's name of the  
file. That could cause problems, and could be a security risk.


For example, a windows client may have a file name which contains  
spaces, however on a unix system this will not be a valid file name.


Another example if u r running on a windows server, somebody may  
upload a file named dir.bat and put in it whatever commands they  
like, then ... I leave it to your imagination :)



Alex Jacoby [EMAIL PROTECTED] wrote:
I'm saving uploaded files to a directory on the local file system. I
was just wondering: would it be possible for someone to give their
uploaded file a name like ../../secretdir/passwd so that they could
theoretically clobber another file (if permissions weren't somehow
blocking it)?

If so, is this something that wicket does or could check for? The
javadocs for FileItem.getName say that while most browsers provide
only a basename (no path), Opera does include a full path, so it  
would
seem that a malicious user could do some directory traversal  
trickery...


It's not hard to check for ../ or a leading / (or just /
ANYWHERE I suppose), but I'd skip it if it weren't necessary.

Thanks,
Alex

-
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: Opening DynamicWebResource from Button/AjaxButton?

2008-02-20 Thread Igor Vaynberg
so you want to see the page with updated form values _and_ stream the pdf?


why dont you take that url you generated for your resourceref and
append it to a window.onload javascript that does window.location=url;

-gior


On Wed, Feb 20, 2008 at 2:33 PM, UPBrandon [EMAIL PROTECTED] wrote:

  As I mentioned in my previous response, I couldn't use
  getRequestCycle().setRequestTarget() directly because of the way the API
  works (you can use a ResourceReference but not a Resource.)  Instead, I
  ended up with something like this:

  new AjaxButton(buttonId, form) {
 protected void onSubmit(AjaxRequestTarget target, Form form) {
 ResourceReference pdfReference = new ResourceReference() {
 protected Resource newResource() {
 return new BillPdfWebResource(...);
 }
 };
 String url = 
 getRequestCycle().get().urlFor(pdfReference).toString();
 getRequestCycle().setRequestTarget(new 
 RedirectRequestTarget(url) );
 }
  }

  It works... but only once.  When I click on the button, everything works, my
  PDF gets generated and downloaded but then my app becomes unresponsive.  I
  can't interact with the site at all until I start over.  Is there a better
  way to go about this that wouldn't cause that side effect?  Whatever
  approach I take, I need to be able to submit a form when the PDF is
  generated.  My example doesn't show it but my BillPdfWebResource class
  generates a PDF based on the user's selection and my Form's Model needs to
  be updated.  Any suggestions?

  -Brandon




  igor.vaynberg wrote:
  
   onsubmit() {
 getrequestcycle().setrequesttarget(new
   redirectrequesttarget(urlfor(resourceref)));
   }
  
   -igor
  
  
   On Feb 13, 2008 8:18 AM, UPBrandon [EMAIL PROTECTED] wrote:
  
   In a project I am working on, I wrote a DynamicWebResource that generates
   a
   PDF file and, by setting the Content-Disposition in the header, got it so
   that the user is prompted to download the PDF when they click on a
   ResourceLink to my PDF-generating resource.
  
   That all works fine but now I need to open the PDF from a button.  I want
   to
   allow the user to select a value in a form and press a button to view
   somewhat of a report for the item they selected.  However, there doesn't
   appear to be any type of button that would lead a user to my
   DynamicWebResource.  Is there any way to have a button do a submit
   (update
   the model) and then lead the user to a resource?
  
   -Brandon
   --
   View this message in context:
   
 http://www.nabble.com/Opening-DynamicWebResource-from-Button-AjaxButton--tp15459841p15459841.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/Opening-DynamicWebResource-from-Button-AjaxButton--tp15459841p15600541.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]



What is the Wicket way to redirect?

2008-02-20 Thread MYoung

In my Checkout page if there is nothing to checkout, I want to bounce to the
ShowCatalog page with an error message.  I did it this way:

class Checkout extends WebPage {
public Checkout() {
if (thereIsNothingToCheckout()) {
error(You have nothing to checkout);
setResponsePage(ShowCatalog.class);
return;
}

// continue to checkout

}
}

Is this the right way?
-- 
View this message in context: 
http://www.nabble.com/What-is-the-Wicket-way-to-redirect--tp15600869p15600869.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: What is the Wicket way to redirect?

2008-02-20 Thread Igor Vaynberg
s/error/session.error/
s/setresponsepage/throw new restartresponseexception

-igor


On Wed, Feb 20, 2008 at 2:54 PM, MYoung [EMAIL PROTECTED] wrote:

  In my Checkout page if there is nothing to checkout, I want to bounce to the
  ShowCatalog page with an error message.  I did it this way:

  class Checkout extends WebPage {
 public Checkout() {
 if (thereIsNothingToCheckout()) {
 error(You have nothing to checkout);
 setResponsePage(ShowCatalog.class);
 return;
 }

 // continue to checkout

 }
  }

  Is this the right way?
  --
  View this message in context: 
 http://www.nabble.com/What-is-the-Wicket-way-to-redirect--tp15600869p15600869.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]



Problem while updating model within DojoDropDownChoice

2008-02-20 Thread Kai Mütz
Hello list,

I am new to wicket and playing around with the DojoDropDownChoice from
wicketstuff-dojo-1.3.0-beta. I want to use it similar to a normal
DropDownChoice component with ChoiceRenderer. But after selecting an entry
of the list and submiting the form the model is not updated correctly. The
corresponding ModelObject is set to null.

Has anybody experience in this issue? Can anybody help me? Is it possible to
use DojoDropDownChoice similar to a DropDownChoice within a form. Do I have
to use the DojoSubmitButton in this case? Which methods of
DojoDropDownChoice do I have to override exactly?


Example:

public final class MyModelChoiceRenderer implements IChoiceRenderer {

public Object getDisplayValue(final Object object) {
MyModel model = (MyModel) object;
return model.getValue();
}

public String getIdValue(final Object object, final int index) {
MyModel model = (MyModel) object;
return String.valueOf(model.getId());
}

}

public final class MyDropDownChoice extends DojoDropDownChoice {

public MyDropDownChoice(final String id, final IModel model,
final List ? extends MyModel data) {
super(id, model, data, new MyModelChoiceRenderer());
super.setHandleSelectionChange(true);
}

}

ListMyModel models = getModels();

form.add(new MyDropDownChoice(id, new PropertyModel(myObject, myModel),
models));
form.add(new MySubmitButton);



Where myObject is a field of type MyModel with corresponding getter/setter.
Any ideas?

Regards, Kai


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



Problem while updating model within DojoDropDownChoice

2008-02-20 Thread Kai Mütz
Hello list,

I am new to wicket and playing around with the DojoDropDownChoice from
wicketstuff-dojo-1.3.0-beta. I want to use it similar to a normal
DropDownChoice component with ChoiceRenderer. But after selecting an entry
of the list and submiting the form the model is not updated correctly. The
corresponding ModelObject is set to null.

Has anybody experience in this issue? Can anybody help me? Is it possible to
use DojoDropDownChoice similar to a DropDownChoice within a form. Do I have
to use the DojoSubmitButton in this case? Which methods of
DojoDropDownChoice do I have to override exactly?


Example:

public final class MyModelChoiceRenderer implements IChoiceRenderer {

public Object getDisplayValue(final Object object) {
MyModel model = (MyModel) object;
return model.getValue();
}

public String getIdValue(final Object object, final int index) {
MyModel model = (MyModel) object;
return String.valueOf(model.getId());
}

}

public final class MyDropDownChoice extends DojoDropDownChoice {

public MyDropDownChoice(final String id, final IModel model,
final List ? extends MyModel data) {
super(id, model, data, new MyModelChoiceRenderer());
super.setHandleSelectionChange(true);
}

}

ListMyModel models = getModels();

form.add(new MyDropDownChoice(id, new PropertyModel(myObject, myModel),
models));
form.add(new MySubmitButton);



Where myObject is a field of type MyModel with corresponding getter/setter.
Any ideas?

Regards, Kai


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



Re: Tabular form validation problem with checkboxes

2008-02-20 Thread Igor Vaynberg
On Tue, Feb 19, 2008 at 9:04 PM, Martin Makundi
[EMAIL PROTECTED] wrote:
  in your validate method why dont you iterate over the todo items
   instead of components. isnt that what the checkboxes are bound to?

  The idea is to validate the input before it gets updated into the todo
  items, yes? That is why I iterate the components... ofcourse I could
  validate it after the state has been updated (it wouldn't matter if I
  want to keep the invalid input on screen) but that seems more like a
  workaround than the proper solution.

a proper solution would be to use a validator or a formvalidator to do
this. generally you never iterate over components to do validation in
wicket. we have good plugin points for you in the form workflow.

   also you are using a LISTview, are todo items really identified
   uniquely by their index returned from todoList =
   TodoServices.browseWeek(currentWeekStartDate, user) ?

  The todo items are unique (try running the code ;)..

you didnt show the part of code that generates the list...

 it is just a  dummy list of new todo items.

they are unique but you are using a listview? so what you have is not
a list at all, it is a collection of random items. perhaps listview is
not what you want. if you keep regenerating items every request and
their equality is determined by instance equality then listview thinks
they go out of view on every request.

  Is there a bug with the checkbox?

doubt it

-igor





  **
  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]



Re: Adding onClick event to form fields

2008-02-20 Thread Igor Vaynberg
input type=textfield doesnt have an onclick event afaik...

-igor


On Tue, Feb 19, 2008 at 6:28 PM, givp [EMAIL PROTECTED] wrote:

  Hi,

  Sorry for the newbie query. I currently have a form text field and I want to
  also be able to click on the field and do other stuff. I'm doing this right
  now but it's obviously not working. Can anyone point me to the right
  direction?

  //

  Form statusForm = new Form(statusForm);

  statusText = new TextField(statusText, new Model());

  // make clicking on the text field do something
  statusText.add(new AjaxLink(this.getId()) {

   public void onClick(AjaxRequestTarget ajaxRequestTarget) {
  // do something here!
   }
  });

  statusForm.add(statusText);

  add(statusForm);

  //

  Thanks
  G
  --
  View this message in context: 
 http://www.nabble.com/Adding-onClick-event-to-form-fields-tp15580983p15580983.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: Adding onClick event to form fields

2008-02-20 Thread Nick Heudecker
I think just onfocus, onblur and possibly onchange.

On Wed, Feb 20, 2008 at 5:14 PM, Igor Vaynberg [EMAIL PROTECTED]
wrote:

 input type=textfield doesnt have an onclick event afaik...

 -igor


 On Tue, Feb 19, 2008 at 6:28 PM, givp [EMAIL PROTECTED] wrote:
 
   Hi,
 
   Sorry for the newbie query. I currently have a form text field and I
 want to
   also be able to click on the field and do other stuff. I'm doing this
 right
   now but it's obviously not working. Can anyone point me to the right
   direction?
 
 
  //
 
   Form statusForm = new Form(statusForm);
 
   statusText = new TextField(statusText, new Model());
 
   // make clicking on the text field do something
   statusText.add(new AjaxLink(this.getId()) {
 
public void onClick(AjaxRequestTarget ajaxRequestTarget) {
   // do something here!
}
   });
 
   statusForm.add(statusText);
 
   add(statusForm);
 
   //
 
   Thanks
   G
   --
   View this message in context:
 http://www.nabble.com/Adding-onClick-event-to-form-fields-tp15580983p15580983.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]




-- 
Nick Heudecker
Professional Wicket Training  Consulting
http://www.systemmobile.com

Eventful - Intelligent Event Management
http://www.eventfulhq.com


Re: Tabular form validation problem with checkboxes

2008-02-20 Thread Martin Makundi
 a proper solution would be to use a validator or a formvalidator to do
  this. generally you never iterate over components to do validation in
  wicket. we have good plugin points for you in the form workflow.

Judging from the performance of the checkbox, I have a wrong plugin
point for the validator. How would you put it?

 you didnt show the part of code that generates the list...
   it is just a  dummy list of new todo items.
 they are unique but you are using a listview? so what you have is not
  a list at all, it is a collection of random items.
 perhaps listview is not what you want. if you keep regenerating items every 
 request

They are not random. Here is the code generating the items:
ListTodo linkedTodos = new LinkedListTodo();
{
  Todo todo = new Todo();
  todo.setDescription(Dummy);
  todo.setSelected(true);
  todo.setTodoDate(Convert.toDate(1.1.2008);
  linkedTodos.add(todo);
}
// ... and I have repeated a number of these ... say 7 pcs
return linkedTodos;

The page uses a linkedTodos singleton in the sence that the list is
generated only the first time the page is loaded. So they are not
random.

Is there a bug with the checkbox?
 doubt it

Well.. the validator fails to receive the submitted checkbox state.
Did I attach the validator improperly? Or should I read the checkbox
value in some other way? The checkbox state submitted from the browser
is not received by the validator using the code I posted before. The
textfields function properly, but the checkboxes seem to somehow be
disconnected... they sometimes change state according to the selection
in the browser window, sometimes not. Mostly not ;) Odd times? Very
strange.

**
Martin

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



Re: Tabular form validation problem with checkboxes

2008-02-20 Thread Igor Vaynberg
this line: textRequired = (Boolean) checkBox.getModelObject(); should not work

you are inside a validator, that means models haven not been updated
yet. models are only updated once all type conversion/validation
succeeds.

inside validators you should use formcomponent.getconvertedinput() to
read the value that will be put into the model if validators succeed.

-igor


On Wed, Feb 20, 2008 at 3:30 PM, Martin Makundi
[EMAIL PROTECTED] wrote:
  a proper solution would be to use a validator or a formvalidator to do
this. generally you never iterate over components to do validation in
wicket. we have good plugin points for you in the form workflow.

  Judging from the performance of the checkbox, I have a wrong plugin
  point for the validator. How would you put it?


   you didnt show the part of code that generates the list...
 it is just a  dummy list of new todo items.
   they are unique but you are using a listview? so what you have is not
a list at all, it is a collection of random items.
   perhaps listview is not what you want. if you keep regenerating items 
 every request

  They are not random. Here is the code generating the items:
  ListTodo linkedTodos = new LinkedListTodo();
  {
   Todo todo = new Todo();
   todo.setDescription(Dummy);
   todo.setSelected(true);
   todo.setTodoDate(Convert.toDate(1.1.2008);
   linkedTodos.add(todo);
  }
  // ... and I have repeated a number of these ... say 7 pcs
  return linkedTodos;

  The page uses a linkedTodos singleton in the sence that the list is
  generated only the first time the page is loaded. So they are not
  random.


  Is there a bug with the checkbox?
   doubt it

  Well.. the validator fails to receive the submitted checkbox state.
  Did I attach the validator improperly? Or should I read the checkbox
  value in some other way? The checkbox state submitted from the browser
  is not received by the validator using the code I posted before. The
  textfields function properly, but the checkboxes seem to somehow be
  disconnected... they sometimes change state according to the selection
  in the browser window, sometimes not. Mostly not ;) Odd times? Very
  strange.



  **
  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]



Need to redirect to the current page upon a page expire - how??

2008-02-20 Thread Chris Lintz

Hi,
So i have searched the forums regarding overriding
RequestCycle#onRuntimeException(Page page,RuntimeException e) .  It seems we
are completely stuck because there is no way to determine what page threw a
PageExpiredException .  

What I want to do is this:

When my SearchPage expires, and the user again clicks a button search, they
are immediately returned to the SearchPage potentially with any request
parameters the user searched on. It seems the only way to get a custom Page
when an PageExpiredException is thrown is to override onRuntimeException and
return the custom page.  Unfortunately the page is null when passed into
onRuntimeException (which makes sense because there is no longer a valid
session).

How can i accomplish this within the framework?  I hope we can avoid a hack
like setting a cookie that represents the current page upon every page
request. (atleast it seems to me there should be a framework solution for
this).

thanks for any ideas


chris


-- 
View this message in context: 
http://www.nabble.com/Need-to-redirect-to-the-current-page-upon-a-page-expire---how---tp15602103p15602103.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: Adding onClick event to form fields

2008-02-20 Thread Christian Alejandro Marquez Grabia
Yes...and the right way to do it is not using ajaxlink, but using
AjaxFormComponentUpdatingBehaviour(onclick)

I tried this on FF, and the mouse events are accepted in text
fields...according to the page, accepted in all tags except: base, bdo, br,
frame, frameset, head, html, iframe, meta, param, script, style, title

You should check the page
http://www.w3schools.com/html/tryit.asp?filename=tryhtml_input and try
things on the go

Rgds,
Christian

On 2/20/08, Nick Heudecker [EMAIL PROTECTED] wrote:

 I think just onfocus, onblur and possibly onchange.

 On Wed, Feb 20, 2008 at 5:14 PM, Igor Vaynberg [EMAIL PROTECTED]
 wrote:


  input type=textfield doesnt have an onclick event afaik...
 
  -igor
 
 
  On Tue, Feb 19, 2008 at 6:28 PM, givp [EMAIL PROTECTED] wrote:
  
Hi,
  
Sorry for the newbie query. I currently have a form text field and I
  want to
also be able to click on the field and do other stuff. I'm doing this
  right
now but it's obviously not working. Can anyone point me to the right
direction?
  
  

   //
  
Form statusForm = new Form(statusForm);
  
statusText = new TextField(statusText, new Model());
  
// make clicking on the text field do something
statusText.add(new AjaxLink(this.getId()) {
  
 public void onClick(AjaxRequestTarget ajaxRequestTarget) {
// do something here!
 }
});
  
statusForm.add(statusText);
  
add(statusForm);
  
//
  
Thanks
G
--
View this message in context:
 
 http://www.nabble.com/Adding-onClick-event-to-form-fields-tp15580983p15580983.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]
 
 



 --
 Nick Heudecker
 Professional Wicket Training  Consulting
 http://www.systemmobile.com

 Eventful - Intelligent Event Management
 http://www.eventfulhq.com



Re: Tabular form validation problem with checkboxes

2008-02-20 Thread Martin Makundi
  inside validators you should use formcomponent.getconvertedinput() to
  read the value that will be put into the model if validators succeed.

Thousand tnx, this solved the remaining problem.

**
Martin

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



Re: Settings focus to window opened by javascript appended to AjaxLink

2008-02-20 Thread jeredm

I am having a similar problem in IE, but it does not happen in Firefox.  I am
popping up a modal dialog and want to set focus on the first text box in the
modal when it is opened (id=focusMe).  Here is some code that has been
trimmed for simplicity:

HTML:
input id=focusMe type=text onfocus=alert('I have focus');
onblur=alert('I lost focus'); /

JAVA: 
public void onClick(AjaxRequestTarget target){
modal.setContent(newPanel);
modal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback(){
public void onClose(AjaxRequestTarget target){  


}
}); 

modal.show(target);
target.appendJavascript(document.getElementById('focusMe').focus());
}


I added an alert to the text box that tells me when it has focus and when it
is lost.  I found that I see the focus message, but I do not see the cursor
bar in the text box and nothing shows when I type.  Additionally, I do not
see the blur message.  When I click in the text box after closing the focus
alert there is no new alert.  This would indicate that IE thinks that the
text box still has focus.  When I click out of the text box and then back
into it the alerts and cursor both work as expected.  I ran this test in IE6
and IE7 with the same results.

Note that you will want to remove the onblur event for testing in Firefox as
the alert itself will cause the text box to lose focus.
-- 
View this message in context: 
http://www.nabble.com/Settings-focus-to-window-opened-by-javascript-appended-to-AjaxLink-tp15336895p15602292.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: Settings focus to window opened by javascript appended to AjaxLink

2008-02-20 Thread Christian Alejandro Marquez Grabia
You should try without the alertit removes the focus when you click the
'Ok' button. Instead you should try something like: onfocus= this.value =
'focused';

Another method that can be used is select() instead of focus()

Rgds,
Christian

On 2/20/08, jeredm [EMAIL PROTECTED] wrote:


 I am having a similar problem in IE, but it does not happen in Firefox.  I
 am
 popping up a modal dialog and want to set focus on the first text box in
 the
 modal when it is opened (id=focusMe).  Here is some code that has been
 trimmed for simplicity:

 HTML:
 input id=focusMe type=text onfocus=alert('I have focus');
 onblur=alert('I lost focus'); /

 JAVA:

 public void onClick(AjaxRequestTarget target){

 modal.setContent(newPanel);
 modal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback(){
 public void onClose(AjaxRequestTarget target){

 }
 });

 modal.show(target);
 target.appendJavascript(document.getElementById('focusMe').focus());
 }


 I added an alert to the text box that tells me when it has focus and when
 it
 is lost.  I found that I see the focus message, but I do not see the
 cursor
 bar in the text box and nothing shows when I type.  Additionally, I do not
 see the blur message.  When I click in the text box after closing the
 focus
 alert there is no new alert.  This would indicate that IE thinks that the
 text box still has focus.  When I click out of the text box and then back
 into it the alerts and cursor both work as expected.  I ran this test in
 IE6
 and IE7 with the same results.

 Note that you will want to remove the onblur event for testing in Firefox
 as
 the alert itself will cause the text box to lose focus.

 --
 View this message in context:
 http://www.nabble.com/Settings-focus-to-window-opened-by-javascript-appended-to-AjaxLink-tp15336895p15602292.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]




Wicket DTD?

2008-02-20 Thread MYoung

I use the Amateras Eclipse HTML editor, it raises warnings on wicket element.

It can register DTD (Window  Preferences  Amateras  DTD /
XMLSchema).  Where is the Wicket DTD?  Better yet, anyone exactly how to
configure Amateras to know the Wicket namespace?
-- 
View this message in context: 
http://www.nabble.com/Wicket-DTD--tp15605079p15605079.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: self refreshing table with effects

2008-02-20 Thread okrohne

Hi,

for the moment I have a workaround as I do not mount the page, but
for production this would be mandatory.
Is there a chance that this issue will be fixed soon?

Another question regarding the AjaxSelfUpdatingTimerBehavior:
Is is possible to stop the update timer lets say by a mouse over event 
of the table and start again on mouse out? 
If I am in the use case to select a row with the mouse I don't want that
the table is refreshed.

Thanks again,
Oliver


Johan Compagner wrote:
 
 Please make a jira issue for this with an example
 
 On 2/20/08, okrohne [EMAIL PROTECTED] wrote:

 Hi,

 I tried QueryStringUrlCodingStrategy and MixedParamUrlCodingStrategy and
 both are throwing
 exceptions. I looked at the example in chapter 15.2 , I don't get the
 point
 of:

 ((WebApplication)getApplication()).unmount(cheeses);
 ((WebApplication)getApplication()).mountBookmarkablePage(cheeses,
 CheeseDetailsPage.class);
 ((WebApplication)getApplication()).unmount(cheeses);
 ((WebApplication)getApplication()).mount(new
 QueryStringUrlCodingStrategy(cheeses, CheeseDetailsPage.class));
 ((WebApplication)getApplication()).unmount(cheeses);
 ((WebApplication)getApplication()).mount(new
 MixedParamUrlCodingStrategy(cheeses, CheeseDetailsPage.class, new
 String[]{}));

 why mount and unmount?

 The exceptions are thrown after the first on timer event.


 QueryStringUrlCodingStrategy gives:

 Root cause:

 java.lang.NullPointerException
 at
 org.apache.wicket.request.target.component.BookmarkableListenerInterfaceRequestTarget.processEvents(BookmarkableListenerInterfaceRequestTarget.java:131)
 at
 org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:90)
 at
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1166)
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1241)
 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316)
 at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
 at
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354)
 at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
 at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
 at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
 at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
 at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
 at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
 at
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
 at
 org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
 at java.lang.Thread.run(Thread.java:613)


 MixedParamUrlCodingStrategy gives
 Root cause:

 java.lang.ClassCastException: [Ljava.lang.String;
 at
 org.apache.wicket.request.target.coding.MixedParamUrlCodingStrategy.appendParameters(MixedParamUrlCodingStrategy.java:153)
 at
 org.apache.wicket.request.target.coding.BookmarkablePageRequestTargetUrlCodingStrategy.encode(BookmarkablePageRequestTargetUrlCodingStrategy.java:135)
 at
 org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.pathForTarget(WebRequestCodingStrategy.java:459)
 at
 org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.encode(WebRequestCodingStrategy.java:236)
 at
 org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:224)
 at
 org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:103)
 at
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1172)
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1241)
 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316)
 at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
 at
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354)
 at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
 at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
 at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
 at
 

textarea problem

2008-02-20 Thread okrohne

Hi,

if I use a textarea like this:

textarea name=test id=test_textarea rows=8 cols=30
class=input_text title=test /

all subsequent html markup is shown in the textarea.

If I use the textarea in this way everything is okay.
 
textarea name=test id=test_textarea rows=8 cols=30
class=input_text title=test
/textarea

Is this a known issue?

Thanks,
Oliver


-- 
View this message in context: 
http://www.nabble.com/textarea-problem-tp15606212p15606212.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: Need to redirect to the current page upon a page expire - how??

2008-02-20 Thread Maurice Marrink
how about using a stateless searchpage?
that way you should not get a page expired.

Maurice

On Thu, Feb 21, 2008 at 1:14 AM, Chris Lintz
[EMAIL PROTECTED] wrote:

  Hi,
  So i have searched the forums regarding overriding
  RequestCycle#onRuntimeException(Page page,RuntimeException e) .  It seems we
  are completely stuck because there is no way to determine what page threw a
  PageExpiredException .

  What I want to do is this:

  When my SearchPage expires, and the user again clicks a button search, they
  are immediately returned to the SearchPage potentially with any request
  parameters the user searched on. It seems the only way to get a custom Page
  when an PageExpiredException is thrown is to override onRuntimeException and
  return the custom page.  Unfortunately the page is null when passed into
  onRuntimeException (which makes sense because there is no longer a valid
  session).

  How can i accomplish this within the framework?  I hope we can avoid a hack
  like setting a cookie that represents the current page upon every page
  request. (atleast it seems to me there should be a framework solution for
  this).

  thanks for any ideas


  chris


  --
  View this message in context: 
 http://www.nabble.com/Need-to-redirect-to-the-current-page-upon-a-page-expire---how---tp15602103p15602103.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]