Re: How to use Apache Commons FileUpload in Wicket ?

2009-09-03 Thread FaRHaN
How can i view PickWick Examples (with Code), from Pickwick-Wicket Stuff WIKI 
site?






From: Fernando Wermus fernando.wer...@gmail.com
To: users@wicket.apache.org
Sent: Wednesday, September 2, 2009 6:44:14 PM
Subject: Re: How to use Apache Commons FileUpload in Wicket ?

You have pickwick project that has an example exaclty as the way you want

On Wed, Sep 2, 2009 at 4:02 AM, FaRHaN farhan.ba...@ymail.com wrote:

 I want to upload a file using apache commons FileUpload API. As it requires
 HttpServletRequest for uploading files, but in wicket
 IMultipartWebRequest/IMultipartServletWebRequest is required for uploading
 purposes.

 How can I use apache commons FileUpload for uploading in Wicket ? Is there
 any example to do so ?

 Thanks...








-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus



  

AbortWithWebErrorCodeException and RequestCycle newRequestCycle

2009-09-03 Thread Eyal Golan
Hello,
We have in our application the following code:
/**
 * @see
org.apache.wicket.Application#newRequestCycle(org.apache.wicket.Request,
 *  org.apache.wicket.Response)
 */
@Override
public RequestCycle newRequestCycle(final Request request,
final Response response) {
return new WebRequestCycle(this, (WebRequest) request,
(WebResponse) response) {

@Override
public Page onRuntimeException(Page page, RuntimeException e) {
if (DEPLOYMENT.equalsIgnoreCase(getConfigurationType())) {
if
(PageExpiredException.class.isAssignableFrom(e.getClass())) {
return null;
} else {
e.printStackTrace();
System.out.println(e.getMessage());
return new InternalErrorPage(getErrorDisplay(e));
}
} else {
// In development we want to see the exception
return null;
}

}
};
}

Also, in our base page we have this
protected void verifyAccess(PageParameters pageParameters) {
// Redirect to Login page on invalid access.
if (!isUserLoggedIn()) {
throw new RestartResponseAtInterceptPageException(Login.class);
}
else if (! isPageAllowed(pageParameters)) {
String url = pageParameters.getString(url);
if (url != null) {
throw new
AbortWithWebErrorCodeException(HttpServletResponse.SC_FORBIDDEN, url);
}
else {
throw new
AbortWithWebErrorCodeException(HttpServletResponse.SC_FORBIDDEN);
}
}
}

'verifyAccess' is called in the construction of the page.

The problem I'm having is when the page is not allowed.
We throw AbortWithWebErrorCodeException.

The user gets a 403 error page.
As expected, the onRuntimeException that configured in the WebApp is not
reached.

I thought to create a RuntimeException that will be thrown instead of the
AbortWithWebErrorCodeException(...) and to analyze it in the
onRuntimeException.
But, is there a way to map the 403 error page to another page? A setting of
the Application or even in the web.xml?

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


Re: Wicket and FileUpload on Google App Engine

2009-09-03 Thread Daniele Dellafiore
Great, seems interesting, I will give this a try. Thanks.

On Sun, Aug 30, 2009 at 6:31 PM, uud ashr uuda...@gmail.com wrote:

 Hi all
 Just want to share.
 If you have problem with file upload on Google App Engine, I just done some
 experiment and it works.
 Use the attached files.
 I didn't create this, I just modify from the existing wicket source code.

 I create new class, GaeSafeServletWebRequest which is subclass of
 ServletWebRequest. Everyting come from here.

 The key is remove the thread that clean the ReferenceQueue. So how to clean
 it? I use something called FileCleaner.reapFiles(2) that will poll the queue
 maximum 2 item. I put those line of code everytime GaeSafeServletWebRequest
 created.

 to use, you only need to override method *newWebRequest* on your wicket
 application

 @Override

 protected WebRequest newWebRequest(final HttpServletRequest
 servletRequest) {

 return new GaeSafeServletWebRequest(servletRequest);

 }


 When you upload something, then write it using *DatastoreOutputStream*, it
 will put all the bytes to GAE (Google App Engine) datastore. This
 OutputStream already handle the over size, so it will create chunk files in
 order to save the big file size.

 Please tell me if it works for you (actually it works for me) and maybe we
 can refine or create the better code. Or maybe we can add this to wicket? So
 wicket can be FULL COMPATIBLE to Google App Engine.

 Regards,
 uudashr


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




-- 
Daniele Dellafiore
http://blog.ildella.net
http://twitter.com/ildella


Re: UTF-8

2009-09-03 Thread Olivier Bourgeois
Allright, I fed the daemon ;)

I created a new issue in
https://issues.apache.org/jira/browse/WICKET-2451 and I found that
WICKET-1443 is similar but already closed since 1 year.

2009/9/2 Eelco Hillenius eelco.hillen...@gmail.com:
 The result is in the attachment file (sorry but I don't have a quick
 way to do a patch file against SVN trunk at the moment).

 The mailing list daemon thinks attachments are delicious. The way to
 submit patches is to attach it to a JIRA issue. Did anyone already
 open a feature request for this? If not, please open an issue here:
 http://issues.apache.org/jira/browse/WICKET. Further discussion and
 patches can go there.

 Cheers,

 Eelco

 -
 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



Getting the Ajax decorator of a link

2009-09-03 Thread Arie Fishler
Hi,

We have been implementing the getAjaxCallDecorator for links that
extends AjaxLink
in order to manipulate the way the wicket-ajax is called on these links.

I have a need to do something similar with a behavior and not sure how to
implement.

I have a behavior that is applied (added) to different links. This behavior
needs to manipulate and control when the actual wicket-ajax call is executed
for the link it is on.

It is like the behavior needs an access to the function call that activates
the ajax on the link. Is there a way for a behavior to get it?

Cheers,
Arie


Re: AbortWithWebErrorCodeException and RequestCycle newRequestCycle

2009-09-03 Thread Pedro Santos
I thought to create a RuntimeException that will be thrown instead of the
AbortWithWebErrorCodeException(...) and to analyze it in the
onRuntimeException.

don't you gona fall in to the same problem this way?

Set error page in web.xml
   ?xml version=1.0 encoding=iso-8859-1?
!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;
web-app


error-page
error-code
403
/error-code
location
/403.*html*
/location
/error-page

/web-app



On Thu, Sep 3, 2009 at 5:27 AM, Eyal Golan egola...@gmail.com wrote:

 Hello,
 We have in our application the following code:
/**
 * @see
 org.apache.wicket.Application#newRequestCycle(org.apache.wicket.Request,
 *  org.apache.wicket.Response)
 */
@Override
public RequestCycle newRequestCycle(final Request request,
final Response response) {
return new WebRequestCycle(this, (WebRequest) request,
(WebResponse) response) {

@Override
public Page onRuntimeException(Page page, RuntimeException e) {
if (DEPLOYMENT.equalsIgnoreCase(getConfigurationType())) {
if
 (PageExpiredException.class.isAssignableFrom(e.getClass())) {
return null;
} else {
e.printStackTrace();
System.out.println(e.getMessage());
return new InternalErrorPage(getErrorDisplay(e));
}
} else {
// In development we want to see the exception
return null;
}

}
};
}

 Also, in our base page we have this
protected void verifyAccess(PageParameters pageParameters) {
// Redirect to Login page on invalid access.
if (!isUserLoggedIn()) {
throw new RestartResponseAtInterceptPageException(Login.class);
}
else if (! isPageAllowed(pageParameters)) {
String url = pageParameters.getString(url);
if (url != null) {
throw new
 AbortWithWebErrorCodeException(HttpServletResponse.SC_FORBIDDEN, url);
}
else {
throw new
 AbortWithWebErrorCodeException(HttpServletResponse.SC_FORBIDDEN);
}
}
}

 'verifyAccess' is called in the construction of the page.

 The problem I'm having is when the page is not allowed.
 We throw AbortWithWebErrorCodeException.

 The user gets a 403 error page.
 As expected, the onRuntimeException that configured in the WebApp is not
 reached.

 I thought to create a RuntimeException that will be thrown instead of the
 AbortWithWebErrorCodeException(...) and to analyze it in the
 onRuntimeException.
 But, is there a way to map the 403 error page to another page? A setting of
 the Application or even in the web.xml?

 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



Re: Getting the Ajax decorator of a link

2009-09-03 Thread Pedro Santos
To one of the decorations script must to be appended the script responsible
to call the behavior. You can get it invoking the
AbstractDefaultAjaxBehavior.getCallbackScript() protected method.

On Thu, Sep 3, 2009 at 7:59 AM, Arie Fishler arie@gmail.com wrote:

 Hi,

 We have been implementing the getAjaxCallDecorator for links that
 extends AjaxLink
 in order to manipulate the way the wicket-ajax is called on these links.

 I have a need to do something similar with a behavior and not sure how to
 implement.

 I have a behavior that is applied (added) to different links. This behavior
 needs to manipulate and control when the actual wicket-ajax call is
 executed
 for the link it is on.

 It is like the behavior needs an access to the function call that activates
 the ajax on the link. Is there a way for a behavior to get it?

 Cheers,
 Arie



Re: How to use Apache Commons FileUpload in Wicket ?

2009-09-03 Thread FaRHaN
Sorry, i want to say how can i use this example to fulfill my uploading 
requirements ? 

As there is only one class (ReceiverServlet.java) for uploading in PickWick. I 
already knows its functionality but my question is that, Apache Commons 
FileUpload requires HttpServletRequest for parsing Request 
(servletFileUpload.parseRequest(httpServletRequest)). I don't have any 
experience of using Servlets in Wicket tha's why i want to know, How can we set 
or get HttpServletRequest in a wicket application, like in doGet()  doPost() 
in Servlets ?
 
Also, IMultipartWebRequest is required for uploading in Wicket. How can i cast 
it to HttpServletRequest, as an Exception occur while casting 
IMultipartWebRequest to HttpServletRequest.

Thanks...






From: FaRHaN farhan.ba...@ymail.com
To: users@wicket.apache.org
Sent: Thursday, September 3, 2009 1:16:19 PM
Subject: Re: How to use Apache Commons FileUpload in Wicket ?

How can i view PickWick Examples (with Code), from Pickwick-Wicket Stuff WIKI 
site?






From: Fernando Wermus fernando.wer...@gmail.com
To: users@wicket.apache.org
Sent: Wednesday, September 2, 2009 6:44:14 PM
Subject: Re: How to use Apache Commons FileUpload in Wicket ?

You have pickwick project that has an example exaclty as the way you want

On Wed, Sep 2, 2009 at 4:02 AM, FaRHaN farhan.ba...@ymail.com wrote:

 I want to upload a file using apache commons FileUpload API. As it requires
 HttpServletRequest for uploading files, but in wicket
 IMultipartWebRequest/IMultipartServletWebRequest is required for uploading
 purposes.

 How can I use apache commons FileUpload for uploading in Wicket ? Is there
 any example to do so ?

 Thanks...








-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


  

Re: clean way to avoid DynamicWebResource to look for non existing file

2009-09-03 Thread Pedro Santos
Hi Daniele, just an idea:
 @Override
 protected byte[] getImageData() {
String basePath = upload/images/;
Object name = logoModel.getObject();
File file = new File(., basePath + name);
LoggerFactory.getLogger(getClass()).info(serving file:  + file);
try {
   return IOUtils.toByteArray(new FileInputStream(file));
} catch (FileNotFoundException e) {
   e.printStackTrace();
} catch (IOException e) {
   e.printStackTrace();
}

DefaultButtonImageResource img = new
DefaultButtonImageResource(Image not found);
InputStream defautImg =
img.getResourceStream().getInputStream();
byte[] bytes = new byte[defautImg.available()];
defautImg.read(bytes);
return bytes;
 }
You can show an image with this message while not found an solution for the
null pointer exception.



On Wed, Sep 2, 2009 at 6:36 PM, Daniele Dellafiore ilde...@gmail.comwrote:

 Hi all, I use a DynamicWebResource to display images previously uploaded by
 user ion the context of my application. I have this DWR subclass:

   class LogoResource extends DynamicImageResource {

  private final IModel logoModel;

  public LogoResource(IModel model) {
 this.logoModel = model;
  }

  @Override
  protected byte[] getImageData() {
 String basePath = upload/images/;
 Object name = logoModel.getObject();
 File file = new File(., basePath + name);
 LoggerFactory.getLogger(getClass()).info(serving file:  + file);
 try {
return IOUtils.toByteArray(new FileInputStream(file));
 } catch (FileNotFoundException e) {
e.printStackTrace();
 } catch (IOException e) {
e.printStackTrace();
 }
 return null;
  }
   }

 now, when the file is found, everything is ok.
 When it is not, I receive a NullPo9nterException, this is the output when
 you can see my log and then the begin of the trace:

 INFO  - LogoResource - serving file: ./upload/images/null
 ERROR - RequestCycle   -
 java.lang.NullPointerException
at java.io.ByteArrayInputStream.init(ByteArrayInputStream.java:89)
at

 org.apache.wicket.markup.html.DynamicWebResource$1.getInputStream(DynamicWebResource.java:221)

at

 org.apache.wicket.request.target.resource.ResourceStreamRequestTarget.respond(ResourceStreamRequestTarget.java:160)

at

 org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)

at org.apache.wicket.RequestCycle.respond(RequestCycle.java:1267)

 This is annoying and, more important, it seems to cause the page not to
 reload properly. In fact when after a submit I call a setResponse on the
 same page, the page is not reloaded.

 At the end of all the exceptions, I get:

 WARN  - DataRequestCycle   - Completed exception handling for
 request [requestcy...@1ec3ffd thread=10193...@qtp-28693170-2]
 INFO  - DataRequestCycle   - Request ended
 [requestcy...@1ec3ffdthread=10193106@qtp-28693170-2](time:
 33

 And the page has the same URL as before, correclty, but not the new
 rendering: If I reload the page, I get the new stuff.

 In the same page I have other forms, with the same setResponse onSubmit,
 that work perfectly.
 Do you think that these exceptions could be the problem for the undone
 refresh? Or maybe is better to look elsewhere?

 And, in any case, there is a clean way to avoid the getImageData to be
 called if I do not have a file for the image?

 Thanks.

 --
 Daniele Dellafiore
 http://blog.ildella.net
 http://twitter.com/ildella



Re: Getting the Ajax decorator of a link

2009-09-03 Thread Arie Fishler
The behvavior is not AbstractDefaultAjaxBehavior just one extending
AbstractBehavior.

Can I get it somehow from the onComponentTag of the behavior? I actually
need the value that is placed in the onClick event (which has the action for
the link or button that has the behavior placed on)

My behavior just adds a function call before any other action and I want
this function call to resume the wicket action (ajax click on a link or
submit of a button) right after the function of the behavior is executed

On Thu, Sep 3, 2009 at 2:09 PM, Pedro Santos pedros...@gmail.com wrote:

 To one of the decorations script must to be appended the script responsible
 to call the behavior. You can get it invoking the
 AbstractDefaultAjaxBehavior.getCallbackScript() protected method.

 On Thu, Sep 3, 2009 at 7:59 AM, Arie Fishler arie@gmail.com wrote:

  Hi,
 
  We have been implementing the getAjaxCallDecorator for links that
  extends AjaxLink
  in order to manipulate the way the wicket-ajax is called on these links.
 
  I have a need to do something similar with a behavior and not sure how to
  implement.
 
  I have a behavior that is applied (added) to different links. This
 behavior
  needs to manipulate and control when the actual wicket-ajax call is
  executed
  for the link it is on.
 
  It is like the behavior needs an access to the function call that
 activates
  the ajax on the link. Is there a way for a behavior to get it?
 
  Cheers,
  Arie
 



Re: Getting the Ajax decorator of a link

2009-09-03 Thread Pedro Santos
value that is placed in the onClick event (which has the action for the
link or button that has the behavior placed on)
You has an parameter determining the action to be take, why don't you use
polimorfism?

My behavior just adds a function call before any other action and I want
this function call to resume the wicket action
You has an behavior common to onClick of a link or onSubmit of a button. Do
you consider to use inheritance instead of composition in this especific
case because:

I want this function call to resume the wicket action

public class CustomLink/CustomButton extends Link/Button{
@override
 onClick or onSubmit(){
callFunctionBeforeAnyOtherAction();
callAction();
}
protected abstrat void callAction();
}



On Thu, Sep 3, 2009 at 8:42 AM, Arie Fishler arie@gmail.com wrote:

 The behvavior is not AbstractDefaultAjaxBehavior just one extending
 AbstractBehavior.

 Can I get it somehow from the onComponentTag of the behavior? I actually
 need the value that is placed in the onClick event (which has the action
 for
 the link or button that has the behavior placed on)

 My behavior just adds a function call before any other action and I want
 this function call to resume the wicket action (ajax click on a link or
 submit of a button) right after the function of the behavior is executed

 On Thu, Sep 3, 2009 at 2:09 PM, Pedro Santos pedros...@gmail.com wrote:

  To one of the decorations script must to be appended the script
 responsible
  to call the behavior. You can get it invoking the
  AbstractDefaultAjaxBehavior.getCallbackScript() protected method.
 
  On Thu, Sep 3, 2009 at 7:59 AM, Arie Fishler arie@gmail.com wrote:
 
   Hi,
  
   We have been implementing the getAjaxCallDecorator for links that
   extends AjaxLink
   in order to manipulate the way the wicket-ajax is called on these
 links.
  
   I have a need to do something similar with a behavior and not sure how
 to
   implement.
  
   I have a behavior that is applied (added) to different links. This
  behavior
   needs to manipulate and control when the actual wicket-ajax call is
   executed
   for the link it is on.
  
   It is like the behavior needs an access to the function call that
  activates
   the ajax on the link. Is there a way for a behavior to get it?
  
   Cheers,
   Arie
  
 



Re: Getting the Ajax decorator of a link

2009-09-03 Thread Arie Fishler
Wel...this is the solution I wanted to avoid since this behavior can be
attached to buttons, links, ajax links...don't want to create onr for each.

I can use the tag from the oncomponenttag and find out where it is supposed
to go originallythis seems to be the option that will work

On Thu, Sep 3, 2009 at 3:04 PM, Pedro Santos pedros...@gmail.com wrote:

 value that is placed in the onClick event (which has the action for the
 link or button that has the behavior placed on)
 You has an parameter determining the action to be take, why don't you use
 polimorfism?

 My behavior just adds a function call before any other action and I want
 this function call to resume the wicket action
 You has an behavior common to onClick of a link or onSubmit of a button. Do
 you consider to use inheritance instead of composition in this especific
 case because:

 I want this function call to resume the wicket action

 public class CustomLink/CustomButton extends Link/Button{
@override
 onClick or onSubmit(){
callFunctionBeforeAnyOtherAction();
callAction();
}
protected abstrat void callAction();
  }



 On Thu, Sep 3, 2009 at 8:42 AM, Arie Fishler arie@gmail.com wrote:

  The behvavior is not AbstractDefaultAjaxBehavior just one extending
  AbstractBehavior.
 
  Can I get it somehow from the onComponentTag of the behavior? I actually
  need the value that is placed in the onClick event (which has the action
  for
  the link or button that has the behavior placed on)
 
  My behavior just adds a function call before any other action and I want
  this function call to resume the wicket action (ajax click on a link or
  submit of a button) right after the function of the behavior is executed
 
  On Thu, Sep 3, 2009 at 2:09 PM, Pedro Santos pedros...@gmail.com
 wrote:
 
   To one of the decorations script must to be appended the script
  responsible
   to call the behavior. You can get it invoking the
   AbstractDefaultAjaxBehavior.getCallbackScript() protected method.
  
   On Thu, Sep 3, 2009 at 7:59 AM, Arie Fishler arie@gmail.com
 wrote:
  
Hi,
   
We have been implementing the getAjaxCallDecorator for links that
extends AjaxLink
in order to manipulate the way the wicket-ajax is called on these
  links.
   
I have a need to do something similar with a behavior and not sure
 how
  to
implement.
   
I have a behavior that is applied (added) to different links. This
   behavior
needs to manipulate and control when the actual wicket-ajax call is
executed
for the link it is on.
   
It is like the behavior needs an access to the function call that
   activates
the ajax on the link. Is there a way for a behavior to get it?
   
Cheers,
Arie
   
  
 



Re: Getting the Ajax decorator of a link

2009-09-03 Thread Pedro Santos
I agree with you, the best solution for an attachable behavior is
composition. I just don't see it resolve that especial complexity: I want
this function call to resume the wicket action.
For example: the oncomponenttag is called on the page rendering, idependent
of the user interactions with the component were behavior is attached on,
and by default the behavior is stateless (they don’t have to keep the
reference to the components they’re attached to).
I'm curious to know your final solution


On Thu, Sep 3, 2009 at 9:14 AM, Arie Fishler arie@gmail.com wrote:

 Wel...this is the solution I wanted to avoid since this behavior can be
 attached to buttons, links, ajax links...don't want to create onr for each.

 I can use the tag from the oncomponenttag and find out where it is supposed
 to go originallythis seems to be the option that will work

 On Thu, Sep 3, 2009 at 3:04 PM, Pedro Santos pedros...@gmail.com wrote:

  value that is placed in the onClick event (which has the action for the
  link or button that has the behavior placed on)
  You has an parameter determining the action to be take, why don't you use
  polimorfism?
 
  My behavior just adds a function call before any other action and I want
  this function call to resume the wicket action
  You has an behavior common to onClick of a link or onSubmit of a button.
 Do
  you consider to use inheritance instead of composition in this especific
  case because:
 
  I want this function call to resume the wicket action
 
  public class CustomLink/CustomButton extends Link/Button{
 @override
  onClick or onSubmit(){
 callFunctionBeforeAnyOtherAction();
 callAction();
 }
 protected abstrat void callAction();
   }
 
 
 
  On Thu, Sep 3, 2009 at 8:42 AM, Arie Fishler arie@gmail.com wrote:
 
   The behvavior is not AbstractDefaultAjaxBehavior just one extending
   AbstractBehavior.
  
   Can I get it somehow from the onComponentTag of the behavior? I
 actually
   need the value that is placed in the onClick event (which has the
 action
   for
   the link or button that has the behavior placed on)
  
   My behavior just adds a function call before any other action and I
 want
   this function call to resume the wicket action (ajax click on a link or
   submit of a button) right after the function of the behavior is
 executed
  
   On Thu, Sep 3, 2009 at 2:09 PM, Pedro Santos pedros...@gmail.com
  wrote:
  
To one of the decorations script must to be appended the script
   responsible
to call the behavior. You can get it invoking the
AbstractDefaultAjaxBehavior.getCallbackScript() protected method.
   
On Thu, Sep 3, 2009 at 7:59 AM, Arie Fishler arie@gmail.com
  wrote:
   
 Hi,

 We have been implementing the getAjaxCallDecorator for links that
 extends AjaxLink
 in order to manipulate the way the wicket-ajax is called on these
   links.

 I have a need to do something similar with a behavior and not sure
  how
   to
 implement.

 I have a behavior that is applied (added) to different links. This
behavior
 needs to manipulate and control when the actual wicket-ajax call is
 executed
 for the link it is on.

 It is like the behavior needs an access to the function call that
activates
 the ajax on the link. Is there a way for a behavior to get it?

 Cheers,
 Arie

   
  
 



Re: AbortWithWebErrorCodeException and RequestCycle newRequestCycle

2009-09-03 Thread Eyal Golan
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 Thu, Sep 3, 2009 at 2:04 PM, Pedro Santos pedros...@gmail.com wrote:



 don't you gona fall in to the same problem this way?

-- No. because if I throw a RuntimeException, then I will catch it in the
onRuntimeError.


 Set error page in web.xml
   ?xml version=1.0 encoding=iso-8859-1?
 !DOCTYPE web-app
 PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
 http://java.sun.com/dtd/web-app_2_3.dtd;
 web-app


error-page
error-code
403
/error-code
location
/403.*html*
/location
/error-page

 /web-app


 --- Thanks. We'll try that. But is there a 'Wicket' way? If not, then I
guess we'll use this one.


 On Thu, Sep 3, 2009 at 5:27 AM, Eyal Golan egola...@gmail.com wrote:

  Hello,
  We have in our application the following code:
 /**
  * @see
  org.apache.wicket.Application#newRequestCycle(org.apache.wicket.Request,
  *  org.apache.wicket.Response)
  */
 @Override
 public RequestCycle newRequestCycle(final Request request,
 final Response response) {
 return new WebRequestCycle(this, (WebRequest) request,
 (WebResponse) response) {
 
 @Override
 public Page onRuntimeException(Page page, RuntimeException e)
 {
 if (DEPLOYMENT.equalsIgnoreCase(getConfigurationType())) {
 if
  (PageExpiredException.class.isAssignableFrom(e.getClass())) {
 return null;
 } else {
 e.printStackTrace();
 System.out.println(e.getMessage());
 return new InternalErrorPage(getErrorDisplay(e));
 }
 } else {
 // In development we want to see the exception
 return null;
 }
 
 }
 };
 }
 
  Also, in our base page we have this
 protected void verifyAccess(PageParameters pageParameters) {
 // Redirect to Login page on invalid access.
 if (!isUserLoggedIn()) {
 throw new
 RestartResponseAtInterceptPageException(Login.class);
 }
 else if (! isPageAllowed(pageParameters)) {
 String url = pageParameters.getString(url);
 if (url != null) {
 throw new
  AbortWithWebErrorCodeException(HttpServletResponse.SC_FORBIDDEN, url);
 }
 else {
 throw new
  AbortWithWebErrorCodeException(HttpServletResponse.SC_FORBIDDEN);
 }
 }
 }
 
  'verifyAccess' is called in the construction of the page.
 
  The problem I'm having is when the page is not allowed.
  We throw AbortWithWebErrorCodeException.
 
  The user gets a 403 error page.
  As expected, the onRuntimeException that configured in the WebApp is not
  reached.
 
  I thought to create a RuntimeException that will be thrown instead of the
  AbortWithWebErrorCodeException(...) and to analyze it in the
  onRuntimeException.
  But, is there a way to map the 403 error page to another page? A setting
 of
  the Application or even in the web.xml?
 
  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
 



StackOverflowError on cluster failover.

2009-09-03 Thread HarriSoft Ltd

Hi,

Firstly, I'm using Tomcat 5.5 and Wicket 1.3.5

I've recently been tasked with running our current application in a
clustered environment.  Having got the cluster configured (sticky sessions
and session replication) I figured the app should run without a problem
and it does, mostly.

I've found a problem whereby it does not appear that the DiskPageStore
file is being clustered correctly (its also possible that I've missed
something)..  Our app has a feature that lets the user navigate backwards
from the current page, retrieving the previous pages from the
DiskPageStore and providing links on the pages (Back to SearchResults,
previous page, etc.) to allow for backwards navigation.  On a single
server this works, but in a clustered environment if the session was
created on server A, then if server A failed over to server B, Wicket
throws a StackOverflowError (Top of the stack trace is below).  Has
anybody seen this behaviour before?  I have seen some comments about
clusters failing over and exceptions being thrown on a subsequent use of
the back button; is this still the case as that is essentially what we are
doing with pages in a flow.

Any help appreciated.

java.lang.StackOverflowError
java.io.ObjectStreamClass.readNonProxy(ObjectStreamClass.java:600)

java.io.ObjectInputStream.readClassDescriptor(ObjectInputStream.java:789)
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1534)
java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)

java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)

org.joda.time.chrono.ISOChronology$Stub.readObject(ISOChronology.java:210)
sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)
java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809)

java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)

java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)

java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)

java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
java.util.ArrayList.readObject(ArrayList.java:591)
sun.reflect.GeneratedMethodAccessor33.invoke(Unknown Source)

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)
java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809)

java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)

java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
java.io.ObjectInputStream.readArray(ObjectInputStream.java:1634)
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)

java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:393)


Re: How to use Apache Commons FileUpload in Wicket ?

2009-09-03 Thread Fernando Wermus
public class UploadRequestTarget implements IRequestTarget {




 public void detach(RequestCycle requestCycle) {}


 @SuppressWarnings({ static-access, unchecked })

public void respond(RequestCycle requestCycle) {

HttpServletRequest
request=((WebRequest)requestCycle.getRequest()).getHttpServletRequest();

HttpServletResponse
response=((WebResponse)requestCycle.getResponse()).getHttpServletResponse();


  response.setHeader(Connection,close);



FileItemFactory factory = new DiskFileItemFactory();

ServletFileUpload upload = new ServletFileUpload(factory);


List items=null;

PrintWriter out=null;

try {

out = response.getWriter();

items = upload.parseRequest(request);

 for (int i = 0; i  items.size(); i++) {

DiskFileItem item = (DiskFileItem) items.get(i);

// As we are interested not in regular form fields, we filter
only files

if (!item.isFormField()) {

String FileName=...

item.write(new File(fileName));

out.print(RESP.100);

out.flush();

}

}

// deberia crear el album

} catch (FileUploadException e1) {

out.print(RESP.200);

// flush the stream to speed up applet notification

out.flush();

e1.printStackTrace();

} catch (Exception e) {

e.printStackTrace();

}

 }


}


On Thu, Sep 3, 2009 at 8:11 AM, FaRHaN farhan.ba...@ymail.com wrote:

 Sorry, i want to say how can i use this example to fulfill my uploading
 requirements ?

 As there is only one class (ReceiverServlet.java) for uploading in
 PickWick. I already knows its functionality but my question is that, Apache
 Commons FileUpload requires HttpServletRequest for parsing Request
 (servletFileUpload.parseRequest(httpServletRequest)). I don't have any
 experience of using Servlets in Wicket tha's why i want to know, How can we
 set or get HttpServletRequest in a wicket application, like in doGet() 
 doPost() in Servlets ?

 Also, IMultipartWebRequest is required for uploading in Wicket. How can i
 cast it to HttpServletRequest, as an Exception occur while casting
 IMultipartWebRequest to HttpServletRequest.

 Thanks...





 
 From: FaRHaN farhan.ba...@ymail.com
 To: users@wicket.apache.org
 Sent: Thursday, September 3, 2009 1:16:19 PM
 Subject: Re: How to use Apache Commons FileUpload in Wicket ?

 How can i view PickWick Examples (with Code), from Pickwick-Wicket Stuff
 WIKI site?





 
 From: Fernando Wermus fernando.wer...@gmail.com
 To: users@wicket.apache.org
 Sent: Wednesday, September 2, 2009 6:44:14 PM
 Subject: Re: How to use Apache Commons FileUpload in Wicket ?

 You have pickwick project that has an example exaclty as the way you want

 On Wed, Sep 2, 2009 at 4:02 AM, FaRHaN farhan.ba...@ymail.com wrote:

  I want to upload a file using apache commons FileUpload API. As it
 requires
  HttpServletRequest for uploading files, but in wicket
  IMultipartWebRequest/IMultipartServletWebRequest is required for
 uploading
  purposes.
 
  How can I use apache commons FileUpload for uploading in Wicket ? Is
 there
  any example to do so ?
 
  Thanks...
 
 
 
 




 --
 Fernando Wermus.

 www.linkedin.com/in/fernandowermus







-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: using a panel inside dropdown

2009-09-03 Thread fachhoch

Is this possible or not , please tell me if there is any option to put a
panel inside a dropdownchoice ?

fachhoch wrote:
 
 Can I add a panel to a dropdown choice , I have to display lot of
 information inside drop down , I am wondering If I can do this ?
 
 

-- 
View this message in context: 
http://www.nabble.com/using-a-panel-inside-dropdown-tp25264289p25276617.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: using a panel inside dropdown

2009-09-03 Thread Michael Mosmann
Am Donnerstag, den 03.09.2009, 06:56 -0700 schrieb fachhoch:
 Is this possible or not , please tell me if there is any option to put a
 panel inside a dropdownchoice ?

AFAIK you can not place any tag inside an select-Tag.. so you need some
javascript-menu-stuff...

.. don't know, if you can find something on wicketstuff.org

mm:)


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



Re: using a panel inside dropdown

2009-09-03 Thread Michael O'Cleirigh

Hello,

Look at SelectOptions and SelectOption in wicket-extensions they give 
more control over the structure of the HTML select/select that is 
ultimately rendered.


SelectOption does extend WebMarkupContainer so it should be possible to 
add your panel to the option and have it included within the Select.


overriding SelectOptions.newOption(...) may be enough to add in your 
custom panel.


Regards,

Mike

Is this possible or not , please tell me if there is any option to put a
panel inside a dropdownchoice ?

fachhoch wrote:
  

Can I add a panel to a dropdown choice , I have to display lot of
information inside drop down , I am wondering If I can do this ?





  




Re: Article in german Javamagazin

2009-09-03 Thread Jonathan Locke


btw, is this a print magazine?


Rüdiger_Schulz wrote:
 
 Hello everybody,
 
 the next issue of german Javamagazin (http://www.javamagazin.de/) has
 their
 title story about Wicket. It consists of two articles. One technical one,
 showing basic setup and principles of Wicket, and another about practical
 use of the framework.
 
 Despite constructive criticism (e.g. Wiki needs much better structuring to
 find anything useful, markup hierarchy and wicket:ids have to match Java
 code, without tool support for refactoring) they give a strong
 recommendation for using Wicket, and regard it on par with the industry
 standard JSF.
 
 So thumbs up to all of you Wicket devs, and hopefully this will lead to a
 little wider spreading of Wicket!
 
 
 
 greetings from Berlin,
 
 Rüdiger Schulz
 
 

-- 
View this message in context: 
http://www.nabble.com/Article-in-german-Javamagazin-tp25255240p25279403.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



Setting Datasource at Runtime

2009-09-03 Thread jpalmer1026





I'm using Wicket to develop an app and have stumbled upon a roadblock.
I'd like the user to be able to select their desired datasource at
runtime, as opposed to hardcoding the datasource in the persistence.xml
file (we're using Spring and JPA). I feel like this should be
reasonably simple to do, but I haven't been able to come up with a
solution. Does anyone know of a way to do this?







Re: Setting Datasource at Runtime

2009-09-03 Thread Igor Vaynberg
not exactly a wicket question...

-igor

On Thu, Sep 3, 2009 at 9:30 AM, jpalmer1...@mchsi.com wrote:
 I'm using Wicket to develop an app and have stumbled upon a roadblock. I'd
 like the user to be able to select their desired datasource at runtime, as
 opposed to hardcoding the datasource in the persistence.xml file (we're
 using Spring and JPA). I feel like this should be reasonably simple to do,
 but I haven't been able to come up with a solution. Does anyone know of a
 way to do this?

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



Re: Wicket cuts off posted data

2009-09-03 Thread Jeremy Thomerson
Can you use HttpFox (or similar) to confirm that it's a POST?  I suspect
it's a GET.

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



On Thu, Sep 3, 2009 at 10:10 AM, Gatos ega...@gmail.com wrote:

 Hello,

 I have a very long text that was truncated after submitting the form.
 How is it possible to enlarge allowed posted data?


 Thank you



Re: Article in german Javamagazin

2009-09-03 Thread Jonathan Locke


if anyone from javamagazin is reading this list, would love to add a copy of
this to my growing collection of wicket publications.


RaBe wrote:
 
 yes, it is.
 
 http://it-republik.de/jaxenter/java-magazin-ausgaben/Wicket-000321.html
 
 could not find a online version of this article ..
 
 On Thu, Sep 3, 2009 at 18:19, Jonathan Lockejonathan.lo...@gmail.com
 wrote:


 btw, is this a print magazine?

 
 -
 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/Article-in-german-Javamagazin-tp25255240p25281388.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



AjaxFallbackDefaultDataTable, navigation toolbar disappears

2009-09-03 Thread tubin gen
I am using   AjaxFallbackDefaultDataTable ,My page has a search form and
AjaxFallbackDefaultDataTable , so whenever search from is submitted I am
adding the panel which contains  AjaxFallbackDefaultDataTable   to
AjaxTarget ,
Initially when page loads I get the  navigation toolbar everything is fine,
user uses the search ,supppose this search did not return any results,
I dont see the navigation toolbar that is fine ,
now when uses searches again   this time  the result count is 1000 , so I
should see the navigation toolbar ,but it   does not appear , I feel once
the   AjaxFallbackDefaultDataTable removes the  navigation toolbar it does
not reappear please tell what  might be going wrong , and how to debug this
issue?


Re: AjaxFallbackDefaultDataTable, navigation toolbar disappears

2009-09-03 Thread Igor Vaynberg
use wicket 1.4.1, fixed there.

-igor

On Thu, Sep 3, 2009 at 12:04 PM, tubin genfachh...@gmail.com wrote:
 I am using   AjaxFallbackDefaultDataTable ,My page has a search form and
 AjaxFallbackDefaultDataTable , so whenever search from is submitted I am
 adding the panel which contains  AjaxFallbackDefaultDataTable   to
 AjaxTarget ,
 Initially when page loads I get the  navigation toolbar everything is fine,
 user uses the search ,supppose this search did not return any results,
 I dont see the navigation toolbar that is fine ,
 now when uses searches again   this time  the result count is 1000 , so I
 should see the navigation toolbar ,but it   does not appear , I feel once
 the   AjaxFallbackDefaultDataTable removes the  navigation toolbar it does
 not reappear please tell what  might be going wrong , and how to debug this
 issue?


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



Re: AjaxFallbackDefaultDataTable, navigation toolbar disappears

2009-09-03 Thread fachhoch

yes it fixed it , I found 1.4.1 for most  of wicket I am using but did not
find for org.wicketstuff.jquery ,please tell me where to find this 

igor.vaynberg wrote:
 
 use wicket 1.4.1, fixed there.
 
 -igor
 
 On Thu, Sep 3, 2009 at 12:04 PM, tubin genfachh...@gmail.com wrote:
 I am using   AjaxFallbackDefaultDataTable ,My page has a search form and
 AjaxFallbackDefaultDataTable , so whenever search from is submitted I am
 adding the panel which contains  AjaxFallbackDefaultDataTable   to
 AjaxTarget ,
 Initially when page loads I get the  navigation toolbar everything is
 fine,
 user uses the search ,supppose this search did not return any results,
 I dont see the navigation toolbar that is fine ,
 now when uses searches again   this time  the result count is 1000 , so I
 should see the navigation toolbar ,but it   does not appear , I feel once
 the   AjaxFallbackDefaultDataTable removes the  navigation toolbar it
 does
 not reappear please tell what  might be going wrong , and how to debug
 this
 issue?

 
 -
 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/AjaxFallbackDefaultDataTable%2C-navigation-toolbar-disappears-tp25282357p25282612.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



ajax - navigate to new location

2009-09-03 Thread Douglas Ferguson
target.prependJavascript(window.location.href=google.com);

Is there a better way of doing this?


Re: Wicket cuts off posted data

2009-09-03 Thread Adrian Merrall
Gatos,

How is it possible to enlarge allowed posted data?



No idea of your platform so it's difficult to be say exactly.  However,
assuming you are on tomcat then maxPostSize is what you want (
http://tomcat.apache.org/tomcat-5.5-doc/config/http.html).

As mentioned by the other respondents, are you sure its a POST? The 2MB
default for Tomcat is still a butt load of text unless people are sending
XML documents via a post or similar.

HTH
Adrian
Auckland, NZ


german wicket book example code

2009-09-03 Thread Michael Mosmann
Hi,

.. you can download (http://www.wicket-praxis.de/blog/download/) all
code examples from my german wicket book (praxisbuch wicket). All you
need is java and maven, so feel free to test it.

Michael Mosmann



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



WebMarkupContainer Ajax update problem

2009-09-03 Thread Altuğ B . Altıntaş
Hi ;

In Panel I have a  AjaxButton

In that  AjaxButton, I tried to update the background (Parent Pages's
WebMarkupContainer). Here is the simplified code :

 AjaxButton vote = new AjaxButton(Vote) {

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

.
   WebMarkupContainer content =  (WebMarkupContainer)
super.findPage().get(Content);
   content.add(new SimpleAttributeModifier(id,
content_selected)) ;
   target.addComponent(content);
}


Also I set WebMarkupContainer.setOutputMarkupId(true);  in my parent page

Any suggestions ?

Thanks.

-- 
Altuğ.


RE: WebMarkupContainer Ajax update problem

2009-09-03 Thread Russell Simpkins

Have you tried:
content..add(new SimpleAttributeModifier(style, background-image=url(...)));
I haven't done this, but you might also be able to do:
content.add(new SimpleAttributeModifier(class, new-class-name));

 Date: Fri, 4 Sep 2009 01:57:36 +0300
 Subject: WebMarkupContainer Ajax update problem
 From: alt...@gmail.com
 To: users@wicket.apache.org
 
 Hi ;
 
 In Panel I have a  AjaxButton
 
 In that  AjaxButton, I tried to update the background (Parent Pages's
 WebMarkupContainer). Here is the simplified code :
 
  AjaxButton vote = new AjaxButton(Vote) {
 
 @Override
 protected void onSubmit(AjaxRequestTarget target,
 Form? form) {
 
 .
WebMarkupContainer content =  (WebMarkupContainer)
 super.findPage().get(Content);
content.add(new SimpleAttributeModifier(id,
 content_selected)) ;
target.addComponent(content);
 }
 
 
 Also I set WebMarkupContainer.setOutputMarkupId(true);  in my parent page
 
 Any suggestions ?
 
 Thanks.
 
 -- 
 Altuğ.

_
With Windows Live, you can organize, edit, and share your photos.
http://www.windowslive.com/Desktop/PhotoGallery

RE: border error

2009-09-03 Thread Chris Colman
I'm having trouble with borders as well.

This markup is within a page and I use a component resolver and in the
debug I see requests for the 'primaryWrapper' (PrimaryWrapper is a class
derived from Border. I then see the resolve request to resolve
'aboutUsPanel'. The panel is created and added to the MarkupContainer
passed into the resolve method (maybe in a border it needs to be
addAuto'd to a different parent perhaps?)

If I replace the aboutUsPanel span tag with some literal text everything
worlds fine. It appears to be a problem with the nesting of a panel
within the border component.


wicket:extend
div id=content
div wicket:id=primaryWrapper
span wicket:id=aboutUsPanel /
/div

div wicket:id = secondaryWrapper
Some text
/div
/div
/wicket:extend


The error I get is:

ERROR - RequestCycle   - Tag expected
[markup =
wicket\markup\com\sas\av\ui\wicket\templates\original\PrimaryWrapper_35.
html
html
body
wicket:border

!-- start primary section --
div id=primary-section  class=post
Hi there
wicket:body/
Yo
/div

/wicket:border
/body
/html
, index = 4, current = [Raw markup]]
org.apache.wicket.markup.MarkupException: Tag expected
[markup =
wicket\markup\com\sas\av\ui\wicket\templates\original\PrimaryWrapper_35.
html
html
body
wicket:border

!-- start primary section --
div id=primary-section  class=post
Hi there
wicket:body/
Yo
/div

/wicket:border
/body
/html
, index = 4, current = [Raw markup]]
at
org.apache.wicket.markup.MarkupStream.throwMarkupException(MarkupStream.
java:465)
at
org.apache.wicket.markup.MarkupStream.getTag(MarkupStream.java:269)
at org.apache.wicket.Component.render(Component.java:2433)
at org.apache.wicket.Component.render(Component.java:2405)
at
org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:225)
at
org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:250)
at
com.sas.av.ui.wicket.templates.original.ComponentLibraryResolver.resolve
(ComponentLibraryResolver.java:85)
at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1441)
at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer
.java:1601)
at
org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.jav
a:1525)
at
org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onCompon
entTagBody(Border.java:380)
at
org.apache.wicket.Component.renderComponent(Component.java:2626)
at
org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1536)
at org.apache.wicket.Component.render(Component.java:2457)
at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1414)
at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer
.java:1601)
at
org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer
.java:675)
at
org.apache.wicket.markup.html.border.Border.onComponentTagBody(Border.ja
va:305)
at
org.apache.wicket.Component.renderComponent(Component.java:2626)
at
org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1536)
at org.apache.wicket.Component.render(Component.java:2457)
at org.apache.wicket.Component.render(Component.java:2405)
at
org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:225)
at
org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:250)
at
com.sas.av.ui.wicket.templates.original.ComponentLibraryResolver.resolve
(ComponentLibraryResolver.java:85)


Back in my day we didn't need Tapestry, or Wicket or WebObjects, or
even Servlets, or for that matter Java! We just coded in plain assembly
language. And before that we had to just type in 1's and 0's. Sometimes
we didn't even have 1's. I once had to code for an entire month,
barefoot, in the dead of winter, using just 0's... but you didn't hear
me complaining.


 -Original Message-
 From: Jason Lea [mailto:ja...@kumachan.net.nz]
 Sent: Saturday, 18 July 2009 8:12 AM
 To: users@wicket.apache.org
 Subject: Re: border error
 
 is it due to closing the tabs div with the short version div /
instead
 of div/div?
 I had a feeling wicket doesn't like the div / version...
 
 Fernando Wermus wrote:
  Igor,
  Here it is: the border is in the page.
 
  wicket:extend
  div wicket:id=tabs /
  div wicket:id=border
 
  span wicket:id=labellabel contents here/span
  /div
  /wicket:extend
 
  On Fri, Jul 17, 2009 at 1:34 PM, Igor Vaynberg
 igor.vaynb...@gmail.comwrote:
 
 
  you dont have div wicket:id=border/div in
PaginaTestBorder.html
 

RE: border error

2009-09-03 Thread Chris Colman
I wonder if this border crash could be fixed by:

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

This issue was resovled around 2009/8/31 but the latest 1.4.1 build is
dated 2009/8/16.

Are there any nightly builds available for download anywhere or do we
have to get a svn dump and build it ourselves in order to get the latest
version?

Regards,
Chris

Back in my day we didn't need Tapestry, or Wicket or WebObjects, or
even Servlets, or for that matter Java! We just coded in plain assembly
language. And before that we had to just type in 1's and 0's. Sometimes
we didn't even have 1's. I once had to code for an entire month,
barefoot, in the dead of winter, using just 0's... but you didn't hear
me complaining.


 -Original Message-
 From: Chris Colman [mailto:chr...@stepaheadsoftware.com]
 Sent: Friday, 4 September 2009 11:05 AM
 To: users@wicket.apache.org
 Subject: RE: border error
 
 I'm having trouble with borders as well.
 
 This markup is within a page and I use a component resolver and in the
 debug I see requests for the 'primaryWrapper' (PrimaryWrapper is a
class
 derived from Border. I then see the resolve request to resolve
 'aboutUsPanel'. The panel is created and added to the MarkupContainer
 passed into the resolve method (maybe in a border it needs to be
 addAuto'd to a different parent perhaps?)
 
 If I replace the aboutUsPanel span tag with some literal text
everything
 worlds fine. It appears to be a problem with the nesting of a panel
 within the border component.
 
 
 wicket:extend
   div id=content
   div wicket:id=primaryWrapper
   span wicket:id=aboutUsPanel /
   /div
 
   div wicket:id = secondaryWrapper
   Some text
   /div
   /div
 /wicket:extend
 
 
 The error I get is:
 
 ERROR - RequestCycle   - Tag expected
 [markup =

wicket\markup\com\sas\av\ui\wicket\templates\original\PrimaryWrapper_35.
 html
 html
 body
 wicket:border
 
 !-- start primary section --
 div id=primary-section  class=post
 Hi there
 wicket:body/
 Yo
 /div
 
 /wicket:border
 /body
 /html
 , index = 4, current = [Raw markup]]
 org.apache.wicket.markup.MarkupException: Tag expected
 [markup =

wicket\markup\com\sas\av\ui\wicket\templates\original\PrimaryWrapper_35.
 html
 html
 body
 wicket:border
 
 !-- start primary section --
 div id=primary-section  class=post
 Hi there
 wicket:body/
 Yo
 /div
 
 /wicket:border
 /body
 /html
 , index = 4, current = [Raw markup]]
 at

org.apache.wicket.markup.MarkupStream.throwMarkupException(MarkupStream.
 java:465)
 at
 org.apache.wicket.markup.MarkupStream.getTag(MarkupStream.java:269)
 at org.apache.wicket.Component.render(Component.java:2433)
 at org.apache.wicket.Component.render(Component.java:2405)
 at
 org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:225)
 at
 org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:250)
 at

com.sas.av.ui.wicket.templates.original.ComponentLibraryResolver.resolve
 (ComponentLibraryResolver.java:85)
 at

org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1441)
 at

org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer
 .java:1601)
 at

org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.jav
 a:1525)
 at

org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onCompon
 entTagBody(Border.java:380)
 at
 org.apache.wicket.Component.renderComponent(Component.java:2626)
 at
 org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1536)
 at org.apache.wicket.Component.render(Component.java:2457)
 at

org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1414)
 at

org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer
 .java:1601)
 at

org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer
 .java:675)
 at

org.apache.wicket.markup.html.border.Border.onComponentTagBody(Border.ja
 va:305)
 at
 org.apache.wicket.Component.renderComponent(Component.java:2626)
 at
 org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1536)
 at org.apache.wicket.Component.render(Component.java:2457)
 at org.apache.wicket.Component.render(Component.java:2405)
 at
 org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:225)
 at
 org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:250)
 at

com.sas.av.ui.wicket.templates.original.ComponentLibraryResolver.resolve
 (ComponentLibraryResolver.java:85)
 
 
 Back in my day we didn't need Tapestry, or Wicket or 

How to render part of component's markup and the very end of HTML document?

2009-09-03 Thread Petr Fejfar
Hi all,

I'm trying to wrap some jQuery plugins as a wicket
component but I met a problems with positions calculated
by jQuery's script in some page layouts controlled by
a mix of absolute and relative DIV's positions.

Plugin's author recommends to render part of markup
at the very end of markup just before /body tag.

How to achieve this in Wicket's component oriented
environment? What would be the best technique?


Thanks, Petr

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