Re: Injecting proxy services in page.

2013-06-18 Thread martin.dilger
To be honest, I dont understand exactly what the Problem is.
If you work with Spring-Beans, they are normally safe to serialize, as its
only the proxy. 
We´ve done this all the time (even with older wicket versions) without any
problems.
It looks like you have some Classpath-Issue here. The Service-Class you
mentioned, is that an Interface or do you work with the concrete
Implementation. I got similar Issues when working with
Implementation-Classes and CGLib.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Injecting-proxy-services-in-page-tp4659209p4659580.html
Sent from the Users forum 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: Form submit without redirection

2013-06-18 Thread martin.dilger
If you work with JQuery and Validation, why dont you use Ajax to Submit your
form? You could attach your errors to the AjaxRequestTarget as JavaScript /
JSON and process it on the client-side, which would be far better that using
PageParameters instead? 



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Form-submit-without-redirection-tp4659496p4659581.html
Sent from the Users forum 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: Empy choices durring unit tests with DropDownChoice

2013-06-18 Thread martin.dilger
Dmitriy, Dmitriy...:)

Never ever call getObject() on your LoadableDetachable Model in the
Constructor of your Component (I taught you better!!:)).

Should be:
new DropDownChoice(aWicketId, yourModel,new ChoicesModel(),
myOwnChoicesRenderer) 

Mind the second Parameter, as this is your Model that gets Populated on
Selection, try this.

You should further check whether you service has been called
Mockito.verify(myService).getChoicesList()





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Empy-choices-durring-unit-tests-with-DropDownChoice-tp4659540p4659583.html
Sent from the Users forum 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: Server side caching of generated resources

2013-06-18 Thread Michael Haitz
Hi,

if you describe your process a bit more, i could help you out. In one of my 
projects we render additional/browser specific css files like all
other css files (except the browser checks based on ClientProperties, no 
conditional comments and so on).

Do you know https://github.com/scottjehl/Respond?

best,
Michael

Am 17.06.2013 um 17:30 schrieb Thomas Heigl tho...@umschalt.com:

 Hey Michael,
 
 but isn't it enough to send the correct cache headers + a calculated
 filename that contains the hash of file?
 
 
 I actually have aggressive caching and a CDN in front of my resources. So
 in 90% of cases, a resource is only generated once per deployment. My
 problem is that I need to fetch some resources directly from my origin to
 support media queries for IE=8 and avoid running into cross-domain issues.
 So between 5 and 10% of users directly hit my origin for CSS resources and
 the load generated by this is getting too high.
 
 Thanks a lot for your suggestions. I'll try to think of a solution that
 does not involve Wicket.
 
 Cheers,
 
 Thomas
 
 
 
 On Mon, Jun 17, 2013 at 4:57 PM, Michael Haitz michael.ha...@1und1.dewrote:
 
 Hi,
 
 but isn't it enough to send the correct cache headers + a calculated
 filename that contains the hash of file?
 I think caching on your container isn't the best option (using nginx or
 varnish or a CDN like Akamai or something similar is way better), else
 you've to compile each resource on all your containers and you need some
 heap space for the content.
 
 best,
 Michael
 
 Am 17.06.2013 um 16:02 schrieb Michael Haitz michael.ha...@1und1.de
 :
 
 Hi Thomas,
 
 it depends on your deployment mode:
 
 if (application.usesDevelopmentConfig())
 {
  // development mode:
  // use last-modified timestamp of packaged resource for resource
 caching
  // cache the version information for the lifetime of the current
 http request
  resourceVersion = new RequestCycleCachedResourceVersion(
  new LastModifiedResourceVersion());
 }
 else
 {
  // deployment mode:
  // use message digest over resource content for resource caching
  // cache the version information for the lifetime of the
 application
  resourceVersion = new CachingResourceVersion(new
 MessageDigestResourceVersion());
 }
 
 best,
 Michael
 
 
 Am 17.06.2013 um 15:21 schrieb Thomas Heigl tho...@umschalt.com:
 
 Hi all,
 
 I was wondering if Wicket has a built-in mechanism for caching the
 generated byte[] of package resources. I use concatenated resource
 bundles
 that are compressed using the YUI CSS/JS compressors.
 
 Using the default settings, compression is performed for every request
 that
 does not have it in the client cache. Since this compression is a very
 complex operation I'd like to perform it only once.
 
 Cheers,
 
 Thomas
 
 
 -
 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: Server side caching of generated resources

2013-06-18 Thread Thomas Heigl
Hey Michael,

Yeah respond.js is exactly what we are using. However, I overlooked that it
kind of supports CDN/X-Domain via a local proxy. The solution looks a bit
complicated but I'll give it a try now. If it works it would solve my
original issue.

Cheers,

Thomas


On Tue, Jun 18, 2013 at 10:11 AM, Michael Haitz michael.ha...@1und1.dewrote:

 Hi,

 if you describe your process a bit more, i could help you out. In one of
 my projects we render additional/browser specific css files like all
 other css files (except the browser checks based on ClientProperties, no
 conditional comments and so on).

 Do you know https://github.com/scottjehl/Respond?

 best,
 Michael

 Am 17.06.2013 um 17:30 schrieb Thomas Heigl tho...@umschalt.com:

  Hey Michael,
 
  but isn't it enough to send the correct cache headers + a calculated
  filename that contains the hash of file?
 
 
  I actually have aggressive caching and a CDN in front of my resources. So
  in 90% of cases, a resource is only generated once per deployment. My
  problem is that I need to fetch some resources directly from my origin to
  support media queries for IE=8 and avoid running into cross-domain
 issues.
  So between 5 and 10% of users directly hit my origin for CSS resources
 and
  the load generated by this is getting too high.
 
  Thanks a lot for your suggestions. I'll try to think of a solution that
  does not involve Wicket.
 
  Cheers,
 
  Thomas
 
 
 
  On Mon, Jun 17, 2013 at 4:57 PM, Michael Haitz michael.ha...@1und1.de
 wrote:
 
  Hi,
 
  but isn't it enough to send the correct cache headers + a calculated
  filename that contains the hash of file?
  I think caching on your container isn't the best option (using nginx or
  varnish or a CDN like Akamai or something similar is way better), else
  you've to compile each resource on all your containers and you need some
  heap space for the content.
 
  best,
  Michael
 
  Am 17.06.2013 um 16:02 schrieb Michael Haitz michael.ha...@1und1.de
  :
 
  Hi Thomas,
 
  it depends on your deployment mode:
 
  if (application.usesDevelopmentConfig())
  {
   // development mode:
   // use last-modified timestamp of packaged resource for resource
  caching
   // cache the version information for the lifetime of the current
  http request
   resourceVersion = new RequestCycleCachedResourceVersion(
   new LastModifiedResourceVersion());
  }
  else
  {
   // deployment mode:
   // use message digest over resource content for resource caching
   // cache the version information for the lifetime of the
  application
   resourceVersion = new CachingResourceVersion(new
  MessageDigestResourceVersion());
  }
 
  best,
  Michael
 
 
  Am 17.06.2013 um 15:21 schrieb Thomas Heigl tho...@umschalt.com:
 
  Hi all,
 
  I was wondering if Wicket has a built-in mechanism for caching the
  generated byte[] of package resources. I use concatenated resource
  bundles
  that are compressed using the YUI CSS/JS compressors.
 
  Using the default settings, compression is performed for every request
  that
  does not have it in the client cache. Since this compression is a very
  complex operation I'd like to perform it only once.
 
  Cheers,
 
  Thomas
 
 
  -
  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: Empy choices durring unit tests with DropDownChoice

2013-06-18 Thread Dmitriy Neretin
:)) You should better dive into your new project :))

It didn't work... And I don't have any idea why...

The constructor (id, myModel, choicesModel, renderer) didn't work too :))
But the example is too complicated to discuss it here. But it works fine if
I use this:

(id, choisesModel, renderer) and then getConvertedValue (in the overriden
submit of the form above )

Dmitriy

2013/6/18 martin.dilger martin.dil...@googlemail.com

 Dmitriy, Dmitriy...:)

 Never ever call getObject() on your LoadableDetachable Model in the
 Constructor of your Component (I taught you better!!:)).

 Should be:
 new DropDownChoice(aWicketId, yourModel,new ChoicesModel(),
 myOwnChoicesRenderer)

 Mind the second Parameter, as this is your Model that gets Populated on
 Selection, try this.

 You should further check whether you service has been called
 Mockito.verify(myService).getChoicesList()





 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Empy-choices-durring-unit-tests-with-DropDownChoice-tp4659540p4659583.html
 Sent from the Users forum 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: wicket and flow

2013-06-18 Thread Piratenvisier

Thank you Martin.
Now I started another evaluation process after studying spring Webflow 
and Seam
an especially this discussion 
http://http://ptrthomas.wordpress.com/2007/03/02/wicket-impressions-moving-from-spring-mvc-webflow/ 
lets me think more profoundly about the subject.

In cocoon I tried the flow subject with spring apllicationXML files
After some time with growing XML-structures it was rather tedious to 
find out the reason
of a flow problem. In wicket I tried it with HashMap in the 
Wicketapplication.
But the maintenance became also tedious. After the above discussion I 
think I will try it more with special Components and

and Inheritance.
Best regards
Heiner

Am 16.06.2013 11:36, schrieb Martin Grigorov:

Hi,

Some guys created integration of Wicket 1.4 with Spring WebFlow (
https://github.com/wicketstuff/core/tree/core-1.4.x/jdk-1.5-parent/spring-webflow-parent
).
You may find it interesting and update it to newer versions of both Wicket
and Spring WebFlow.


On Sun, Jun 16, 2013 at 7:34 AM, Piratenvisier
hansheinrichbr...@yahoo.dewrote:


Is there any support to structure the flow of pages and forms.
I build for my realestate software structures, defining a state of a page,
the visibility of the links and tabs, the pages a link calls in this state,
  database action to be done and the pageparameters
the link tranfers to the new page.

But maybe there are more intelligent ways to organize this.


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






Resource mounting: Why has a resource always a lower compatibility score than a page?

2013-06-18 Thread Per Newgro
Hi,

i would like to mount a resource with a name /mypath/${param1}/whatever.
I've already mounted a page with /mypath.

I was wondering why i was always redirected to the /mypath page.

In ResourceMapper i've found this:
code
  @Override
  public int getCompatibilityScore(Request request)
  {
return 0; // pages always have priority over resources
  }
/code

So i would like to know: Why is the resource not mapped by it's appropriate 
compatibility score
vs pages?

Thanks for your support
Per

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



Re: Resource mounting: Why has a resource always a lower compatibility score than a page?

2013-06-18 Thread Martin Grigorov
Hi,

Don't know.
But we have to take this into account when/if we start working on the idea
explained at: http://markmail.org/thread/ku6me4odezqqivjy


On Tue, Jun 18, 2013 at 1:16 PM, Per Newgro per.new...@gmx.ch wrote:

 Hi,

 i would like to mount a resource with a name /mypath/${param1}/whatever.
 I've already mounted a page with /mypath.

 I was wondering why i was always redirected to the /mypath page.

 In ResourceMapper i've found this:
 code
   @Override
   public int getCompatibilityScore(Request request)
   {
 return 0; // pages always have priority over resources
   }
 /code

 So i would like to know: Why is the resource not mapped by it's
 appropriate compatibility score
 vs pages?

 Thanks for your support
 Per

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




Ajax file download - Invalid XML

2013-06-18 Thread René Hartwig

  
  
Hi,

I'm using Wicket 6.7.0 with an embedded Jetty and implemented a file
download mechanism as suggested here:
https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow

My implementation is slighlty different from the suggested one, but
still I think it is pretty much the same:
private
  void writeDownload(final ListTransferModel transfers)
  {
          String fileName =
  UrlEncoder.QUERY_INSTANCE.encode("logExport-" +
  CalendarTool.format(beginDate) + "-" +
  CalendarTool.format(endDate)
                  + ".csv", getRequest().getCharset());
          IResourceStream resourceStream = new
  AbstractResourceStreamWriter() {
  
              @Override
              public void write(OutputStream output) throws
  IOException {
                  BHLogExport.writeCSVLog(transfers, output,
  getLocalizer(), Session.get().getLocale(),
  LogExportPanel.this);
              }
  
              @Override
              public String getContentType() {
                  return "text/csv";
              }
          };
          ResourceStreamRequestHandler resource = new
  ResourceStreamRequestHandler(resourceStream, fileName);
         
  resource.setContentDisposition(ContentDisposition.ATTACHMENT);
          resource.setCacheDuration(Duration.NONE);
          // resource.setFileName(fileName);
         
  getRequestCycle().scheduleRequestHandlerAfterCurrent(resource);
          try {
              resourceStream.close();
          } catch (IOException e) {
              throw new CryptshareRuntimeException("An error
  occured while trying to write the csv file to the output
  stream.", e);
          }
      }

I am using a custom Button wrapping an AjaxButton. Except from that,
there is no difference, but I still keep getting an error message
instead of
the file download dialog.
Do you have any suggestions what I might be doing wrong?

Thanks and best regards,
René Hartwig
-- 
   René
Hartwig
Senior Developer
   Befine
Solutions AG - The Cryptshare Company
Bebelstraße 17
  79108 Freiburg
  Germany
   Tel: +49 (0) 761 38913
  0
  Fax: +49 (0) 761 38913 115

E-Mail: rene.hart...@befine-solutions.com
Internet: http://www.cryptshare.com
   =
   Your attachments are
  too large or too confidential for e-mail?
  Get to know Cryptshare!
   http://www.cryptshare.com
   =
   
  
  Amtsgericht
Freiburg HRB 6144
Vorstand Mark Forrest, Dominik Lehr
Aufsichtsratsvorsitzender Edgar Fehrenbacher
   
 

  



Re: Ajax file download - Invalid XML

2013-06-18 Thread Ernesto Reinaldo Barreiro
It should be the AJAX part that fails for some reason...  If you put a
break point on  writeDownload you might see that no download request is
produced. The trick work as follows. Please, try to provide a quick start
or provide more info because I do not see how we could otherwise help you.




On Tue, Jun 18, 2013 at 3:14 PM, René Hartwig 
rene.hart...@befine-solutions.com wrote:

  Hi,

 I'm using Wicket 6.7.0 with an embedded Jetty and implemented a file
 download mechanism as suggested here:

 https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow

 My implementation is slighlty different from the suggested one, but still
 I think it is pretty much the same:
 private void writeDownload(final ListTransferModel transfers) {
 String fileName = UrlEncoder.QUERY_INSTANCE.encode(logExport- +
 CalendarTool.format(beginDate) + - + CalendarTool.format(endDate)
 + .csv, getRequest().getCharset());
 IResourceStream resourceStream = new
 AbstractResourceStreamWriter() {

 @Override
 public void write(OutputStream output) throws IOException {
 BHLogExport.writeCSVLog(transfers, output, getLocalizer(),
 Session.get().getLocale(), LogExportPanel.this);
 }

 @Override
 public String getContentType() {
 return text/csv;
 }
 };
 ResourceStreamRequestHandler resource = new
 ResourceStreamRequestHandler(resourceStream, fileName);
 resource.setContentDisposition(ContentDisposition.ATTACHMENT);
 resource.setCacheDuration(Duration.NONE);
 // resource.setFileName(fileName);
 getRequestCycle().scheduleRequestHandlerAfterCurrent(resource);
 try {
 resourceStream.close();
 } catch (IOException e) {
 throw new CryptshareRuntimeException(An error occured while
 trying to write the csv file to the output stream., e);
 }
 }

 I am using a custom Button wrapping an AjaxButton. Except from that, there
 is no difference, but I still keep getting an error message instead of
 the file download dialog.
 Do you have any suggestions what I might be doing wrong?

 Thanks and best regards,
 René Hartwig
 --

 René Hartwig
 Senior Developer

 *Befine Solutions AG - The Cryptshare Company*
 Bebelstraße 17
 79108 Freiburg
 Germany

 Tel: +49 (0) 761 38913 0
 Fax: +49 (0) 761 38913 115

 E-Mail: *rene.hart...@befine-solutions.com*
 Internet: http://www.cryptshare.com

 =

 Your attachments are too large or too confidential for e-mail?
 Get to know Cryptshare!

 http://www.cryptshare.com

 =

  
 http://www.facebook.com/cryptsharehttp://www.linkedin.com/company/befine-solutions/products

 Amtsgericht Freiburg HRB 6144
 Vorstand Mark Forrest, Dominik Lehr
 Aufsichtsratsvorsitzender Edgar Fehrenbacher







-- 
Regards - Ernesto Reinaldo Barreiro


Re: Ajax file download - Invalid XML

2013-06-18 Thread Martin Grigorov
Hi,


On Tue, Jun 18, 2013 at 2:14 PM, René Hartwig 
rene.hart...@befine-solutions.com wrote:

  Hi,

 I'm using Wicket 6.7.0 with an embedded Jetty and implemented a file
 download mechanism as suggested here:

 https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow

 My implementation is slighlty different from the suggested one, but still
 I think it is pretty much the same:
 private void writeDownload(final ListTransferModel transfers) {
 String fileName = UrlEncoder.QUERY_INSTANCE.encode(logExport- +
 CalendarTool.format(beginDate) + - + CalendarTool.format(endDate)
 + .csv, getRequest().getCharset());
 IResourceStream resourceStream = new
 AbstractResourceStreamWriter() {

 @Override
 public void write(OutputStream output) throws IOException {
 BHLogExport.writeCSVLog(transfers, output, getLocalizer(),
 Session.get().getLocale(), LogExportPanel.this);
 }

 @Override
 public String getContentType() {
 return text/csv;
 }
 };
 ResourceStreamRequestHandler resource = new
 ResourceStreamRequestHandler(resourceStream, fileName);
 resource.setContentDisposition(ContentDisposition.ATTACHMENT);
 resource.setCacheDuration(Duration.NONE);
 // resource.setFileName(fileName);
 getRequestCycle().scheduleRequestHandlerAfterCurrent(resource);


With the line above you are scheduling a request handler after the Ajax one
(AjaxRequestTarget), so you write directly the binary data in the Ajax
response.
This won't work.
Follow the wiki more closely. It does: target.appendJavaScript(
setTimeout(\window.location.href=' + url + '\, 100););
I.e. it makes a new request to load the binary.


  try {
 resourceStream.close();
 } catch (IOException e) {
 throw new CryptshareRuntimeException(An error occured while
 trying to write the csv file to the output stream., e);
 }
 }

 I am using a custom Button wrapping an AjaxButton. Except from that, there
 is no difference, but I still keep getting an error message instead of
 the file download dialog.
 Do you have any suggestions what I might be doing wrong?

 Thanks and best regards,
 René Hartwig
 --

 René Hartwig
 Senior Developer

 *Befine Solutions AG - The Cryptshare Company*
 Bebelstraße 17
 79108 Freiburg
 Germany

 Tel: +49 (0) 761 38913 0
 Fax: +49 (0) 761 38913 115

 E-Mail: *rene.hart...@befine-solutions.com*
 Internet: http://www.cryptshare.com

 =

 Your attachments are too large or too confidential for e-mail?
 Get to know Cryptshare!

 http://www.cryptshare.com

 =

  
 http://www.facebook.com/cryptsharehttp://www.linkedin.com/company/befine-solutions/products

 Amtsgericht Freiburg HRB 6144
 Vorstand Mark Forrest, Dominik Lehr
 Aufsichtsratsvorsitzender Edgar Fehrenbacher






Re: Ajax file download - Invalid XML

2013-06-18 Thread Ernesto Reinaldo Barreiro
Well spotted.. and I guess the wrong XML error is because you are returning
CSV instead of wicket AJAX XML.


On Tue, Jun 18, 2013 at 3:26 PM, Martin Grigorov mgrigo...@apache.orgwrote:

 Hi,


 On Tue, Jun 18, 2013 at 2:14 PM, René Hartwig 
 rene.hart...@befine-solutions.com wrote:

  Hi,

 I'm using Wicket 6.7.0 with an embedded Jetty and implemented a file
 download mechanism as suggested here:

 https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow

 My implementation is slighlty different from the suggested one, but still
 I think it is pretty much the same:
 private void writeDownload(final ListTransferModel transfers) {
 String fileName = UrlEncoder.QUERY_INSTANCE.encode(logExport- +
 CalendarTool.format(beginDate) + - + CalendarTool.format(endDate)
 + .csv, getRequest().getCharset());
 IResourceStream resourceStream = new
 AbstractResourceStreamWriter() {

 @Override
 public void write(OutputStream output) throws IOException {
 BHLogExport.writeCSVLog(transfers, output,
 getLocalizer(), Session.get().getLocale(), LogExportPanel.this);
 }

 @Override
 public String getContentType() {
 return text/csv;
 }
 };
 ResourceStreamRequestHandler resource = new
 ResourceStreamRequestHandler(resourceStream, fileName);
 resource.setContentDisposition(ContentDisposition.ATTACHMENT);
 resource.setCacheDuration(Duration.NONE);
 // resource.setFileName(fileName);
 getRequestCycle().scheduleRequestHandlerAfterCurrent(resource);


 With the line above you are scheduling a request handler after the Ajax
 one (AjaxRequestTarget), so you write directly the binary data in the Ajax
 response.
 This won't work.
 Follow the wiki more closely. It does: target.appendJavaScript(
 setTimeout(\window.location.href=' + url + '\, 100););
 I.e. it makes a new request to load the binary.


  try {
 resourceStream.close();
 } catch (IOException e) {
 throw new CryptshareRuntimeException(An error occured while
 trying to write the csv file to the output stream., e);
 }
 }

 I am using a custom Button wrapping an AjaxButton. Except from that,
 there is no difference, but I still keep getting an error message instead of
 the file download dialog.
 Do you have any suggestions what I might be doing wrong?

 Thanks and best regards,
 René Hartwig
 --

 René Hartwig
 Senior Developer

 *Befine Solutions AG - The Cryptshare Company*
 Bebelstraße 17
 79108 Freiburg
 Germany

 Tel: +49 (0) 761 38913 0
 Fax: +49 (0) 761 38913 115

 E-Mail: *rene.hart...@befine-solutions.com*
 Internet: http://www.cryptshare.com

 =

 Your attachments are too large or too confidential for e-mail?
 Get to know Cryptshare!

 http://www.cryptshare.com

 =

  
 http://www.facebook.com/cryptsharehttp://www.linkedin.com/company/befine-solutions/products

 Amtsgericht Freiburg HRB 6144
 Vorstand Mark Forrest, Dominik Lehr
 Aufsichtsratsvorsitzender Edgar Fehrenbacher








-- 
Regards - Ernesto Reinaldo Barreiro


Re: Ajax file download - Invalid XML

2013-06-18 Thread René Hartwig

  
  
Great, thanks - that was it
  
  
  Best regards,
  Ren
  
  
 Ren
  Hartwig
  Senior Developer
 Befine
  Solutions AG - The Cryptshare Company
  Bebelstrae 17
79108 Freiburg
Germany
 Tel: +49 (0) 761
38913 0
Fax: +49 (0) 761 38913 115
  
  E-Mail: rene.hart...@befine-solutions.com
  Internet:
  http://www.cryptshare.com
 =
 Your attachments are
too large or too confidential for e-mail?
Get to know Cryptshare!
 http://www.cryptshare.com
 =
 

Amtsgericht
  Freiburg HRB 6144
  Vorstand Mark Forrest, Dominik Lehr
  Aufsichtsratsvorsitzender Edgar Fehrenbacher
 
  
  
  Am 18.06.2013 13:32, schrieb Ernesto Reinaldo Barreiro:


  Well spotted.. and I guess the wrong XML error is because you are returning
CSV instead of wicket AJAX XML.


On Tue, Jun 18, 2013 at 3:26 PM, Martin Grigorov mgrigo...@apache.orgwrote:


  
Hi,


On Tue, Jun 18, 2013 at 2:14 PM, Ren Hartwig 
rene.hart...@befine-solutions.com wrote:



   Hi,

I'm using Wicket 6.7.0 with an embedded Jetty and implemented a file
download mechanism as suggested here:

https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow

My implementation is slighlty different from the suggested one, but still
I think it is pretty much the same:
private void writeDownload(final ListTransferModel transfers) {
String fileName = UrlEncoder.QUERY_INSTANCE.encode("logExport-" +
CalendarTool.format(beginDate) + "-" + CalendarTool.format(endDate)
+ ".csv", getRequest().getCharset());
IResourceStream resourceStream = new
AbstractResourceStreamWriter() {

@Override
public void write(OutputStream output) throws IOException {
BHLogExport.writeCSVLog(transfers, output,
getLocalizer(), Session.get().getLocale(), LogExportPanel.this);
}

@Override
public String getContentType() {
return "text/csv";
}
};
ResourceStreamRequestHandler resource = new
ResourceStreamRequestHandler(resourceStream, fileName);
resource.setContentDisposition(ContentDisposition.ATTACHMENT);
resource.setCacheDuration(Duration.NONE);
// resource.setFileName(fileName);
getRequestCycle().scheduleRequestHandlerAfterCurrent(resource);




With the line above you are scheduling a request handler after the Ajax
one (AjaxRequestTarget), so you write directly the binary data in the Ajax
response.
This won't work.
Follow the wiki more closely. It does: target.appendJavaScript(
"setTimeout(\"window.location.href=''\", 100);");
I.e. it makes a new request to load the binary.




   try {
resourceStream.close();
} catch (IOException e) {
throw new CryptshareRuntimeException("An error occured while
trying to write the csv file to the output stream.", e);
}
}

I am using a custom Button wrapping an AjaxButton. Except from that,
there is no difference, but I still keep getting an error message instead of
the file download dialog.
Do you have any suggestions what I might be doing wrong?

Thanks and best regards,
Ren Hartwig
--

Ren Hartwig
Senior Developer

*Befine Solutions AG - The Cryptshare Company*
Bebelstrae 17
79108 Freiburg
Germany

Tel: +49 (0) 761 38913 0
Fax: +49 (0) 761 38913 115

E-Mail: *rene.hart...@befine-solutions.com*
Internet: http://www.cryptshare.com

=

Your attachments are too large or too confidential for e-mail?
Get to know Cryptshare!

http://www.cryptshare.com

=

 http://www.facebook.com/cryptsharehttp://www.linkedin.com/company/befine-solutions/products

Amtsgericht Freiburg HRB 6144
Vorstand Mark Forrest, Dominik Lehr
Aufsichtsratsvorsitzender Edgar Fehrenbacher









  
  




  



Re: Form submit without redirection

2013-06-18 Thread divad91
Yeah it would be much easier that way. We have ajax for every actions in our
form but when we want to change page, we use the full submit. I could do
the same thing with an abstract behavior. I will give it a try.
Thanks.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Form-submit-without-redirection-tp4659496p4659598.html
Sent from the Users forum 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 Pagination with datatable

2013-06-18 Thread Pratibha
Hi Team,

my requirement is to add pagination at the the bottom of dataTable, i
basically require pagination at top as well as bottom,top pagination exists
in my web app . is it possible to add pagination  at the bottom ?

Thanks




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/ajax-Pagination-with-datatable-tp4659604.html
Sent from the Users forum 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: ajax Pagination with datatable

2013-06-18 Thread Martin Grigorov
Hi,

For top you use something like: getTopToolbars().add(new
AjaxNavigationToolbar());
Just use getBottomToolbar().


On Tue, Jun 18, 2013 at 4:31 PM, Pratibha pratibha.pari...@gmail.comwrote:

 Hi Team,

 my requirement is to add pagination at the the bottom of dataTable, i
 basically require pagination at top as well as bottom,top pagination exists
 in my web app . is it possible to add pagination  at the bottom ?

 Thanks




 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/ajax-Pagination-with-datatable-tp4659604.html
 Sent from the Users forum 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: ajax Pagination with datatable

2013-06-18 Thread Pratibha
Hi Martin,

I added the below line and yes its working, can't believe it was just one
line.

  dataTable.addBottomToolbar(new AjaxNavigationToolbar(dataTable));

Thanks :)




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/ajax-Pagination-with-datatable-tp4659604p4659606.html
Sent from the Users forum 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: ajax Pagination with datatable

2013-06-18 Thread Martin Grigorov
Sometimes component-oriented frameworks really work ;-)


On Tue, Jun 18, 2013 at 4:52 PM, Pratibha pratibha.pari...@gmail.comwrote:

 Hi Martin,

 I added the below line and yes its working, can't believe it was just one
 line.

   dataTable.addBottomToolbar(new AjaxNavigationToolbar(dataTable));

 Thanks :)




 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/ajax-Pagination-with-datatable-tp4659604p4659606.html
 Sent from the Users forum 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




Modifying components parent css

2013-06-18 Thread neilbennett
Hi,

I have a number of RequiredTextField components on a form. I am using
Twitter Bootstrap for CSS. On the form it switches between view and edit
modes. In order to display a required border on the field I need to have:



But in view mode I need:


However I can't find how to modify the parent div tag while processing the
form. Possibly with panels for both types of field? That seems to be a lot
of code for just one change to the markup though. I'm pretty new to wicket
so any help is appreciated.

Thanks,

Neil



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Modifying-components-parent-css-tp4659610.html
Sent from the Users forum 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



Annoying wicket API Docs ... includes exmaples api docs

2013-06-18 Thread armandoxxx
Hey there ... 

Does anybody have a link of only wicket framework API docs ? The one that
does not include examples docs? 

It's kind of annoying searching through API, you find a class which looks
like something you might use and you find out it's from examples and with
none descriptions whatsoever ...

Regards

Armando







--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Annoying-wicket-API-Docs-includes-exmaples-api-docs-tp4659611.html
Sent from the Users forum 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: Annoying wicket API Docs ... includes exmaples api docs

2013-06-18 Thread Ernesto Reinaldo Barreiro
Why don't you just install the sources locally on you IDE. Them, you would
have both Java doc and source code... There is no better documentation than
the code itself.


On Wed, Jun 19, 2013 at 9:33 AM, armandoxxx armando@dropchop.comwrote:

 Hey there ...

 Does anybody have a link of only wicket framework API docs ? The one that
 does not include examples docs?

 It's kind of annoying searching through API, you find a class which looks
 like something you might use and you find out it's from examples and with
 none descriptions whatsoever ...

 Regards

 Armando







 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Annoying-wicket-API-Docs-includes-exmaples-api-docs-tp4659611.html
 Sent from the Users forum 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




-- 
Regards - Ernesto Reinaldo Barreiro