Re: Date/Time Validation in Forms

2009-08-19 Thread Eyal Golan
Have a look at DateTimeField from YUI.
In any case, you can always create a FormValidator so it can validate
several components.
BTW,
you should really change the fields to be Integer and not String.


Eyal Golan
egola...@gmail.com

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74

P  Save a tree. Please don't print this e-mail unless it's really necessary


On Wed, Aug 19, 2009 at 5:49 AM, Arun Gupta arun.gu...@gmail.com wrote:

 I have a form model defined as:

 -- cut here --
 public class RunlogFormModel implements Serializable {
private String month;
private String day;
private String year;
private String distance;
private String hour;
private String minute;
private String second;
private String comments;
 -- cut here --

 The form provides drop-down list boxes for each of the model elements
 and added to the form like:

 add(new DropDownChoice(. new PropertyModel(...).add(new
 IValidatorString() { })));

 The validator can validate each individual field. How do I perform
 compositve date validation, such as month/day/year = current_date ?

 Similarly how to perform validation of hour/minute/seconds  0 ?

 How do I validate presence of date/time ?

 Is this a good representation of model or should it be represented
 differently ?

 Thanks,
 -Arun

 --
 Need Application Server ? - Download glassfish.org
 Blog: http://blogs.sun.com/arungupta

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




Re: Internal error parsing wicket:interface = :6

2009-08-19 Thread Thomas Singer
Thanks, Alex. So you are sure this is no problem of our web application, but
rather users who change such URLs manually or have bookmarked non-static ones?

Tom


Alex Objelean wrote:
 In wicket 1.3.x you would get just WicketRuntimeException... by default you
 will be redirected to default InternalErrorPage.. InvalidUrlException was
 introduced in wicket-1.4.0 in order to handle situation when user tweaks the
 url making it unusable... you can treat this exception somehow different by
 redirecting to some page or displaying an error message.
 
 Alex Objelean
 
 
 Thomas Singer-4 wrote:
 Recently, we upgraded to Wicket 1.4.0 and now I can find following
 exceptions in the Tomcat log:

 09/08/18 18:59:15 ERROR wicket.RequestCycle:
 org.apache.wicket.WicketRuntimeException: Internal error parsing
 wicket:interface = :6
 org.apache.wicket.protocol.http.request.InvalidUrlException:
 org.apache.wicket.WicketRuntimeException: Internal error parsing
 wicket:interface = :6
 at
 org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.decode(WebRequestCodingStrategy.java:231)
 at org.apache.wicket.Request.getRequestParameters(Request.java:172)
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1301)
 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1419)
 at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
 at
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456)
 at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:289)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
 at
 com.syntevo.hpsmart.SmCanonicalizeUrlFilter.doFilter(SmCanonicalizeUrlFilter.java:99)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
 at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
 at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
 at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
 at
 org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:542)
 at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
 at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
 at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
 at
 org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
 at
 org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
 at
 org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
 at
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
 at java.lang.Thread.run(Thread.java:619)
 Caused by: org.apache.wicket.WicketRuntimeException: Internal error
 parsing wicket:interface = :6
 at
 org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.addInterfaceParameters(WebRequestCodingStrategy.java:613)
 at
 org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.addInterfaceParameters(WebRequestCodingStrategy.java:584)
 at
 org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.decode(WebRequestCodingStrategy.java:206)
 ... 24 more
 Is this a known problem?

 Thanks in advance,
 Tom

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



 

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



RE: Newbie question: fileupload AJAX progressbar ?

2009-08-19 Thread Stefan Lindner
You need

@Override
protected WebRequest newWebRequest(HttpServletRequest servletRequest) {
return new UploadWebRequest(servletRequest);
}

In your Application's class. I think you should definitly read the APIdoc (see 
UploadProgressBar)!

Stefan

-Ursprüngliche Nachricht-
Von: Ashika Umanga Umagiliya [mailto:auma...@biggjapan.com] 
Gesendet: Mittwoch, 19. August 2009 07:17
An: users@wicket.apache.org
Betreff: Newbie question: fileupload AJAX progressbar ?

Greetings all,

 I am new to Wicket and I used 'UploadProgressBar' to create an AJAX 
brogressbar for fileupload.(refered example at wicket-library.org )
But when uploading a file, eventhough progreebar showed,theres no 
activity nor incrementation of the bar
I have posted my code, what could be the problem?

Thanks in advance.




public class UploadPage extends WebPage {
   
///fileupload form
private class FileUploadForm extends FormVoid{

private FileUploadField fileuploadField;
public FileUploadForm(String name){
super(name);
setMultiPart(true);
add(fileuploadField=new FileUploadField(fileInput));
setMaxSize(Bytes.gigabytes(4));
   
}
@Override
protected void onSubmit() {
 final FileUpload upload = fileuploadField.getFileUpload();
if (upload != null)
{
 
File newFile = new File(getUploadFolder(), 
upload.getClientFileName());
   
try
{
 newFile.createNewFile();
upload.writeTo(newFile);

UploadPage.this.info(saved file:  + 
upload.getClientFileName());
}
catch (Exception e)
{
throw new IllegalStateException(Unable to write 
file);
}
}
}
   
}
  
   
public UploadPage(final PageParameters parameters) {  
final FeedbackPanel uploadFfeedback=new 
FeedbackPanel(uploadFeedback);
add(uploadFfeedback);
   
final FileUploadForm fileUploadForm=new 
FileUploadForm(ajaxupload);
fileUploadForm.add(new UploadProgressBar(progress, 
fileUploadForm));
add(fileUploadForm);
}
   
   
private Folder getUploadFolder(){
return 
((SVRWebApplication)Application.get()).getUploadFolder();   
}
   

}


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


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



RE: Newbie question: fileupload AJAX progressbar ?

2009-08-19 Thread Jing Ge (Besitec IT DEHAM)
Hi,

Add this in your application class SVRWebApplication:

@Override
protected WebRequest newWebRequest(HttpServletRequest servletRequest) {
 return new UploadWebRequest(servletRequest);
}

Best regards!
Jing
-Original Message-
From: Ashika Umanga Umagiliya [mailto:auma...@biggjapan.com] 
Sent: Mittwoch, 19. August 2009 07:17
To: users@wicket.apache.org
Subject: Newbie question: fileupload AJAX progressbar ?

Greetings all,

 I am new to Wicket and I used 'UploadProgressBar' to create an AJAX 
brogressbar for fileupload.(refered example at wicket-library.org )
But when uploading a file, eventhough progreebar showed,theres no 
activity nor incrementation of the bar
I have posted my code, what could be the problem?

Thanks in advance.




public class UploadPage extends WebPage {
   
///fileupload form
private class FileUploadForm extends FormVoid{

private FileUploadField fileuploadField;
public FileUploadForm(String name){
super(name);
setMultiPart(true);
add(fileuploadField=new FileUploadField(fileInput));
setMaxSize(Bytes.gigabytes(4));
   
}
@Override
protected void onSubmit() {
 final FileUpload upload = fileuploadField.getFileUpload();
if (upload != null)
{
 
File newFile = new File(getUploadFolder(), 
upload.getClientFileName());
   
try
{
 newFile.createNewFile();
upload.writeTo(newFile);

UploadPage.this.info(saved file:  + 
upload.getClientFileName());
}
catch (Exception e)
{
throw new IllegalStateException(Unable to write

file);
}
}
}
   
}
  
   
public UploadPage(final PageParameters parameters) {  
final FeedbackPanel uploadFfeedback=new 
FeedbackPanel(uploadFeedback);
add(uploadFfeedback);
   
final FileUploadForm fileUploadForm=new 
FileUploadForm(ajaxupload);
fileUploadForm.add(new UploadProgressBar(progress, 
fileUploadForm));
add(fileUploadForm);
}
   
   
private Folder getUploadFolder(){
return 
((SVRWebApplication)Application.get()).getUploadFolder();   
}
   

}


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




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



Re: Internal error parsing wicket:interface = :6

2009-08-19 Thread Alex Objelean

If they would bookmark these url, they would get SessionExpired page... I'm
pretty sure they have tried to hack the url.

Alex Objelean


Thomas Singer-4 wrote:
 
 Thanks, Alex. So you are sure this is no problem of our web application,
 but
 rather users who change such URLs manually or have bookmarked non-static
 ones?
 
 Tom
 
 
 Alex Objelean wrote:
 In wicket 1.3.x you would get just WicketRuntimeException... by default
 you
 will be redirected to default InternalErrorPage.. InvalidUrlException was
 introduced in wicket-1.4.0 in order to handle situation when user tweaks
 the
 url making it unusable... you can treat this exception somehow different
 by
 redirecting to some page or displaying an error message.
 
 Alex Objelean
 
 
 Thomas Singer-4 wrote:
 Recently, we upgraded to Wicket 1.4.0 and now I can find following
 exceptions in the Tomcat log:

 09/08/18 18:59:15 ERROR wicket.RequestCycle:
 org.apache.wicket.WicketRuntimeException: Internal error parsing
 wicket:interface = :6
 org.apache.wicket.protocol.http.request.InvalidUrlException:
 org.apache.wicket.WicketRuntimeException: Internal error parsing
 wicket:interface = :6
at
 org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.decode(WebRequestCodingStrategy.java:231)
at org.apache.wicket.Request.getRequestParameters(Request.java:172)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1301)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1419)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
at
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456)
at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:289)
at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
 com.syntevo.hpsmart.SmCanonicalizeUrlFilter.doFilter(SmCanonicalizeUrlFilter.java:99)
at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at
 org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:542)
at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
at
 org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at
 org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at
 org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
at java.lang.Thread.run(Thread.java:619)
 Caused by: org.apache.wicket.WicketRuntimeException: Internal error
 parsing wicket:interface = :6
at
 org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.addInterfaceParameters(WebRequestCodingStrategy.java:613)
at
 org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.addInterfaceParameters(WebRequestCodingStrategy.java:584)
at
 org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.decode(WebRequestCodingStrategy.java:206)
... 24 more
 Is this a known problem?

 Thanks in advance,
 Tom

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



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

-- 
View this message in context: 
http://www.nabble.com/Internal-error-parsing-wicket%3Ainterface-%3D-%3A6-tp25031846p25038637.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Newbie question: fileupload AJAX progressbar ?

2009-08-19 Thread Ashika Umanga Umagiliya

Thanks Stefan,

That solved my problem.
Since UploadProgreeBar is a component of 'wicket-extensions', i refered 
documentation at http://www.wicketframework.org/wicket-extensions/ which 
is kind of updated (versoin 1.2) . I had to download documentation for 
1.4 from the maven repository.


Thanks again.

Stefan Lindner wrote:

You need

@Override
protected WebRequest newWebRequest(HttpServletRequest servletRequest) {
return new UploadWebRequest(servletRequest);
}

In your Application's class. I think you should definitly read the APIdoc (see 
UploadProgressBar)!

Stefan

-Ursprüngliche Nachricht-
Von: Ashika Umanga Umagiliya [mailto:auma...@biggjapan.com] 
Gesendet: Mittwoch, 19. August 2009 07:17

An: users@wicket.apache.org
Betreff: Newbie question: fileupload AJAX progressbar ?

Greetings all,

 I am new to Wicket and I used 'UploadProgressBar' to create an AJAX 
brogressbar for fileupload.(refered example at wicket-library.org )
But when uploading a file, eventhough progreebar showed,theres no 
activity nor incrementation of the bar

I have posted my code, what could be the problem?

Thanks in advance.




public class UploadPage extends WebPage {
   
///fileupload form

private class FileUploadForm extends FormVoid{

private FileUploadField fileuploadField;
public FileUploadForm(String name){
super(name);
setMultiPart(true);
add(fileuploadField=new FileUploadField(fileInput));
setMaxSize(Bytes.gigabytes(4));
   
}

@Override
protected void onSubmit() {
 final FileUpload upload = fileuploadField.getFileUpload();
if (upload != null)
{
 
File newFile = new File(getUploadFolder(), 
upload.getClientFileName());
   
try

{
 newFile.createNewFile();
upload.writeTo(newFile);

UploadPage.this.info(saved file:  + 
upload.getClientFileName());

}
catch (Exception e)
{
throw new IllegalStateException(Unable to write 
file);

}
}
}
   
}
  
   
public UploadPage(final PageParameters parameters) {  
final FeedbackPanel uploadFfeedback=new 
FeedbackPanel(uploadFeedback);

add(uploadFfeedback);
   
final FileUploadForm fileUploadForm=new 
FileUploadForm(ajaxupload);
fileUploadForm.add(new UploadProgressBar(progress, 
fileUploadForm));

add(fileUploadForm);
}
   
   
private Folder getUploadFolder(){
return 
((SVRWebApplication)Application.get()).getUploadFolder();   
}
   


}


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


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

  



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



RE: Newbie question: fileupload AJAX progressbar ?

2009-08-19 Thread Stefan Lindner
Hi Ashika,

I pointed yopu tot he documentation because I was not sure if using 
UploadWebRequest has any side effects. Does not seem so.

Stefan

-Ursprüngliche Nachricht-
Von: Ashika Umanga Umagiliya [mailto:auma...@biggjapan.com] 
Gesendet: Mittwoch, 19. August 2009 09:10
An: users@wicket.apache.org
Betreff: Re: Newbie question: fileupload AJAX progressbar ?

Thanks Stefan,

That solved my problem.
Since UploadProgreeBar is a component of 'wicket-extensions', i refered 
documentation at http://www.wicketframework.org/wicket-extensions/ which 
is kind of updated (versoin 1.2) . I had to download documentation for 
1.4 from the maven repository.

Thanks again.

Stefan Lindner wrote:
 You need

   @Override
   protected WebRequest newWebRequest(HttpServletRequest servletRequest) {
   return new UploadWebRequest(servletRequest);
   }

 In your Application's class. I think you should definitly read the APIdoc 
 (see UploadProgressBar)!

 Stefan

 -Ursprüngliche Nachricht-
 Von: Ashika Umanga Umagiliya [mailto:auma...@biggjapan.com] 
 Gesendet: Mittwoch, 19. August 2009 07:17
 An: users@wicket.apache.org
 Betreff: Newbie question: fileupload AJAX progressbar ?

 Greetings all,

  I am new to Wicket and I used 'UploadProgressBar' to create an AJAX 
 brogressbar for fileupload.(refered example at wicket-library.org )
 But when uploading a file, eventhough progreebar showed,theres no 
 activity nor incrementation of the bar
 I have posted my code, what could be the problem?

 Thanks in advance.




 public class UploadPage extends WebPage {

 ///fileupload form
 private class FileUploadForm extends FormVoid{

 private FileUploadField fileuploadField;
 public FileUploadForm(String name){
 super(name);
 setMultiPart(true);
 add(fileuploadField=new FileUploadField(fileInput));
 setMaxSize(Bytes.gigabytes(4));

 }
 @Override
 protected void onSubmit() {
  final FileUpload upload = fileuploadField.getFileUpload();
 if (upload != null)
 {
  
 File newFile = new File(getUploadFolder(), 
 upload.getClientFileName());

 try
 {
  newFile.createNewFile();
 upload.writeTo(newFile);

 UploadPage.this.info(saved file:  + 
 upload.getClientFileName());
 }
 catch (Exception e)
 {
 throw new IllegalStateException(Unable to write 
 file);
 }
 }
 }

 }
   

 public UploadPage(final PageParameters parameters) {  
 final FeedbackPanel uploadFfeedback=new 
 FeedbackPanel(uploadFeedback);
 add(uploadFfeedback);

 final FileUploadForm fileUploadForm=new 
 FileUploadForm(ajaxupload);
 fileUploadForm.add(new UploadProgressBar(progress, 
 fileUploadForm));
 add(fileUploadForm);
 }


 private Folder getUploadFolder(){
 return 
 ((SVRWebApplication)Application.get()).getUploadFolder();   
 }


 }


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


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

   


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


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



Re: Ajax form submits in a Wicket portlet on Liferay

2009-08-19 Thread glr

Having investigated the issue further, I noticed that the same code is
working in some portlets and does not work in others. Therefore I created 2
portlets with exactly the same content except for the plugin name and the
portlet-name:

* in the first case the plugin name is wexample-portlet and the portlet-name
is wexample

* in the other case the plugin name is server-utest-portlet and the
portlet-name is utest

In both portlets I created 3 test-cases:

1) echoing the entered text without AJAX.

2) echoing the entered text with AJAX.

3) echoing the entered text with AJAX but the relevant page content (e.g.
form) is moved to a Panel.

Results:

1) is working in both portlets

2) is working in wexample-portlet but not in server-utest-portlet

3) is working in wexample-portlet but not in server-utest-portlet.

I have a feeling that the problem lies in the order NamespaceServletRequest
resolves request parameters. If the resolving happens in an order that the
POST'ed input comes first and then the parameter from the buttons callback
URL then it does not work.

I have attached the 2 portlets. Source code is also included in the WAR's:
http://www.nabble.com/file/p25039181/wexample-portlet-5.2.2.1.war
wexample-portlet-5.2.2.1.war 
http://www.nabble.com/file/p25039181/server-utest-portlet-5.2.2.1.war
server-utest-portlet-5.2.2.1.war 
-- 
View this message in context: 
http://www.nabble.com/Ajax-form-submits-in-a-Wicket-portlet-on-Liferay-tp25024896p25039181.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Question about threads inside wicket pages

2009-08-19 Thread Ashika Umanga Umagiliya

Greetings all,

Please refer to image at :
http://i26.tinypic.com/11qi6o7.jpg

I am going to invoke a webservice using Axis2 Client,asynchronically.To 
getback the results, I am using a Callback handler in axis2.


Within my page, I am going to create the Callback object 
(axisCallbackHandler in picture) and call the axis2client which will 
create a seperate thread for async access.
My concern is that what would happen if the user close the browser while 
still axis2client-thread consuming the service?does the wicket-thread 
get destroyed?
If thats the case,I want to send the results in an email ,if not display 
the results in the wicket page.


Thanks in advance


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



Re: Session listener

2009-08-19 Thread Jonas
I think overriding WebApplication#sessionDestroyed should do the trick.

On Wed, Aug 19, 2009 at 12:26 PM, David Leangenwic...@leangen.net wrote:

 Hi!

 What's the best way to get notified of a session timeout event from within a
 Wicket App when I don't have access to the deployment descriptor?

 All I need is the ID of the session that expired.


 Thanks!
 =David



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



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



SubmitLink in List/DataView in Form not working?

2009-08-19 Thread Martijn Lindhout
Hi All,

I almost finished 2 Wicket sites succesfully without any problems, and
now I'm busy with a  third one... but I'm lost... and can't find a
solution in the list so far...

I have a  submitlink in a listview, together with several input fields
(zie HTML below). In code I have:

item.add(new SubmitLink(linkUp){
 public void onSubmit() { ...}
});

And the link doesn't submit

What do I forget?

HTML:

form wicket:id=form

table
tr wicket:id=rows
   tdinput type=radio wicket:id=grade1 //td
   tda href= wicket:id=linkUpup/a/td
/tr
/table


/form

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



Re: Full integration Wicket - Blazeds. Is it possible?

2009-08-19 Thread Ryan Gravener
Make your own filter and implement these methods this way:
http://pastie.org/588344

Ryan Gravener
http://bit.ly/no_word_docs



On Mon, May 4, 2009 at 1:01 PM, Fernando
Wermusfernando.wer...@gmail.com wrote:
 Hi all,
     I am working with flex and wicket and I would like to get a full
 integration. What I mean is that a wicket's model page will be updated in
 case someone uses a flex component that called a blazeds service. I run
 succesfuly http://ryangravener.com/wordpress/?p=21, which I would like to
 improve.

 My problem is how to get wicket session, for getting the model's page which
 I would like to update.

 Some ideas that come up to my mind are:

 a. using cookie JSESSIONID to get wicket session.
 b. getting HttpSession through FlexContext to get Wicket Session after:
        HttpSession session = FlexContext.getHttpRequest().getSession(true);

 Is this possible? This is the web.xml file config according ryangravener:

  !-- WICKET FILTER --
    filter
        filter-namewicket.miApp/filter-name

 filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class
        init-param
              param-nameapplicationClassName/param-name
              param-valuecom.miApp.MiAppApplication/param-value
        /init-param
      /filter
    filter-mapping
        filter-namewicket.MiAppfilter-name
        url-pattern/*/url-pattern
      /filter-mapping

 !-- BLAZE  --
      servlet
        servlet-nameMessageBrokerServlet/servlet-name
        servlet-class
            flex.messaging.MessageBrokerServlet
        /servlet-class
        init-param
            param-nameservices.configuration.file/param-name
            param-value/WEB-INF/flex/services-config.xml/param-value
          /init-param
        init-param
            param-nameflex.write.path/param-name
            param-value/WEB-INF/flex/param-value
          /init-param
        load-on-startup1/load-on-startup
    /servlet

    servlet-mapping
        servlet-nameMessageBrokerServlet/servlet-name
        url-pattern/messagebroker/*/url-pattern
    /servlet-mapping

    filter-mapping
        filter-namewicket.myApp/filter-name
        url-pattern/messagebroker/*/url-pattern
    /filter-mapping


 --
 Fernando Wermus.

 www.linkedin.com/in/fernandowermus
 http://mientretiempo.blogspot.com/


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



Re: Ajax form submits in a Wicket portlet on Liferay

2009-08-19 Thread glr

I renamed the plugin from server-utest-portlet to serverUtest-portlet to
remove any other '-' characters. Still the issue is present.

By the way, is it a Wicket limitation that the Liferay portlet plugin names
should not contain '-' characters other than the one in the '-portlet'
postfix? I am asking this because a lot of Liferay sample portlets have many
'-' characters in their name (e.g. sample-icefaces-ipc-ajax-push-portlet).


Thijs wrote:
 
 The '-' is a reserved character in the name of a liferay portlet
 a portlets name should end with -portlet and not contain any other '-'
 

-- 
View this message in context: 
http://www.nabble.com/Ajax-form-submits-in-a-Wicket-portlet-on-Liferay-tp25024896p25042216.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



swf into wicket page

2009-08-19 Thread Gerald Fernando
Hello Friends,

Shall we have(embed) a swf in wicket component(Panel or in wicket page).
I have swf that shows chart for dynamic data.
i want to show my .swf file into wicket page or wicket panel
if possible please give me modal code.
I need urgent reply




-- 
Thanksregards,
Gerald A


Re: swf into wicket page

2009-08-19 Thread Martijn Lindhout
Here's how I did it:

Java
public class VideoPlayer extends Panel {

public VideoPlayer(String id, final Bedrijf bedrijf, final Video video) 
{
super(id);
add(new WebComponent(player){
@Override
protected void onComponentTagBody(MarkupStream 
markupStream,
ComponentTag openTag) {
String videoFile = /static/ + 
bedrijf.getProfiel().getId() +
/videos/ + video.getNaam();
StringBuilder script = new StringBuilder(
var s1 = new
SWFObject('/static/jobiq/player.swf','ply','328','200','9','#FF');
+

s1.addParam('allowfullscreen','true'); +

s1.addParam('allowscriptaccess','always'); +
s1.addParam('flashvars','file= + 
videoFile +
image=/static/player/preview.jpg'); +
s1.write('container');
);

replaceComponentTagBody(markupStream, openTag, 
script);
}
});
}

}


And the HTML
wicket:panel

div id=containera
href=http://www.macromedia.com/go/getflashplayer;Get the Flash
Player/a to see this player./div
script type=text/javascript 
src=/static/player/swfobject.js/script
script wicket:id=player type=text/javascript/script
/wicket:panel

2009/8/19 Gerald Fernando gerald.anto.ferna...@gmail.com:
 Hello Friends,

 Shall we have(embed) a swf in wicket component(Panel or in wicket page).
 I have swf that shows chart for dynamic data.
 i want to show my .swf file into wicket page or wicket panel
 if possible please give me modal code.
 I need urgent reply




 --
 Thanksregards,
 Gerald A


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



Modal window and SSL

2009-08-19 Thread Eyal Golan
Hello all,
We are having a problem when we work on an SSL environment.
Whenever we open a modal popup window, there's this annoying message of IE
that the user is trying to open both secure and non secure content.
We changed the IE settings and the message is gone.
But I want to understand what's causing it?

I googled a bit about it and found some tips on changing the
IREquestCycleProcessor:
http://cwiki.apache.org/WICKET/how-to-switch-to-ssl-mode.html
It this what we should do?

BTW,
does anyone know how to run the embedded Jetty with SSL?

Thanks

Eyal Golan
egola...@gmail.com

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74

P  Save a tree. Please don't print this e-mail unless it's really necessary


How to get Project Folder's Relative Path ?

2009-08-19 Thread FaRHaN

I want to get relative path of my current wicket project folder. I have used 
System.getProperty(user.dir) method but it returns the path of Tomcat's bin 
directory.  
I want to access files of my project through relative path, so that i can 
access these files on other System also. I have my project in the following 
directory: C:\projects\sampleProject, I have also tried using ServletContext 
but it returns the build directory of my project, i.e. 
WebApplication.get().getServletContext().context.getRealPath(/); // returns 
C:\projects\sampleProject\build\web
WebApplication.get().getServletContext().context.getContextPath(); // returns 
/sampleProject

But i want only the project folder (C:\projects\sampleProject).
Is there a way to get relative path of my proejct ?

Thanks...



  

Re: SubmitLink in List/DataView in Form not working?

2009-08-19 Thread Martijn Lindhout
shame on me when I copied the raw html from the designers into my
page, I forgot to remove a 'dummy' form object, so there was a nested
form

2009/8/19 Martijn Lindhout mlindh...@jointeffort.nl:
 Hi All,

 I almost finished 2 Wicket sites succesfully without any problems, and
 now I'm busy with a  third one... but I'm lost... and can't find a
 solution in the list so far...

 I have a  submitlink in a listview, together with several input fields
 (zie HTML below). In code I have:

 item.add(new SubmitLink(linkUp){
     public void onSubmit() { ...}
 });

 And the link doesn't submit

 What do I forget?

 HTML:

 form wicket:id=form

 table
 tr wicket:id=rows
   tdinput type=radio wicket:id=grade1 //td
   tda href= wicket:id=linkUpup/a/td
 /tr
 /table


 /form




-- 
Martijn Lindhout
 * 06 - 18 47 25 29
 * mlindh...@jointeffort.nl
 * http://www.jointeffort.nl

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



AjaxTabbedPanel with different forms on each tab

2009-08-19 Thread Help System
Hi,

I have an AjaxTabbedPanel in a ModalWindow.  There are two tabs, each
containing a panel with a simple form.

Looking at the html produced, the AjaxTabbedPanel moves the form element
from the place in the panel to near the top of the tabbed panel html
hierarchy and changes the id.  All form elements are then part of the new
tabbed panel form.

The first tab works OK but the second tab fails to return from an
AjaxSubmit.  The error shown in the debug window is

*ERROR: *
Wicket.Ajax.Call.submitFormById: Trying to submit form with id
'form3f' that is not in document.

The panels and forms work fine when not displayed in the tabbed panel.

Can anyone tell me what I'm doing wrong please?

Using Wicket 1.4

Thanks,
Tim


How do I get my DropDownChoice to refresh the list of choices with Ajax?

2009-08-19 Thread Linda van der Pal
I have a page with a dropdown list on it with authors. If I enter a new 
book I want my fields to be filled based on the ISBN. This works just 
fine. But now I want those fields to be filled with data  I collect from 
the internet, meaning that it isn't always already in my database, and 
therefor the author might not yet be in the list. I have already decided 
to save the new author so I can select it in the list, but the list 
isn't updated, and I can't figure out how to get it to update.


Here are some pieces of code I think are relevant:

This is how I create the authorfield:

authorField = new MultiSelectFieldSwitchPanel(authors, dataRetriever.fetchAuthors(), 
new PropertyModel(this, book.authors));


dataRetriever.fetchAuthors return a ListAuthor

Here's the constructor of MultiSelectFieldSwitchPanel which extends 
FormComponentPanel:


public MultiSelectFieldSwitchPanel(final String id, final List? extends DomainObject 
authors, final IModelListAuthor model) {
   super(id, model);
   lmc = new ListMultipleChoice(selectField, new PropertyModelListAuthor(this, selectedObjects), 
authors, new ChoiceRendererDomainObject(name, id));

   init(lmc);
}

The init method adds a link to swap the lmc for a textfield where new 
authors can be entered, which is not really relevant in this case.


I have of course already added authorField to the AjaxRequestTarget in 
the behavior that is triggered by updating the ISBN.


Regards,
Linda

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



Re: Question about threads inside wicket pages

2009-08-19 Thread Jeremy Thomerson
I'm not 100% sure, but I'm pretty sure that it would depend on your
servlet container more than Wicket.  The threads for handling requests
are spun up by the servlet container before Wicket is ever handed the
request.  And typically these threads are pooled - so it wouldn't be
*destroyed*.  But you'll definitely need to do some testing on it to
be sure.

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




On Wed, Aug 19, 2009 at 3:03 AM, Ashika Umanga
Umagiliyaauma...@biggjapan.com wrote:
 Greetings all,

 Please refer to image at :
 http://i26.tinypic.com/11qi6o7.jpg

 I am going to invoke a webservice using Axis2 Client,asynchronically.To
 getback the results, I am using a Callback handler in axis2.

 Within my page, I am going to create the Callback object
 (axisCallbackHandler in picture) and call the axis2client which will create
 a seperate thread for async access.
 My concern is that what would happen if the user close the browser while
 still axis2client-thread consuming the service?does the wicket-thread get
 destroyed?
 If thats the case,I want to send the results in an email ,if not display the
 results in the wicket page.

 Thanks in advance


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



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



Re: Shall we have(embed) a swf in wicket component(Panel or in wicket page).

2009-08-19 Thread Fernando Wermus
You can use SWFObject that is in the wiki. You also can use LightWindow to
show SWFObject.

Look for SwfObject Javascript to make it to run and the examples.
Take care that this panel cannot be put in a modal Window, I tried and
failed.


Anyway I pasted below

public class SWFObject extends AbstractBehavior implements
IHeaderContributor {

  private static final CompressedResourceReference SWFOBJECT_JS =
  new CompressedResourceReference(SWFObject.class, swfobject-2.1.js);

  private static final long serialVersionUID = 1L;

  private MapString, String parameters = new HashMapString, String();

  private MapString, String attributes = new HashMapString, String();

  private String version;
  private String flashUrl;
  private String width;
  private String height;
  private Component component;

  @Override
public void bind(Component component) {
this.component = component;
component.setOutputMarkupId(true);
  }

  public void renderHead(IHeaderResponse response) {
response.renderJavascriptReference(SWFOBJECT_JS);

final String id = component.getMarkupId();
String parObj = buildDataObject(getParameters());
String attObj = buildDataObject(getAttributes());

// embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr,
swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj)

String js = String.format(swfobject.embedSWF('%s','%s', '%s', '%s',
'%s', '%s', %s, %s );,
flashUrl, id, width, height, version, expressInstall.swf, parObj,
attObj);

response.renderJavascript(js, null);
  }

  /**
   * Construct.
   * p/
   * version can be a string in the format of
'majorVersion.minorVersion.revision'.
   * An example would be: 6.0.65. Or you can just require the major
version, such as 6.
   *
   * @param flashUrlThe url of your swf file.
   * @param width   width of swf
   * @param height  height of movie
   * @param version Flash version to support
   */
  public SWFObject(final String flashUrl, final int width, final int height,
final String version) {
this(flashUrl, String.valueOf(width), String.valueOf(height), version);
  }

  /**
   * Construct.
   * @param flashUrlURL to load up for swf
   * @param width   width of swf
   * @param height  height of movie
   * @param version Flash version to support
   */
  public SWFObject(final String flashUrl, final String width, final String
height, final String version) {
if (flashUrl == null) {
  throw new IllegalArgumentException(Argument [flashUrl] cannot be
null);
}
this.flashUrl = flashUrl;
this.width = width;
this.height = height;
this.version = version;
  }

  private String buildDataObject(MapString,String data) {
final String quote = ';
final String comma=,;
if (data != null  !data.isEmpty()) {
  StringBuilder result = new StringBuilder();
  result.append({);
  for (Map.EntryString, String e : getParameters().entrySet()) {
result.append(quote).append(e.getKey()).append(quote + : +
quote).append(e.getValue()).append(quote).append(comma);
  }
  result.deleteCharAt(result.length() - 1);
  result.append(});
  return result.toString();
}
return {};
  }

  @Override
  public void onComponentTag(final Component component, final ComponentTag
tag) {
  }

  protected MapString, String getParameters() {
return parameters;
  }

  public void addParameter(String name, String value) {
parameters.put(name, value);
  }

  protected MapString, String getAttributes() {
return attributes;
  }

  public void addAttribute(String name, String value) {
attributes.put(name, value);
  }

}


Here is a use of it

public class PanelforSwf extends Panel implements IResourceListener {

private static final long serialVersionUID = 14614407827489706L;
static final ResourceReference SWF_RESOURCE = new
ResourceReference(PanelPartido.class, stadistic.swf );
final SWFObject swf;
private String idInscripcion;

public PanelForSwf(String id, String width, String height) {
super(id);
String swfURL = RequestUtils.toAbsolutePath(
urlFor(SWF_RESOURCE).toString() );
add(swf = new SWFObject( swfURL, width, height, 9.0.0));
}
public PanelForSwf(String id, IModel modeloInscripcion) {
this(id,800,500);
}
  @Override protected void onBeforeRender() {
swf.addParameter(param2, someparameter);
swf.addParameter(param1, someparameter);
super.onBeforeRender();
  }

public void onResourceRequested() {

}

}



On Tue, Aug 18, 2009 at 10:41 PM, Gerald Fernando 
gerald.anto.ferna...@gmail.com wrote:

 Nino sorry to say that i dont know that
 please tell me clear.
 if possible give some modal code

 ThanksRegards,
 Gerald A

 On Tue, Aug 18, 2009 at 6:45 PM, nino martinez wael 
 nino.martinez.w...@gmail.com wrote:

  stuff the panel in to the modal window
 
  2009/8/18 Gerald 

Re: Modal window and SSL

2009-08-19 Thread Igor Vaynberg
it just means that you are on a https page but it links to some http
resources, eg images or javascripts.

so make sure when you are on a https page all your resources are
brought in via relative urls and do not start with http://

one specific example is that you can be on an https page but you
include an website analytics script via an http url.

-igor

On Wed, Aug 19, 2009 at 4:51 AM, Eyal Golanegola...@gmail.com wrote:
 Hello all,
 We are having a problem when we work on an SSL environment.
 Whenever we open a modal popup window, there's this annoying message of IE
 that the user is trying to open both secure and non secure content.
 We changed the IE settings and the message is gone.
 But I want to understand what's causing it?

 I googled a bit about it and found some tips on changing the
 IREquestCycleProcessor:
 http://cwiki.apache.org/WICKET/how-to-switch-to-ssl-mode.html
 It this what we should do?

 BTW,
 does anyone know how to run the embedded Jetty with SSL?

 Thanks

 Eyal Golan
 egola...@gmail.com

 Visit: http://jvdrums.sourceforge.net/
 LinkedIn: http://www.linkedin.com/in/egolan74

 P  Save a tree. Please don't print this e-mail unless it's really necessary


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



Re: Newbie question: fileupload AJAX progressbar ?

2009-08-19 Thread Robin Sander


I've just copied the example upload page from  
http://www.wicket-library.com/wicket-examples/upload/single
into my application with the same result: upload works but the progess  
bar is NOT updated.


So, anything else needed besides overriding 'newWebRequest()' ?
I'm using wicket, wicket-datetime and wicket-extensions, all in  
version 1.4.0.

Do I need another wicket module? Maybe some kind of wicket-ajax ??



On 19.08.2009, at 12:25, Robin Sander wrote:



Hi,

are there any further requirements? I use Wicket 1.4.0, defined  
'newWebRequest' in
my Application class and though I do see a progress bar and the  
upload works perfectly

I do not see any progress! (the bar never changes)
Is the progress automatically reported by the server side or do I  
have to implement

something or add/modify some Javascript?

Robin.


On 19.08.2009, at 09:19, Stefan Lindner wrote:


Hi Ashika,

I pointed yopu tot he documentation because I was not sure if using  
UploadWebRequest has any side effects. Does not seem so.


Stefan

-Ursprüngliche Nachricht-
Von: Ashika Umanga Umagiliya [mailto:auma...@biggjapan.com]
Gesendet: Mittwoch, 19. August 2009 09:10
An: users@wicket.apache.org
Betreff: Re: Newbie question: fileupload AJAX progressbar ?

Thanks Stefan,

That solved my problem.
Since UploadProgreeBar is a component of 'wicket-extensions', i  
refered
documentation at http://www.wicketframework.org/wicket-extensions/  
which
is kind of updated (versoin 1.2) . I had to download documentation  
for

1.4 from the maven repository.

Thanks again.

Stefan Lindner wrote:

You need

@Override
	protected WebRequest newWebRequest(HttpServletRequest  
servletRequest) {

return new UploadWebRequest(servletRequest);
}

In your Application's class. I think you should definitly read the  
APIdoc (see UploadProgressBar)!


Stefan

-Ursprüngliche Nachricht-
Von: Ashika Umanga Umagiliya [mailto:auma...@biggjapan.com]
Gesendet: Mittwoch, 19. August 2009 07:17
An: users@wicket.apache.org
Betreff: Newbie question: fileupload AJAX progressbar ?

Greetings all,

I am new to Wicket and I used 'UploadProgressBar' to create an AJAX
brogressbar for fileupload.(refered example at wicket-library.org )
But when uploading a file, eventhough progreebar showed,theres no
activity nor incrementation of the bar
I have posted my code, what could be the problem?

Thanks in advance.




public class UploadPage extends WebPage {

  ///fileupload form
  private class FileUploadForm extends FormVoid{

  private FileUploadField fileuploadField;
  public FileUploadForm(String name){
  super(name);
  setMultiPart(true);
  add(fileuploadField=new FileUploadField(fileInput));
  setMaxSize(Bytes.gigabytes(4));

  }
  @Override
  protected void onSubmit() {
   final FileUpload upload =  
fileuploadField.getFileUpload();

  if (upload != null)
  {

  File newFile = new File(getUploadFolder(),
upload.getClientFileName());

  try
  {
   newFile.createNewFile();
  upload.writeTo(newFile);

  UploadPage.this.info(saved file:  +
upload.getClientFileName());
  }
  catch (Exception e)
  {
  throw new IllegalStateException(Unable to  
write

file);
  }
  }
  }

  }


  public UploadPage(final PageParameters parameters) {
  final FeedbackPanel uploadFfeedback=new
FeedbackPanel(uploadFeedback);
  add(uploadFfeedback);

  final FileUploadForm fileUploadForm=new
FileUploadForm(ajaxupload);
  fileUploadForm.add(new UploadProgressBar(progress,
fileUploadForm));
  add(fileUploadForm);
  }


  private Folder getUploadFolder(){
  return
((SVRWebApplication)Application.get()).getUploadFolder();
  }


}


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


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





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


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



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




Wicket and RSS

2009-08-19 Thread VGJ
I've got a simple RSS feed I'm trying to display on a page.  Is
wicketstuff-rome dead?  Is there a better way?  I'm not a maven user (not
even familar with it) - so are there any jars I can download somewhere for
wicketstuff-rome, if it's not dead?

Appreciate the help, thanks.


how to debug Wicket Application

2009-08-19 Thread Oleg Ruchovets
Hi , I am new in wicket. I try to modify wicket in action examples and got
such exception:

   WicketMessage: Error attaching this container for rendering:
[MarkupContainer [Component id = content, page =
wicket.in.action.chapter03.section_3_1.dbdiscounts.web.Index, path =
1:discounts:content.DiscountsList, isVisible = true, isVersioned = true]]

Root cause:

java.lang.NullPointerException
at
wicket.in.action.chapter03.section_3_1.dbdiscounts.web.DiscountsList$1.getItemModels(DiscountsList.java:32)
at
org.apache.wicket.markup.repeater.RefreshingView.onPopulate(RefreshingView.java:104)
at
org.apache.wicket.markup.repeater.AbstractRepeater.onBeforeRender(AbstractRepeater.java:127)
at org.apache.wicket.Component.internalBeforeRender(Component.java:995)
at org.apache.wicket.Component.beforeRender(Component.java:1027)
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1513)
at org.apache.wicket.Component.onBeforeRender(Component.java:3657)
at org.apache.wicket.Component.internalBeforeRender(Component.java:995)
at org.apache.wicket.Component.beforeRender(Component.java:1027)
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1513)
at org.apache.wicket.Component.onBeforeRender(Component.java:3657)
at org.apache.wicket.Component.internalBeforeRender(Component.java:995)
at org.apache.wicket.Component.beforeRender(Component.java:1027)
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1513)
at org.apache.wicket.Component.onBeforeRender(Component.java:3657)
at org.apache.wicket.Page.onBeforeRender(Page.java:1402)
at org.apache.wicket.Component.internalBeforeRender(Component.java:995)
at org.apache.wicket.Component.beforeRender(Component.java:1027)
at org.apache.wicket.Component.prepareForRender(Component.java:2139)
at org.apache.wicket.Page.renderPage(Page.java:870)
at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:231)
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.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:829)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)

Complete stack:

org.apache.wicket.WicketRuntimeException: Error attaching this container for
rendering: [MarkupContainer [Component id = content, page =
wicket.in.action.chapter03.section_3_1.dbdiscounts.web.Index, path =
1:discounts:content.DiscountsList, isVisible = true, isVersioned = true]]
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1525)
at org.apache.wicket.Component.onBeforeRender(Component.java:3657)
at org.apache.wicket.Component.internalBeforeRender(Component.java:995)
at org.apache.wicket.Component.beforeRender(Component.java:1027)
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1513)
at org.apache.wicket.Component.onBeforeRender(Component.java:3657)
at org.apache.wicket.Component.internalBeforeRender(Component.java:995)
at 

Re: how to debug Wicket Application

2009-08-19 Thread Matej Knopp
You can start by setting a breakpoint and running the application in debug mode.

-Matej

On Wed, Aug 19, 2009 at 7:39 PM, Oleg Ruchovetsoruchov...@gmail.com wrote:
 Hi , I am new in wicket. I try to modify wicket in action examples and got
 such exception:

       WicketMessage: Error attaching this container for rendering:
 [MarkupContainer [Component id = content, page =
 wicket.in.action.chapter03.section_3_1.dbdiscounts.web.Index, path =
 1:discounts:content.DiscountsList, isVisible = true, isVersioned = true]]

 Root cause:

 java.lang.NullPointerException
 at
 wicket.in.action.chapter03.section_3_1.dbdiscounts.web.DiscountsList$1.getItemModels(DiscountsList.java:32)
 at
 org.apache.wicket.markup.repeater.RefreshingView.onPopulate(RefreshingView.java:104)
 at
 org.apache.wicket.markup.repeater.AbstractRepeater.onBeforeRender(AbstractRepeater.java:127)
 at org.apache.wicket.Component.internalBeforeRender(Component.java:995)
 at org.apache.wicket.Component.beforeRender(Component.java:1027)
 at
 org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1513)
 at org.apache.wicket.Component.onBeforeRender(Component.java:3657)
 at org.apache.wicket.Component.internalBeforeRender(Component.java:995)
 at org.apache.wicket.Component.beforeRender(Component.java:1027)
 at
 org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1513)
 at org.apache.wicket.Component.onBeforeRender(Component.java:3657)
 at org.apache.wicket.Component.internalBeforeRender(Component.java:995)
 at org.apache.wicket.Component.beforeRender(Component.java:1027)
 at
 org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1513)
 at org.apache.wicket.Component.onBeforeRender(Component.java:3657)
 at org.apache.wicket.Page.onBeforeRender(Page.java:1402)
 at org.apache.wicket.Component.internalBeforeRender(Component.java:995)
 at org.apache.wicket.Component.beforeRender(Component.java:1027)
 at org.apache.wicket.Component.prepareForRender(Component.java:2139)
 at org.apache.wicket.Page.renderPage(Page.java:870)
 at
 org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:231)
 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.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
 at
 org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
 at
 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
 at
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
 at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
 at
 org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
 at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
 at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
 at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
 at
 org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
 at
 org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
 at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
 at org.mortbay.jetty.Server.handle(Server.java:324)
 at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
 at
 org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:829)
 at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
 at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
 at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
 at
 org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
 at
 org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)

 Complete stack:

 org.apache.wicket.WicketRuntimeException: Error attaching this container for
 rendering: [MarkupContainer [Component id = content, page =
 wicket.in.action.chapter03.section_3_1.dbdiscounts.web.Index, path =
 1:discounts:content.DiscountsList, isVisible = true, isVersioned = true]]
 at
 org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1525)
 at org.apache.wicket.Component.onBeforeRender(Component.java:3657)
 at org.apache.wicket.Component.internalBeforeRender(Component.java:995)
 at org.apache.wicket.Component.beforeRender(Component.java:1027)
 at
 

Re: how to debug Wicket Application

2009-08-19 Thread Oleg Ruchovets
Ok , thank you for quick responce.

   I am using eclipse and run my application on jetty web server.

How can I configure application to be in debug mode? I mean what kind of
configuration should I do?





On Wed, Aug 19, 2009 at 8:41 PM, Matej Knopp matej.kn...@gmail.com wrote:

 You can start by setting a breakpoint and running the application in debug
 mode.

 -Matej

 On Wed, Aug 19, 2009 at 7:39 PM, Oleg Ruchovetsoruchov...@gmail.com
 wrote:
  Hi , I am new in wicket. I try to modify wicket in action examples and
 got
  such exception:
 
WicketMessage: Error attaching this container for rendering:
  [MarkupContainer [Component id = content, page =
  wicket.in.action.chapter03.section_3_1.dbdiscounts.web.Index, path =
  1:discounts:content.DiscountsList, isVisible = true, isVersioned = true]]
 
  Root cause:
 
  java.lang.NullPointerException
  at
 
 wicket.in.action.chapter03.section_3_1.dbdiscounts.web.DiscountsList$1.getItemModels(DiscountsList.java:32)
  at
 
 org.apache.wicket.markup.repeater.RefreshingView.onPopulate(RefreshingView.java:104)
  at
 
 org.apache.wicket.markup.repeater.AbstractRepeater.onBeforeRender(AbstractRepeater.java:127)
  at org.apache.wicket.Component.internalBeforeRender(Component.java:995)
  at org.apache.wicket.Component.beforeRender(Component.java:1027)
  at
 
 org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1513)
  at org.apache.wicket.Component.onBeforeRender(Component.java:3657)
  at org.apache.wicket.Component.internalBeforeRender(Component.java:995)
  at org.apache.wicket.Component.beforeRender(Component.java:1027)
  at
 
 org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1513)
  at org.apache.wicket.Component.onBeforeRender(Component.java:3657)
  at org.apache.wicket.Component.internalBeforeRender(Component.java:995)
  at org.apache.wicket.Component.beforeRender(Component.java:1027)
  at
 
 org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1513)
  at org.apache.wicket.Component.onBeforeRender(Component.java:3657)
  at org.apache.wicket.Page.onBeforeRender(Page.java:1402)
  at org.apache.wicket.Component.internalBeforeRender(Component.java:995)
  at org.apache.wicket.Component.beforeRender(Component.java:1027)
  at org.apache.wicket.Component.prepareForRender(Component.java:2139)
  at org.apache.wicket.Page.renderPage(Page.java:870)
  at
 
 org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:231)
  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.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
  at
 
 org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
  at
 
 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
  at
 
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
  at
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
  at
 
 org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
  at
 org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
  at
 org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
  at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
  at
 
 org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
  at
 
 org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
  at
 org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
  at org.mortbay.jetty.Server.handle(Server.java:324)
  at
 org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
  at
 
 org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:829)
  at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
  at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
  at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
  at
 
 org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
  at
 
 org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
 
  Complete stack:
 
  org.apache.wicket.WicketRuntimeException: Error attaching this container
 for
  rendering: [MarkupContainer [Component id = content, page =
  

Re: Modal window and SSL

2009-08-19 Thread Peter Ertl

I remember this issue begin fixed already: 
https://issues.apache.org/jira/browse/WICKET-855

did someone change ModalWindow in the meantime?

Am 19.08.2009 um 17:13 schrieb Igor Vaynberg:


it just means that you are on a https page but it links to some http
resources, eg images or javascripts.

so make sure when you are on a https page all your resources are
brought in via relative urls and do not start with http://

one specific example is that you can be on an https page but you
include an website analytics script via an http url.

-igor

On Wed, Aug 19, 2009 at 4:51 AM, Eyal Golanegola...@gmail.com wrote:

Hello all,
We are having a problem when we work on an SSL environment.
Whenever we open a modal popup window, there's this annoying  
message of IE

that the user is trying to open both secure and non secure content.
We changed the IE settings and the message is gone.
But I want to understand what's causing it?

I googled a bit about it and found some tips on changing the
IREquestCycleProcessor:
http://cwiki.apache.org/WICKET/how-to-switch-to-ssl-mode.html
It this what we should do?

BTW,
does anyone know how to run the embedded Jetty with SSL?

Thanks

Eyal Golan
egola...@gmail.com

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74

P  Save a tree. Please don't print this e-mail unless it's really  
necessary




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



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



Re: how to debug Wicket Application

2009-08-19 Thread Jeremy Thomerson
Use the Start.java that came with the Wicket quickstart to start
Jetty.  From Eclipse, just choose to debug as - java application
rather than run as.  This will put it in debug mode and you can set
breakpoints, etc.

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




On Wed, Aug 19, 2009 at 12:45 PM, Oleg Ruchovetsoruchov...@gmail.com wrote:
 Ok , thank you for quick responce.

   I am using eclipse and run my application on jetty web server.

 How can I configure application to be in debug mode? I mean what kind of
 configuration should I do?





 On Wed, Aug 19, 2009 at 8:41 PM, Matej Knopp matej.kn...@gmail.com wrote:

 You can start by setting a breakpoint and running the application in debug
 mode.

 -Matej

 On Wed, Aug 19, 2009 at 7:39 PM, Oleg Ruchovetsoruchov...@gmail.com
 wrote:
  Hi , I am new in wicket. I try to modify wicket in action examples and
 got
  such exception:
 
        WicketMessage: Error attaching this container for rendering:
  [MarkupContainer [Component id = content, page =
  wicket.in.action.chapter03.section_3_1.dbdiscounts.web.Index, path =
  1:discounts:content.DiscountsList, isVisible = true, isVersioned = true]]
 
  Root cause:
 
  java.lang.NullPointerException
  at
 
 wicket.in.action.chapter03.section_3_1.dbdiscounts.web.DiscountsList$1.getItemModels(DiscountsList.java:32)
  at
 
 org.apache.wicket.markup.repeater.RefreshingView.onPopulate(RefreshingView.java:104)
  at
 
 org.apache.wicket.markup.repeater.AbstractRepeater.onBeforeRender(AbstractRepeater.java:127)
  at org.apache.wicket.Component.internalBeforeRender(Component.java:995)
  at org.apache.wicket.Component.beforeRender(Component.java:1027)
  at
 
 org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1513)
  at org.apache.wicket.Component.onBeforeRender(Component.java:3657)
  at org.apache.wicket.Component.internalBeforeRender(Component.java:995)
  at org.apache.wicket.Component.beforeRender(Component.java:1027)
  at
 
 org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1513)
  at org.apache.wicket.Component.onBeforeRender(Component.java:3657)
  at org.apache.wicket.Component.internalBeforeRender(Component.java:995)
  at org.apache.wicket.Component.beforeRender(Component.java:1027)
  at
 
 org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1513)
  at org.apache.wicket.Component.onBeforeRender(Component.java:3657)
  at org.apache.wicket.Page.onBeforeRender(Page.java:1402)
  at org.apache.wicket.Component.internalBeforeRender(Component.java:995)
  at org.apache.wicket.Component.beforeRender(Component.java:1027)
  at org.apache.wicket.Component.prepareForRender(Component.java:2139)
  at org.apache.wicket.Page.renderPage(Page.java:870)
  at
 
 org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:231)
  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.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
  at
 
 org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
  at
 
 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
  at
 
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
  at
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
  at
 
 org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
  at
 org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
  at
 org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
  at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
  at
 
 org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
  at
 
 org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
  at
 org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
  at org.mortbay.jetty.Server.handle(Server.java:324)
  at
 org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
  at
 
 org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:829)
  at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
  at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
  at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
  at
 
 

Re: AjaxTabbedPanel with different forms on each tab

2009-08-19 Thread Marcin Palka

Tim,

You have to place your modal window within a form. It's mandatory if you
want to use Forms on a modal. 

You have to write code similar to the following:

form wicket:id=outerForm
 div wicket:id=modalWithTabsmodal placeholder/div
/form

Form outerForm =new Form(outerForm);
ModalWindowmodalWithTabs  = new ModalWindow(modalWithTabs);
...
outerForm.add(modalWithTabs);
add(outerForm);

cheers,
Marcin 


Help System wrote:
 
 Hi,
 
 I have an AjaxTabbedPanel in a ModalWindow.  There are two tabs, each
 containing a panel with a simple form.
 
 Looking at the html produced, the AjaxTabbedPanel moves the form element
 from the place in the panel to near the top of the tabbed panel html
 hierarchy and changes the id.  All form elements are then part of the new
 tabbed panel form.
 
 The first tab works OK but the second tab fails to return from an
 AjaxSubmit.  The error shown in the debug window is
 
 *ERROR: *
 Wicket.Ajax.Call.submitFormById: Trying to submit form with id
 'form3f' that is not in document.
 
 The panels and forms work fine when not displayed in the tabbed panel.
 
 Can anyone tell me what I'm doing wrong please?
 
 Using Wicket 1.4
 
 Thanks,
 Tim
 
 

-- 
View this message in context: 
http://www.nabble.com/AjaxTabbedPanel-with-different-forms-on-each-tab-tp25044965p25049550.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Modal window and SSL

2009-08-19 Thread Eyal Golan
Thanks Igor and Peter.Peter,
we did change the JS that builds the ModalWindow. I'll look into it.
Thanks,

Eyal Golan
egola...@gmail.com

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74

P  Save a tree. Please don't print this e-mail unless it's really necessary


On Wed, Aug 19, 2009 at 8:56 PM, Peter Ertl pe...@gmx.org wrote:

 I remember this issue begin fixed already:
 https://issues.apache.org/jira/browse/WICKET-855

 did someone change ModalWindow in the meantime?

 Am 19.08.2009 um 17:13 schrieb Igor Vaynberg:


  it just means that you are on a https page but it links to some http
 resources, eg images or javascripts.

 so make sure when you are on a https page all your resources are
 brought in via relative urls and do not start with http://

 one specific example is that you can be on an https page but you
 include an website analytics script via an http url.

 -igor

 On Wed, Aug 19, 2009 at 4:51 AM, Eyal Golanegola...@gmail.com wrote:

 Hello all,
 We are having a problem when we work on an SSL environment.
 Whenever we open a modal popup window, there's this annoying message of
 IE
 that the user is trying to open both secure and non secure content.
 We changed the IE settings and the message is gone.
 But I want to understand what's causing it?

 I googled a bit about it and found some tips on changing the
 IREquestCycleProcessor:
 http://cwiki.apache.org/WICKET/how-to-switch-to-ssl-mode.html
 It this what we should do?

 BTW,
 does anyone know how to run the embedded Jetty with SSL?

 Thanks

 Eyal Golan
 egola...@gmail.com

 Visit: http://jvdrums.sourceforge.net/
 LinkedIn: http://www.linkedin.com/in/egolan74

 P  Save a tree. Please don't print this e-mail unless it's really
 necessary


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



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




Re: DropDown where (type of model property) != (type of choices)

2009-08-19 Thread Igor Vaynberg
http://steve-on-sakai.blogspot.com/2008/12/using-hashmap-with-dropdownchoice.html

-igor

On Wed, Aug 19, 2009 at 3:17 PM, Eirik Lygreeirik.ly...@gmail.com wrote:
 I'm looking for the best way to implement a drop-down, where the type of the
 model property is not the type of the lists:

 For example, with the model below, I want to implement a drop-down to select
 languages for a user.

    class User {
        String languageId;
    }

    class Language {
        String languageId;
        String languageName;
    }

    // From MyForm extends FormUser
    // here, this.getModelObject returns a User
    // Somewhere in the constructor...
    ...
    ListLanguage languages = getLanguagesFromDatabase();
    form.add (new DropDownChoice(languageDropDown, ...eh...?
    ...

 My workaround involves creating a separate model for the language, and copy
 from the language model to the user model whenever I use the user model. But
 it's cumbersome...

 1) Is there a better way?
 2) Is there an established best practice for this (probaly common)
 scenario?


 Eirik


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



Re: Session listener

2009-08-19 Thread David Leangen



What's the best way to get notified of a session timeout event from  
within a

Wicket App when I don't have access to the deployment descriptor?


I think overriding WebApplication#sessionDestroyed should do the  
trick.


Perfect! Thank you.



Re: Newbie question: fileupload AJAX progressbar ?

2009-08-19 Thread Ashika Umanga Umagiliya

Hi Robin,

Are you using Safari , I saw in following threads that its not working 
properly with Safari .


http://www.nabble.com/UploadProgressBar-in-firefox-and-ie6-tp24166616p24205091.html
http://www.nabble.com/UploadProgressBar-does-not-work-in-Safari-browser--to21571997.html#a24322943

Regards

Robin Sander wrote:


I've just copied the example upload page from  
http://www.wicket-library.com/wicket-examples/upload/single
into my application with the same result: upload works but the progess 
bar is NOT updated.


So, anything else needed besides overriding 'newWebRequest()' ?
I'm using wicket, wicket-datetime and wicket-extensions, all in 
version 1.4.0.

Do I need another wicket module? Maybe some kind of wicket-ajax ??



On 19.08.2009, at 12:25, Robin Sander wrote:



Hi,

are there any further requirements? I use Wicket 1.4.0, defined 
'newWebRequest' in
my Application class and though I do see a progress bar and the 
upload works perfectly

I do not see any progress! (the bar never changes)
Is the progress automatically reported by the server side or do I 
have to implement

something or add/modify some Javascript?

Robin.


On 19.08.2009, at 09:19, Stefan Lindner wrote:


Hi Ashika,

I pointed yopu tot he documentation because I was not sure if using 
UploadWebRequest has any side effects. Does not seem so.


Stefan

-Ursprüngliche Nachricht-
Von: Ashika Umanga Umagiliya [mailto:auma...@biggjapan.com]
Gesendet: Mittwoch, 19. August 2009 09:10
An: users@wicket.apache.org
Betreff: Re: Newbie question: fileupload AJAX progressbar ?

Thanks Stefan,

That solved my problem.
Since UploadProgreeBar is a component of 'wicket-extensions', i refered
documentation at http://www.wicketframework.org/wicket-extensions/ 
which

is kind of updated (versoin 1.2) . I had to download documentation for
1.4 from the maven repository.

Thanks again.

Stefan Lindner wrote:

You need

@Override
protected WebRequest newWebRequest(HttpServletRequest 
servletRequest) {

return new UploadWebRequest(servletRequest);
}

In your Application's class. I think you should definitly read the 
APIdoc (see UploadProgressBar)!


Stefan

-Ursprüngliche Nachricht-
Von: Ashika Umanga Umagiliya [mailto:auma...@biggjapan.com]
Gesendet: Mittwoch, 19. August 2009 07:17
An: users@wicket.apache.org
Betreff: Newbie question: fileupload AJAX progressbar ?

Greetings all,

I am new to Wicket and I used 'UploadProgressBar' to create an AJAX
brogressbar for fileupload.(refered example at wicket-library.org )
But when uploading a file, eventhough progreebar showed,theres no
activity nor incrementation of the bar
I have posted my code, what could be the problem?

Thanks in advance.




public class UploadPage extends WebPage {

  ///fileupload form
  private class FileUploadForm extends FormVoid{

  private FileUploadField fileuploadField;
  public FileUploadForm(String name){
  super(name);
  setMultiPart(true);
  add(fileuploadField=new FileUploadField(fileInput));
  setMaxSize(Bytes.gigabytes(4));

  }
  @Override
  protected void onSubmit() {
   final FileUpload upload = fileuploadField.getFileUpload();
  if (upload != null)
  {

  File newFile = new File(getUploadFolder(),
upload.getClientFileName());

  try
  {
   newFile.createNewFile();
  upload.writeTo(newFile);

  UploadPage.this.info(saved file:  +
upload.getClientFileName());
  }
  catch (Exception e)
  {
  throw new IllegalStateException(Unable to write
file);
  }
  }
  }

  }


  public UploadPage(final PageParameters parameters) {
  final FeedbackPanel uploadFfeedback=new
FeedbackPanel(uploadFeedback);
  add(uploadFfeedback);

  final FileUploadForm fileUploadForm=new
FileUploadForm(ajaxupload);
  fileUploadForm.add(new UploadProgressBar(progress,
fileUploadForm));
  add(fileUploadForm);
  }


  private Folder getUploadFolder(){
  return
((SVRWebApplication)Application.get()).getUploadFolder();
  }


}


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


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





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


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

RE: javascript effects before an ajax call

2009-08-19 Thread Joe Hudson
How can you make the script sources that you reference in your web page show up 
after the component  wicket script includes?  (assuming you don't want to do 
this inline)

I would like to override the Wicket.replaceOuterHtml function because I would 
like to do some jquery dom post processing.  But whenever I include javascript, 
it is above all other script includes in the rendered output.  To override, it 
must be included below the Wicket script includes.  Thanks.

Joe

-Original Message-
From: Antony Stubbs [mailto:antony.stu...@gmail.com] 
Sent: Tuesday, August 18, 2009 9:04 AM
To: Antony Stubbs
Cc: users@wicket.apache.org; Martijn Dashorst; Matej Knopp
Subject: Re: javascript effects before an ajax call

Here's the more readable version - corrected with help form Richard at  
JWeekend... This is the easiest way to do the animation either side of  
the Wicket replace function that I know of... If someone would like to  
wrap this up into a nice behaviour for the Scriptaculous wicketstuff  
library be my guest :) I probably will eventually if we get back to  
the project that uses it.

script type=text/javascript!--

var oldF = Wicket.replaceOuterHtml

Wicket.replaceOuterHtml=function(element, text) {

var parent = $(element.id).parentNode;

// the disappear animation
$(element.id).fade({ duration: 0.4, afterFinish: function(effect) {

// call replace function
oldF(element, text)

// render the appear animtion on the replaced element
$(element.id).appear({ duration: 0.4});
}});

}

--/script


Cheers,
Antony Stubbs,

sharca.com

On 29/07/2009, at 4:54 AM, Antony Stubbs wrote:

 I have a workaround and it goes a little something like this:
 script type=text/ 
 javascriptWicket.replaceOuterHtml=function(element, text) {

   new $(element.id).fade({ duration: 0.4, afterFinish:  
 function(effect) {
   
   if (Wicket.Browser.isIE()) {
   Wicket.replaceOuterHtmlIE(element, text);   
 
   } else if (Wicket.Browser.isSafari() ||  
 Wicket.Browser.isOpera()) {
   Wicket.replaceOuterHtmlSafari(element, text);   
   } else /* GECKO */ {
   // create range and fragment
   var range = element.ownerDocument.createRange();
   range.selectNode(element);
   var fragment = 
 range.createContextualFragment(text);
   
   element.parentNode.replaceChild(fragment, element);
   }   
   
   $(element.id).appear({ duration: 0.4}); 
   }});
   
 }

 /script

 Putting that at the top of the html overrides the wicket function,  
 adds in a javascript effect, then using the onFinish hook, runs the  
 original Wicket code, the precedes with another effect. This makes  
 the effects run immediately after the ajax call has completed...

 This adds a fade transition every time wicket replaces a dom  
 element. A better version would allow you to do it with some hooks,  
 passing in your transition functions.

 2009/7/28 Antony Stubbs antony.stu...@gmail.com
 (sorry, sent to wrong list before)

 Is it possible to override certain methods in wicketajax.js ? In  
 order to modify the behaviour of one of the methods.

 but i'd prefer not to run a patched wicket, or have to run on a copy  
 of the whole wicketajax.js file - but i will if i have to :/

 what i want to do is add pre and post hooks  
 processComponent#Wicket.replaceOuterHtml function - as this will  
 solve what I want to do - i.e. run an animation on the element to be  
 replaced, after the ajax call completes, but before the element is  
 replaced.

 p.s. martijn, is there any info available on the plan for the new  
 ajax system?

 I just found - there is a post animation hook in Scriptaculous,  
 which I have working to run the ajax request in, however this  
 doesn't quite get there, as there's is of course the delay between  
 when the animation finishes, and when the ajax request actually  
 completes - which is too long.

 Update:
 I've tried overriding the js functions like this:

 script type=text/javascript

 function newProcessComponent: function(steps, node) {
   alert('replaced!');
 }

 Wicket.Ajax.Call.prototype.processComponent = newProcessComponent

 /script
 script type=text/javascriptWicket.replaceOuterHtml=function()  
 {alert('replaceOuterHtml');}/script
 script type=text/ 
 javascriptWicket.Ajax.Call.prototype.processComponent:  
 function(steps, node) {{alert('processComponent');}/script

 but only the replaceOuterHtml functions works, i think because the  
 there's a difference because processComponent is  a member of an  
 object...
 I need to 

Changing the Model Value does not change the Form Parameters in POST

2009-08-19 Thread Hop Ney
  Please help.Changing the Model Value does not change the Form Parameters in POST.How can I change the parameters that are passed in POST requests?   
   Try the new FASTER Yahoo! Mail..   Experience it  today! 

Re: Question about threads inside wicket pages

2009-08-19 Thread Ashika Umanga Umagiliya

Hi Jeremy,
I tried to call Page.info() inside the new thread created by 
axis2client , then it gives the message :
EXCEPTION:you can only locate or create sessions in the context 
of a request cycle

I guess,this means I must change the page data inside the same thread right?

Thanks in advance,
umanga


Jeremy Thomerson wrote:

I'm not 100% sure, but I'm pretty sure that it would depend on your
servlet container more than Wicket.  The threads for handling requests
are spun up by the servlet container before Wicket is ever handed the
request.  And typically these threads are pooled - so it wouldn't be
*destroyed*.  But you'll definitely need to do some testing on it to
be sure.

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




On Wed, Aug 19, 2009 at 3:03 AM, Ashika Umanga
Umagiliyaauma...@biggjapan.com wrote:
  

Greetings all,

Please refer to image at :
http://i26.tinypic.com/11qi6o7.jpg

I am going to invoke a webservice using Axis2 Client,asynchronically.To
getback the results, I am using a Callback handler in axis2.

Within my page, I am going to create the Callback object
(axisCallbackHandler in picture) and call the axis2client which will create
a seperate thread for async access.
My concern is that what would happen if the user close the browser while
still axis2client-thread consuming the service?does the wicket-thread get
destroyed?
If thats the case,I want to send the results in an email ,if not display the
results in the wicket page.

Thanks in advance


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





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

  




[announce] Wicket 1.4.1

2009-08-19 Thread Igor Vaynberg
Apache Wicket 1.4.1 Released

The Apache Wicket project is proud to announce the first maintenance
release of Apache Wicket 1.4.

Download Apache Wicket 1.4.1
-
You can download the release here:
http://www.apache.org/dyn/closer.cgi/wicket/1.4.1

Or use this in your Maven pom's to upgrade to the new version:

dependency
  groupIdorg.apache.wicket/groupId
  artifactIdwicket/artifactId
  version1.4.1/version
/dependency

Changes
-
The most notable change in this release is the transparent support for
multipart form submissions via Ajax. Wicket is now smart enough to
submit a form using a hidden iframe rather then the standard
XMLHttpRequest if the form contains file upload fields.

A complete list of changes can be found in our Jira instance[0].

--

We thank you for your patience and support.

The Wicket Team

[0] 
https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=truemode=hidesorter/order=DESCsorter/field=prioritypid=12310561fixfor=12314113

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



Re: swf into wicket page

2009-08-19 Thread Gerald Fernando
Hi martijin i have write what u gave me but it shows that

Bedrijf cannot be resolved to a type
Video cannot be resolved to a type

create a class fo rBedrijf and Video
As i new to wicket i dont know how to write it
please tell me how to do it.

ThanksRegards,
Gerald A


On Wed, Aug 19, 2009 at 5:01 PM, Martijn Lindhout
mlindh...@jointeffort.nlwrote:

 Here's how I did it:

 Java
 public class VideoPlayer extends Panel {

public VideoPlayer(String id, final Bedrijf bedrijf, final Video
 video) {
super(id);
add(new WebComponent(player){
@Override
protected void onComponentTagBody(MarkupStream
 markupStream,
 ComponentTag openTag) {
String videoFile = /static/ +
 bedrijf.getProfiel().getId() +
 /videos/ + video.getNaam();
StringBuilder script = new StringBuilder(
var s1 = new
 SWFObject('/static/jobiq/player.swf','ply','328','200','9','#FF');
 +

  s1.addParam('allowfullscreen','true'); +

  s1.addParam('allowscriptaccess','always'); +
s1.addParam('flashvars','file= +
 videoFile +
 image=/static/player/preview.jpg'); +
s1.write('container');
);

replaceComponentTagBody(markupStream,
 openTag, script);
}
});
}

 }


 And the HTML
wicket:panel

div id=containera
 href=http://www.macromedia.com/go/getflashplayer;Get the Flash
 Player/a to see this player./div
script type=text/javascript
 src=/static/player/swfobject.js/script
script wicket:id=player type=text/javascript/script
/wicket:panel

 2009/8/19 Gerald Fernando gerald.anto.ferna...@gmail.com:
   Hello Friends,
 
  Shall we have(embed) a swf in wicket component(Panel or in wicket page).
  I have swf that shows chart for dynamic data.
  i want to show my .swf file into wicket page or wicket panel
  if possible please give me modal code.
  I need urgent reply
 
 
 
 
  --
  Thanksregards,
  Gerald A
 

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




-- 
Thanksregards,
Gerald A


How to get Relative Path ?

2009-08-19 Thread FaRHaN
Is there a way in wicket, to get relative path of current web project ?

Thanks...



  

Re: [announce] Wicket 1.4.1

2009-08-19 Thread Haulyn R. Jason
congratulations.

On Thu, Aug 20, 2009 at 1:21 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 Apache Wicket 1.4.1 Released

 The Apache Wicket project is proud to announce the first maintenance
 release of Apache Wicket 1.4.

 Download Apache Wicket 1.4.1
 -
 You can download the release here:
 http://www.apache.org/dyn/closer.cgi/wicket/1.4.1

 Or use this in your Maven pom's to upgrade to the new version:

 dependency
  groupIdorg.apache.wicket/groupId
  artifactIdwicket/artifactId
  version1.4.1/version
 /dependency

 Changes
 -
 The most notable change in this release is the transparent support for
 multipart form submissions via Ajax. Wicket is now smart enough to
 submit a form using a hidden iframe rather then the standard
 XMLHttpRequest if the form contains file upload fields.

 A complete list of changes can be found in our Jira instance[0].

 --

 We thank you for your patience and support.

 The Wicket Team

 [0]
 https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=truemode=hidesorter/order=DESCsorter/field=prioritypid=12310561fixfor=12314113

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




-- 
--
Enjoy. Thanks!

Haulyn Microproduction

Mobile: +086-15864011231
email: saharab...@gmail.com,
 hmp.hau...@foxmail.com
website: http://haulynjason.net
gtalk: saharab...@gmail.com
yahoo: jia_hao...@yahoo.com
msn: saharab...@gmail.com
skype: saharabear
QQ: 378606292

Haulyn Jason