Re: Error during headers validation since migration to 1.5

2011-07-07 Thread adriclad
Hi,

Sorry not to have directly submit a quickstart but I was very busy with
others projects.

Today, I have updated to 1.5 RC5. This trouble doesn't appear any more (with
RC4, it still).

So good news !



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Error-during-headers-validation-since-migration-to-1-5-tp3355890p3650790.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: wicketstuff site down

2011-07-07 Thread Johan Compagner
power failure at the ISP, not everything came up, should be fine now


On Thu, Jul 7, 2011 at 02:37, Steve Swinsburg steve.swinsb...@gmail.com wrote:
 Hi all,

 The wicketstuff site is down

 http://wicketstuff.org/wicket/
 Safari can’t open the page “http://wicketstuff.org/wicket/” because Safari 
 can’t connect to the server “wicketstuff.org”.





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



Wicket Disk Page Store Location

2011-07-07 Thread Horacio Natyural
Hi,

where does Wicket store its disk page store?
is it in java.io.tmpdir?

if i use glassfish, where will it be placed?
i can't seem to locate it?

this is where wicket stores serialized pages right?


help!

Thanks
Horacio

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



Re: Wicket Disk Page Store Location

2011-07-07 Thread Martin Grigorov
fileStoreFolder =
(File)((WebApplication)Application.get()).getServletContext()
.getAttribute(javax.servlet.context.tempdir);

if (fileStoreFolder != null)
{
return fileStoreFolder;
}

try
{
fileStoreFolder = 
File.createTempFile(file-prefix, null).getParentFile();
}


On Thu, Jul 7, 2011 at 9:54 AM, Horacio Natyural
horacio.natyu...@gmail.com wrote:
 Hi,

 where does Wicket store its disk page store?
 is it in java.io.tmpdir?

 if i use glassfish, where will it be placed?
 i can't seem to locate it?

 this is where wicket stores serialized pages right?


 help!

 Thanks
 Horacio

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





-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



AjaxIndicator help needed

2011-07-07 Thread armandoxxx
Hey guys ... 

sorry for double post .. but I really really need help ..

http://apache-wicket.1842946.n4.nabble.com/ObjectAutoCompleteField-and-ajax-indicator-td3650331.html
link to original topic 

regards

Armando

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxIndicator-help-needed-tp3650948p3650948.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: Not closing the datepicker upon clicking outside

2011-07-07 Thread ramlael
Please suggest me on this... 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Not-closing-the-datepicker-upon-clicking-outside-tp3648593p3651028.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: Not closing the datepicker upon clicking outside

2011-07-07 Thread Martin Grigorov
How would you do it with plain YUI ?

On Thu, Jul 7, 2011 at 11:19 AM, ramlael grambab...@gmail.com wrote:
 Please suggest me on this...

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Not-closing-the-datepicker-upon-clicking-outside-tp3648593p3651028.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





-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Wicket Encrypted URL Redirects To A Css Image

2011-07-07 Thread Horacio Natyural
Is this related?

ever since we placed this tag thats when the error occurs

meta http-equiv=x-ua-compatible content=Ie=emulateie7/

also another instance is when i accesesed the home page, the css file
appeared instead.

thanks

On Thursday, July 7, 2011, Horacio Natyural horacio.natyu...@gmail.com wrote:
 hi,

 i've found that we have several components implementing Imarkupcacheprovider,
 however, the id return is null


 public String getCacheKey(MarkupContainer container, Class? containerClass) 
 {
                         return null;
                 }

 we ahve several components doing this.
 is this a possible cause as to why the wrong component was rendered ?

 thanks
 horacio
 On Thu, Jul 7, 2011 at 7:30 AM, Horacio Natyural
 horacio.natyu...@gmail.com wrote:
 hi,

 thanks! i also noticed that it seems to happen on an SSL site rather
 than on a non ssl site.

 Thanks!
 Horacio

 On Thu, Jul 7, 2011 at 12:37 AM, Martin Grigorov mgrigo...@apache.org 
 wrote:
 https://issues.apache.org/jira/browse/WICKET-3514 is similar
 but there the problem was that images in .css were broken, i.e. they
 are relative to the .css, but since the .css path is encoded the
 resolved path for the image was invalid

 On Wed, Jul 6, 2011 at 6:01 PM, Igor Vaynberg igor.vaynb...@gmail.com 
 wrote:
 doesnt ring a bell.

 -igor

 On Wed, Jul 6, 2011 at 8:32 AM, Horacio Natyural
 horacio.natyu...@gmail.com wrote:
 btw, i just made up the crypted url of course.
 index is supposed to a wicket page.
 i also noticed that the image that it downloads is referenced in a css
 file in the application so it is a resource

 was there any bug of this nature reported before? i'm trying to find
 one but i can't seem to.

 On Wed, Jul 6, 2011 at 11:31 PM, Horacio Natyural
 horacio.natyu...@gmail.com wrote:
 lol
 sorry about that

 anyway here's what happened,

 The link I accessed turned into a css image instead.

 Here's what it looks like in Firefox

 Encrypted URL

 index(PNG Image,256x240 pixels)

 https://ip_addr:port/contextroot/index?x=23423562302982lj;lkjsf73jf;2lkjf;2l3kjf;l2k3fj;lkjf76

 and then the image appears.

 although the link is supposed to be a link for a page.

 On Wed, Jul 6, 2011 at 11:22 PM, Igor Vaynberg igor.vaynb...@gmail.com 
 wrote:
 it is almost impossible to help you when you are so many versions 
 behind...

 -igor

 On Wed, Jul 6, 2011 at 7:17 AM, Horacio Natyural
 horacio.natyu...@gmail.com wrote:
 Hi,

 I'm having this really weird problem and it is intermettent.
 It seems that when I click a URL wich uses an AjaxFallbackLink and
 encrypted URL. I am redirected to a css image.
 My page becomes a png. This is very intermettent though, anyone
 experienced this before?

 Instead of getting my desired page, I am redirected to a css image
 which is a PNG.

 I'm using wicket 1.4.3 btw,

 -
 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: error - serialization

2011-07-07 Thread Miroslav F.
After investigation I will answer myself - it is bug in tomcat, if you are
using tomcat
6.0.29 upgrade to 6.0.31.

Carl, static variables are good if you are going to do something like DB
connection
factory and you will reuse existing connection. When you will do in your
style you will
make new connection in each request (it is expensive).



 -Original Message-
 From: Carl-Eric Menzel [mailto:cmen...@wicketbuch.de] 
 Sent: Wednesday, 06. July 2011 13:13
 To: users@wicket.apache.org
 Subject: Re: error - serialization
 
 First of all, don't manage your own DB connection. That is 
 fragile and error-prone. The best solution is to use 
 something like Hibernate, iBatis, JPA or any other such tool. 
 These things manage the connection setup for you, and you 
 don't have to worry about it.
 
 Second, in this particular case, get rid of all the static variables.
 I'm not entirely sure what exactly is causing the no 
 suitable driver found issue, but keeping connections and all 
 this stuff around statically is thread-unsafe and can cause 
 all kinds of confusion. If you have to do the DBImage and 
 Database stuff, do it like this (pseudocode, you get the idea):
 
 byte[] getRecord {
   try {
   Connection c = makeConnection();
   Statement s = makeStatement();
   } finally {
 // ...cleanup...
   }
 }
 
 Basically, move all the static stuff into method-local 
 variables to get rid of threading issues.
 
 Carl-Eric
 www.wicketbuch.de
 
 On Tue, 5 Jul 2011 11:35:31 +0200
 Miroslav F. mir...@seznam.cz wrote:
 
  Index.java:
  public class Index extends WebPage
  {
  public Index()
  {
  add(new Image(obrazokzdb, new ImagesIndex()));
  }
  }
  
  ImagesIndex.java:
  public class ImagesIndex extends LoadableDetachableModelObject {
  private DBImage myImage;
  
  @Override
  protected Object load()
  {
  myImage = new DBImage();
  myImage.setImageData(Database.getRecord());
  return myImage;
  }
  }
  
  DBImage.java:
  public class DBImage extends DynamicImageResource {
  private byte[] imageData;
  
  @Override
  protected byte[] getImageData()
  {
  return this.imageData;
  }
  
  public void setImageData(byte[] inputImageData)
  {
  this.imageData = inputImageData;
  }
  }
  
  Database.java (poor organisation, at the moment just 
 testing working 
  with BLOBs):
  public class Database
  {
  private static Connection connection;
  private static Statement statement;
  private static ResultSet result;
  private static LargeObject object;
  private static LargeObjectManager manager;
  private static String query = SELECT * FROM 
 mydatabase.images WHERE 
  id = 8;
  private static byte[] record;
  
  public static byte[] getRecord()
  {
  makeConnection();
  makeStatement();
  makeResultSet();
  try
  {
  result.next();
  Long oid = result.getLong(7);
  object = manager.open(oid,
  LargeObjectManager.READ); record = new byte[object.size()];
  object.read(record, 0, object.size());
  object.close();
  closeResultSet();
  closeStatement();
  makeCommit();
  }
  catch(SQLException e)
  {
  e.printStackTrace();
  }
  return record;
  }
  
  public static void makeConnection()
  {
  try
  {
  Class.forName(org.postgresql.Driver);
  connection =
  
 DriverManager.getConnection(jdbc:postgresql://localhost:5432/mydataba
  se,
  postgres, postgres);
  connection.setAutoCommit(false);
  manager = ((org.postgresql.PGConnection) 
  connection).getLargeObjectAPI();
  }
  catch(ClassNotFoundException e)
  {
  e.printStackTrace();
  }
  catch(SQLException e)
  {
  e.printStackTrace();
  }
  }
  
  public static void makeStatement()
  {
  try
  {
  statement = connection.createStatement();
  }
  catch(SQLException e)
  {
  e.printStackTrace();
  }
  }
  
  public static void setQuery(String inputQuery)
  {
  query = null;
  query = inputQuery;
  }
  
  public static void makeResultSet()
  {
  try
  {
  result = statement.executeQuery(query);
  }
  catch(SQLException e)
  {
  e.printStackTrace();
  }
  }
  
  public static ResultSet 

Re: Wicket Encrypted URL Redirects To A Css Image

2011-07-07 Thread Martin Grigorov
Attach a debugger to WicketFilter#doFilter() and see what kind of
requests come from the client.
If it is crypted then it's interesting what is the decrypted value for it.

On Thu, Jul 7, 2011 at 12:16 PM, Horacio Natyural
horacio.natyu...@gmail.com wrote:
 Is this related?

 ever since we placed this tag thats when the error occurs

 meta http-equiv=x-ua-compatible content=Ie=emulateie7/

 also another instance is when i accesesed the home page, the css file
 appeared instead.

 thanks

 On Thursday, July 7, 2011, Horacio Natyural horacio.natyu...@gmail.com 
 wrote:
 hi,

 i've found that we have several components implementing Imarkupcacheprovider,
 however, the id return is null


 public String getCacheKey(MarkupContainer container, Class? 
 containerClass) {
                         return null;
                 }

 we ahve several components doing this.
 is this a possible cause as to why the wrong component was rendered ?

 thanks
 horacio
 On Thu, Jul 7, 2011 at 7:30 AM, Horacio Natyural
 horacio.natyu...@gmail.com wrote:
 hi,

 thanks! i also noticed that it seems to happen on an SSL site rather
 than on a non ssl site.

 Thanks!
 Horacio

 On Thu, Jul 7, 2011 at 12:37 AM, Martin Grigorov mgrigo...@apache.org 
 wrote:
 https://issues.apache.org/jira/browse/WICKET-3514 is similar
 but there the problem was that images in .css were broken, i.e. they
 are relative to the .css, but since the .css path is encoded the
 resolved path for the image was invalid

 On Wed, Jul 6, 2011 at 6:01 PM, Igor Vaynberg igor.vaynb...@gmail.com 
 wrote:
 doesnt ring a bell.

 -igor

 On Wed, Jul 6, 2011 at 8:32 AM, Horacio Natyural
 horacio.natyu...@gmail.com wrote:
 btw, i just made up the crypted url of course.
 index is supposed to a wicket page.
 i also noticed that the image that it downloads is referenced in a css
 file in the application so it is a resource

 was there any bug of this nature reported before? i'm trying to find
 one but i can't seem to.

 On Wed, Jul 6, 2011 at 11:31 PM, Horacio Natyural
 horacio.natyu...@gmail.com wrote:
 lol
 sorry about that

 anyway here's what happened,

 The link I accessed turned into a css image instead.

 Here's what it looks like in Firefox

 Encrypted URL

 index(PNG Image,256x240 pixels)

 https://ip_addr:port/contextroot/index?x=23423562302982lj;lkjsf73jf;2lkjf;2l3kjf;l2k3fj;lkjf76

 and then the image appears.

 although the link is supposed to be a link for a page.

 On Wed, Jul 6, 2011 at 11:22 PM, Igor Vaynberg 
 igor.vaynb...@gmail.com wrote:
 it is almost impossible to help you when you are so many versions 
 behind...

 -igor

 On Wed, Jul 6, 2011 at 7:17 AM, Horacio Natyural
 horacio.natyu...@gmail.com wrote:
 Hi,

 I'm having this really weird problem and it is intermettent.
 It seems that when I click a URL wich uses an AjaxFallbackLink and
 encrypted URL. I am redirected to a css image.
 My page becomes a png. This is very intermettent though, anyone
 experienced this before?

 Instead of getting my desired page, I am redirected to a css image
 which is a PNG.

 I'm using wicket 1.4.3 btw,

 -
 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





-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: error - serialization

2011-07-07 Thread Martin Grigorov
On Thu, Jul 7, 2011 at 12:36 PM, Miroslav F. mir...@seznam.cz wrote:
 After investigation I will answer myself - it is bug in tomcat, if you are
 using tomcat
 6.0.29 upgrade to 6.0.31.

 Carl, static variables are good if you are going to do something like DB
 connection
 factory and you will reuse existing connection. When you will do in your
 style you will
 make new connection in each request (it is expensive).
Better use objects with application scope than statics.
There is a lot of reading in the web about the drawbacks of static fields.



 -Original Message-
 From: Carl-Eric Menzel [mailto:cmen...@wicketbuch.de]
 Sent: Wednesday, 06. July 2011 13:13
 To: users@wicket.apache.org
 Subject: Re: error - serialization

 First of all, don't manage your own DB connection. That is
 fragile and error-prone. The best solution is to use
 something like Hibernate, iBatis, JPA or any other such tool.
 These things manage the connection setup for you, and you
 don't have to worry about it.

 Second, in this particular case, get rid of all the static variables.
 I'm not entirely sure what exactly is causing the no
 suitable driver found issue, but keeping connections and all
 this stuff around statically is thread-unsafe and can cause
 all kinds of confusion. If you have to do the DBImage and
 Database stuff, do it like this (pseudocode, you get the idea):

 byte[] getRecord {
   try {
   Connection c = makeConnection();
   Statement s = makeStatement();
   } finally {
     // ...cleanup...
   }
 }

 Basically, move all the static stuff into method-local
 variables to get rid of threading issues.

 Carl-Eric
 www.wicketbuch.de

 On Tue, 5 Jul 2011 11:35:31 +0200
 Miroslav F. mir...@seznam.cz wrote:

  Index.java:
  public class Index extends WebPage
  {
      public Index()
      {
              add(new Image(obrazokzdb, new ImagesIndex()));
      }
  }
 
  ImagesIndex.java:
  public class ImagesIndex extends LoadableDetachableModelObject {
      private DBImage myImage;
 
      @Override
      protected Object load()
      {
              myImage = new DBImage();
              myImage.setImageData(Database.getRecord());
              return myImage;
      }
  }
 
  DBImage.java:
  public class DBImage extends DynamicImageResource {
      private byte[] imageData;
 
      @Override
      protected byte[] getImageData()
      {
              return this.imageData;
      }
 
      public void setImageData(byte[] inputImageData)
      {
              this.imageData = inputImageData;
      }
  }
 
  Database.java (poor organisation, at the moment just
 testing working
  with BLOBs):
  public class Database
  {
      private static Connection connection;
      private static Statement statement;
      private static ResultSet result;
      private static LargeObject object;
      private static LargeObjectManager manager;
      private static String query = SELECT * FROM
 mydatabase.images WHERE
  id = 8;
      private static byte[] record;
 
      public static byte[] getRecord()
      {
              makeConnection();
              makeStatement();
              makeResultSet();
              try
              {
                      result.next();
                      Long oid = result.getLong(7);
                      object = manager.open(oid,
  LargeObjectManager.READ); record = new byte[object.size()];
                      object.read(record, 0, object.size());
                      object.close();
                      closeResultSet();
                      closeStatement();
                      makeCommit();
              }
              catch(SQLException e)
              {
                      e.printStackTrace();
              }
              return record;
      }
 
      public static void makeConnection()
      {
              try
              {
                      Class.forName(org.postgresql.Driver);
                      connection =
 
 DriverManager.getConnection(jdbc:postgresql://localhost:5432/mydataba
  se,
  postgres, postgres);
                      connection.setAutoCommit(false);
                      manager = ((org.postgresql.PGConnection)
  connection).getLargeObjectAPI();
              }
              catch(ClassNotFoundException e)
              {
                      e.printStackTrace();
              }
              catch(SQLException e)
              {
                      e.printStackTrace();
              }
      }
 
      public static void makeStatement()
      {
              try
              {
                      statement = connection.createStatement();
              }
              catch(SQLException e)
              {
                      e.printStackTrace();
              }
      }
 
      public static void setQuery(String inputQuery)
      {
              query = null;
              query = inputQuery;
      }
 
      public static void makeResultSet()
      {
              try
              {
                      result = 

Re: error - serialization

2011-07-07 Thread Carl-Eric Menzel
On Thu, 7 Jul 2011 12:36:45 +0200
Miroslav F. mir...@seznam.cz wrote:

 After investigation I will answer myself - it is bug in tomcat, if
 you are using tomcat
 6.0.29 upgrade to 6.0.31.

Sounds like an interesting bug. Do you have any more information on
this?

 Carl, static variables are good if you are going to do something like
 DB connection
 factory and you will reuse existing connection. When you will do in
 your style you will
 make new connection in each request (it is expensive).

It is more expensive manually, yes, but that is why I advised you to use
tools like JPA or iBATIS that will manage the connection for you, or
at least use a DataSource. Just keeping a static variable around *will*
*break* your application, because it is not thread safe. As soon as you
have more than one concurrent user, this will break.

Carl-Eric
www.wicketbuch.de

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



Re: Not closing the datepicker upon clicking outside

2011-07-07 Thread ramlael
refer this site for plan YUI :
http://developer.yahoo.com/yui/examples/calendar/calcontainer.html  

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Not-closing-the-datepicker-upon-clicking-outside-tp3648593p3651221.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: Not closing the datepicker upon clicking outside

2011-07-07 Thread ramlael
Refer this URL for plain YUI :
http://developer.yahoo.com/yui/examples/calendar/calcontainer.html  

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Not-closing-the-datepicker-upon-clicking-outside-tp3648593p3651222.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: Not closing the datepicker upon clicking outside

2011-07-07 Thread Martin Grigorov
Please, you do it and send us the related part.
We have our tasks and issues to solve. No time to do yours.

On Thu, Jul 7, 2011 at 1:25 PM, ramlael grambab...@gmail.com wrote:
 Refer this URL for plain YUI :
 http://developer.yahoo.com/yui/examples/calendar/calcontainer.html

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Not-closing-the-datepicker-upon-clicking-outside-tp3648593p3651222.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





-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Not closing the datepicker upon clicking outside

2011-07-07 Thread Andrea Del Bene
I thought it was easier...anyway in the example I posted yesterday 
calendar is closed with a specific click handler:


// Hide Calendar if we click anywhere in the document other than the 
calendar

2Event.on(document, click, function(e) {
3
4var el = Event.getTarget(e);
5var dialogEl = dialog.element;
6
7if (el != dialogEl  !Dom.isAncestor(dialogEl, el)  el != 
showBtn  !Dom.isAncestor(showBtn, el)) {

8dialog.hide();
9}
10});

you should adapt this function selecting all elements with css class 
'yui-calcontainer' (ex: 
YAHOO.util.Dom.getElementsByClassName('yui-calcontainer' ); )  and hide 
them if they satisfy 'if' condition.

Refer this URL for plain YUI :
http://developer.yahoo.com/yui/examples/calendar/calcontainer.html

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Not-closing-the-datepicker-upon-clicking-outside-tp3648593p3651222.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






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



Re: Not closing the datepicker upon clicking outside

2011-07-07 Thread ramlael
HI Andrea ,

Do you have any idea, how to do in Wicket?


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Not-closing-the-datepicker-upon-clicking-outside-tp3648593p3651340.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



Generate PDF

2011-07-07 Thread ramlael
Hi Friends,

I have requirement need to generate pdf with string data which is in byte
stream and need to open in new window (pop up).  I have used below code ,
but its displaying in same window, not in pop up.. please can you help me on
this.

  public void downloadPdf(RequestCycle requestCycle, final String
eStatement, String filename) {
   
final WebResponse webResponse = (WebResponse)
requestCycle.getResponse();
webResponse.setContentType(APPLICATION/PDF);
webResponse.setHeader(Content-Disposition, inline; filename=\ +
filename + \);
requestCycle.setRequestTarget(new IRequestTarget() {

public void respond(RequestCycle requestCycle) {
try {

OutputStream stream = webResponse.getOutputStream();
OutputStreamWriter writer = new
OutputStreamWriter(stream, ISO-8859-1);
writer.write(eStatement);
   writer.flush();
writer.close();
} catch (IOException ex) {
ex.printStackTrace();
}
}

public void detach(RequestCycle requestCycle) {
}

});
}
  

Thanks in advance
Rambabu

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Generate-PDF-tp3651354p3651354.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 Encrypted URL Redirects To A Css Image

2011-07-07 Thread Horacio Natyural
im geting unable to decrypt url text in mu server logs dont know if they 
are relates though?

any ideas ? 

why am i getting redirected to my resource files ?

tnx

On Jul 7, 2011, at 6:45 PM, Martin Grigorov mgrigo...@apache.org wrote:

 Attach a debugger to WicketFilter#doFilter() and see what kind of
 requests come from the client.
 If it is crypted then it's interesting what is the decrypted value for it.
 
 On Thu, Jul 7, 2011 at 12:16 PM, Horacio Natyural
 horacio.natyu...@gmail.com wrote:
 Is this related?
 
 ever since we placed this tag thats when the error occurs
 
 meta http-equiv=x-ua-compatible content=Ie=emulateie7/
 
 also another instance is when i accesesed the home page, the css file
 appeared instead.
 
 thanks
 
 On Thursday, July 7, 2011, Horacio Natyural horacio.natyu...@gmail.com 
 wrote:
 hi,
 
 i've found that we have several components implementing 
 Imarkupcacheprovider,
 however, the id return is null
 
 
 public String getCacheKey(MarkupContainer container, Class? 
 containerClass) {
 return null;
 }
 
 we ahve several components doing this.
 is this a possible cause as to why the wrong component was rendered ?
 
 thanks
 horacio
 On Thu, Jul 7, 2011 at 7:30 AM, Horacio Natyural
 horacio.natyu...@gmail.com wrote:
 hi,
 
 thanks! i also noticed that it seems to happen on an SSL site rather
 than on a non ssl site.
 
 Thanks!
 Horacio
 
 On Thu, Jul 7, 2011 at 12:37 AM, Martin Grigorov mgrigo...@apache.org 
 wrote:
 https://issues.apache.org/jira/browse/WICKET-3514 is similar
 but there the problem was that images in .css were broken, i.e. they
 are relative to the .css, but since the .css path is encoded the
 resolved path for the image was invalid
 
 On Wed, Jul 6, 2011 at 6:01 PM, Igor Vaynberg igor.vaynb...@gmail.com 
 wrote:
 doesnt ring a bell.
 
 -igor
 
 On Wed, Jul 6, 2011 at 8:32 AM, Horacio Natyural
 horacio.natyu...@gmail.com wrote:
 btw, i just made up the crypted url of course.
 index is supposed to a wicket page.
 i also noticed that the image that it downloads is referenced in a css
 file in the application so it is a resource
 
 was there any bug of this nature reported before? i'm trying to find
 one but i can't seem to.
 
 On Wed, Jul 6, 2011 at 11:31 PM, Horacio Natyural
 horacio.natyu...@gmail.com wrote:
 lol
 sorry about that
 
 anyway here's what happened,
 
 The link I accessed turned into a css image instead.
 
 Here's what it looks like in Firefox
 
 Encrypted URL
 
 index(PNG Image,256x240 pixels)
 
 https://ip_addr:port/contextroot/index?x=23423562302982lj;lkjsf73jf;2lkjf;2l3kjf;l2k3fj;lkjf76
 
 and then the image appears.
 
 although the link is supposed to be a link for a page.
 
 On Wed, Jul 6, 2011 at 11:22 PM, Igor Vaynberg 
 igor.vaynb...@gmail.com wrote:
 it is almost impossible to help you when you are so many versions 
 behind...
 
 -igor
 
 On Wed, Jul 6, 2011 at 7:17 AM, Horacio Natyural
 horacio.natyu...@gmail.com wrote:
 Hi,
 
 I'm having this really weird problem and it is intermettent.
 It seems that when I click a URL wich uses an AjaxFallbackLink and
 encrypted URL. I am redirected to a css image.
 My page becomes a png. This is very intermettent though, anyone
 experienced this before?
 
 Instead of getting my desired page, I am redirected to a css image
 which is a PNG.
 
 I'm using wicket 1.4.3 btw,
 
 -
 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
 
 
 
 
 
 -- 
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com
 
 -
 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: Wicket Encrypted URL Redirects To A Css Image

2011-07-07 Thread Horacio Natyural
oh ,

and to add to it,
this only happens on an SSL site, it doesn't happen on non http sites.

what's weird is, i don't get an error but i'm redirected to an image
or a css file.

On Thu, Jul 7, 2011 at 9:08 PM, Horacio Natyural
horacio.natyu...@gmail.com wrote:
 im geting unable to decrypt url text in mu server logs dont know if they 
 are relates though?

 any ideas ?

 why am i getting redirected to my resource files ?

 tnx

 On Jul 7, 2011, at 6:45 PM, Martin Grigorov mgrigo...@apache.org wrote:

 Attach a debugger to WicketFilter#doFilter() and see what kind of
 requests come from the client.
 If it is crypted then it's interesting what is the decrypted value for it.

 On Thu, Jul 7, 2011 at 12:16 PM, Horacio Natyural
 horacio.natyu...@gmail.com wrote:
 Is this related?

 ever since we placed this tag thats when the error occurs

 meta http-equiv=x-ua-compatible content=Ie=emulateie7/

 also another instance is when i accesesed the home page, the css file
 appeared instead.

 thanks

 On Thursday, July 7, 2011, Horacio Natyural horacio.natyu...@gmail.com 
 wrote:
 hi,

 i've found that we have several components implementing 
 Imarkupcacheprovider,
 however, the id return is null


 public String getCacheKey(MarkupContainer container, Class? 
 containerClass) {
                         return null;
                 }

 we ahve several components doing this.
 is this a possible cause as to why the wrong component was rendered ?

 thanks
 horacio
 On Thu, Jul 7, 2011 at 7:30 AM, Horacio Natyural
 horacio.natyu...@gmail.com wrote:
 hi,

 thanks! i also noticed that it seems to happen on an SSL site rather
 than on a non ssl site.

 Thanks!
 Horacio

 On Thu, Jul 7, 2011 at 12:37 AM, Martin Grigorov mgrigo...@apache.org 
 wrote:
 https://issues.apache.org/jira/browse/WICKET-3514 is similar
 but there the problem was that images in .css were broken, i.e. they
 are relative to the .css, but since the .css path is encoded the
 resolved path for the image was invalid

 On Wed, Jul 6, 2011 at 6:01 PM, Igor Vaynberg igor.vaynb...@gmail.com 
 wrote:
 doesnt ring a bell.

 -igor

 On Wed, Jul 6, 2011 at 8:32 AM, Horacio Natyural
 horacio.natyu...@gmail.com wrote:
 btw, i just made up the crypted url of course.
 index is supposed to a wicket page.
 i also noticed that the image that it downloads is referenced in a css
 file in the application so it is a resource

 was there any bug of this nature reported before? i'm trying to find
 one but i can't seem to.

 On Wed, Jul 6, 2011 at 11:31 PM, Horacio Natyural
 horacio.natyu...@gmail.com wrote:
 lol
 sorry about that

 anyway here's what happened,

 The link I accessed turned into a css image instead.

 Here's what it looks like in Firefox

 Encrypted URL

 index(PNG Image,256x240 pixels)

 https://ip_addr:port/contextroot/index?x=23423562302982lj;lkjsf73jf;2lkjf;2l3kjf;l2k3fj;lkjf76

 and then the image appears.

 although the link is supposed to be a link for a page.

 On Wed, Jul 6, 2011 at 11:22 PM, Igor Vaynberg 
 igor.vaynb...@gmail.com wrote:
 it is almost impossible to help you when you are so many versions 
 behind...

 -igor

 On Wed, Jul 6, 2011 at 7:17 AM, Horacio Natyural
 horacio.natyu...@gmail.com wrote:
 Hi,

 I'm having this really weird problem and it is intermettent.
 It seems that when I click a URL wich uses an AjaxFallbackLink and
 encrypted URL. I am redirected to a css image.
 My page becomes a png. This is very intermettent though, anyone
 experienced this before?

 Instead of getting my desired page, I am redirected to a css image
 which is a PNG.

 I'm using wicket 1.4.3 btw,

 -
 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





 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com

 -
 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: Wicket Encrypted URL Redirects To A Css Image

2011-07-07 Thread Horacio Natyural
here are some of the logs

rlWebRequestCodingStrategy - Invalid URL:
main?x=KHsKMhrrd-D04mkpqd*xsmCmGwRvNVoUPmz4BBdww8DLo4rNdEHOs25kQrwCz-EEu7JIh1GOXL7GXVhqHfJi1g,
exception type: org.apache.wicket.WicketRuntimeException, exception
message:Unable to decrypt the text '({
2�w���i)�߱�`�o5Zl�p��ˣ��tAγndB�����H�Q�\��]Xj�'


rlWebRequestCodingStrategy - Invalid URL:
index?x=VW*oMOXmPA45gt7EO0OOeRiN8uhyKItwgoWqwWlZ*lR8ZeIsSmwzQbUDlRP3tVdzdGh8Pip3ADKeTYmyhTpchGgpRzZ3zk9VXNgd*gsOzXSO82y0IFHnIMMwLOxki2efPPU7e1vM*Wo,
exception type: org.apache.wicket.WicketRuntimeException, exception
message:Unable to decrypt the text
'Uo�0��9���;C�y���r(�p����iY�T|e�,Jl3A����Wsth|*w

On Thu, Jul 7, 2011 at 9:53 PM, Horacio Natyural
horacio.natyu...@gmail.com wrote:
 oh ,

 and to add to it,
 this only happens on an SSL site, it doesn't happen on non http sites.

 what's weird is, i don't get an error but i'm redirected to an image
 or a css file.

 On Thu, Jul 7, 2011 at 9:08 PM, Horacio Natyural
 horacio.natyu...@gmail.com wrote:
 im geting unable to decrypt url text in mu server logs dont know if they 
 are relates though?

 any ideas ?

 why am i getting redirected to my resource files ?

 tnx

 On Jul 7, 2011, at 6:45 PM, Martin Grigorov mgrigo...@apache.org wrote:

 Attach a debugger to WicketFilter#doFilter() and see what kind of
 requests come from the client.
 If it is crypted then it's interesting what is the decrypted value for it.

 On Thu, Jul 7, 2011 at 12:16 PM, Horacio Natyural
 horacio.natyu...@gmail.com wrote:
 Is this related?

 ever since we placed this tag thats when the error occurs

 meta http-equiv=x-ua-compatible content=Ie=emulateie7/

 also another instance is when i accesesed the home page, the css file
 appeared instead.

 thanks

 On Thursday, July 7, 2011, Horacio Natyural horacio.natyu...@gmail.com 
 wrote:
 hi,

 i've found that we have several components implementing 
 Imarkupcacheprovider,
 however, the id return is null


 public String getCacheKey(MarkupContainer container, Class? 
 containerClass) {
                         return null;
                 }

 we ahve several components doing this.
 is this a possible cause as to why the wrong component was rendered ?

 thanks
 horacio
 On Thu, Jul 7, 2011 at 7:30 AM, Horacio Natyural
 horacio.natyu...@gmail.com wrote:
 hi,

 thanks! i also noticed that it seems to happen on an SSL site rather
 than on a non ssl site.

 Thanks!
 Horacio

 On Thu, Jul 7, 2011 at 12:37 AM, Martin Grigorov mgrigo...@apache.org 
 wrote:
 https://issues.apache.org/jira/browse/WICKET-3514 is similar
 but there the problem was that images in .css were broken, i.e. they
 are relative to the .css, but since the .css path is encoded the
 resolved path for the image was invalid

 On Wed, Jul 6, 2011 at 6:01 PM, Igor Vaynberg igor.vaynb...@gmail.com 
 wrote:
 doesnt ring a bell.

 -igor

 On Wed, Jul 6, 2011 at 8:32 AM, Horacio Natyural
 horacio.natyu...@gmail.com wrote:
 btw, i just made up the crypted url of course.
 index is supposed to a wicket page.
 i also noticed that the image that it downloads is referenced in a css
 file in the application so it is a resource

 was there any bug of this nature reported before? i'm trying to find
 one but i can't seem to.

 On Wed, Jul 6, 2011 at 11:31 PM, Horacio Natyural
 horacio.natyu...@gmail.com wrote:
 lol
 sorry about that

 anyway here's what happened,

 The link I accessed turned into a css image instead.

 Here's what it looks like in Firefox

 Encrypted URL

 index(PNG Image,256x240 pixels)

 https://ip_addr:port/contextroot/index?x=23423562302982lj;lkjsf73jf;2lkjf;2l3kjf;l2k3fj;lkjf76

 and then the image appears.

 although the link is supposed to be a link for a page.

 On Wed, Jul 6, 2011 at 11:22 PM, Igor Vaynberg 
 igor.vaynb...@gmail.com wrote:
 it is almost impossible to help you when you are so many versions 
 behind...

 -igor

 On Wed, Jul 6, 2011 at 7:17 AM, Horacio Natyural
 horacio.natyu...@gmail.com wrote:
 Hi,

 I'm having this really weird problem and it is intermettent.
 It seems that when I click a URL wich uses an AjaxFallbackLink and
 encrypted URL. I am redirected to a css image.
 My page becomes a png. This is very intermettent though, anyone
 experienced this before?

 Instead of getting my desired page, I am redirected to a css image
 which is a PNG.

 I'm using wicket 1.4.3 btw,

 -
 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





 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 

Getting Redirected To A Resource Reference (Image, CSS) On Invalid URL

2011-07-07 Thread Horacio Natyural
Hi,

anyone ever encountered this kind of error?
i'm getting another page whenever I get this error. It's very
intermettent and I'm not sure what's causing it.
it only seems to happen on an SSL instance. Are those SSL characters?

rlWebRequestCodingStrategy - Invalid URL:
main?x=KHsKMhrrd-D04mkpqd*xsmCmGwRvNVoUPmz4BBdww8DLo4rNdEHOs25kQrwCz-EEu7JIh1GOXL7GXVhqHfJi1g,
exception type: org.apache.wicket.WicketRuntimeException, exception
message:Unable to decrypt the text '({
2�w���i)�߱�`�o5Zl�p��ˣ��tAγndB�����H�Q�\��]Xj�'


rlWebRequestCodingStrategy - Invalid URL:
index?x=VW*oMOXmPA45gt7EO0OOeRiN8uhyKItwgoWqwWlZ*lR8ZeIsSmwzQbUDlRP3tVdzdGh8Pip3ADKeTYmyhTpchGgpRzZ3zk9VXNgd*gsOzXSO82y0IFHnIMMwLOxki2efPPU7e1vM*Wo,
exception type: org.apache.wicket.WicketRuntimeException, exception
message:Unable to decrypt the text
'Uo�0��9���;C�y���r(�p����iY�T|e�,Jl3A����Wsth|*w

Thanks

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



Re: Getting Redirected To A Resource Reference (Image, CSS) On Invalid URL

2011-07-07 Thread Martin Grigorov
Try to eliminate the candidates for the problem:
- remove the encrypting and try
- remove SSL and try

On Thu, Jul 7, 2011 at 4:06 PM, Horacio Natyural
horacio.natyu...@gmail.com wrote:
 Hi,

 anyone ever encountered this kind of error?
 i'm getting another page whenever I get this error. It's very
 intermettent and I'm not sure what's causing it.
 it only seems to happen on an SSL instance. Are those SSL characters?

 rlWebRequestCodingStrategy - Invalid URL:
 main?x=KHsKMhrrd-D04mkpqd*xsmCmGwRvNVoUPmz4BBdww8DLo4rNdEHOs25kQrwCz-EEu7JIh1GOXL7GXVhqHfJi1g,
 exception type: org.apache.wicket.WicketRuntimeException, exception
 message:Unable to decrypt the text '({
 2 �w���i)�߱�`�  o5Z l�  p��ˣ��tAγndB� �� 
 ��H�Q�\��]Xj �'


 rlWebRequestCodingStrategy - Invalid URL:
 index?x=VW*oMOXmPA45gt7EO0OOeRiN8uhyKItwgoWqwWlZ*lR8ZeIsSmwzQbUDlRP3tVdzdGh8Pip3ADKeTYmyhTpchGgpRzZ3zk9VXNgd*gsOzXSO82y0IFHnIMMwLOxki2efPPU7e1vM*Wo,
 exception type: org.apache.wicket.WicketRuntimeException, exception
 message:Unable to decrypt the text
 'Uo�0�� 9���;C�y 
 ���r(�p����iY�T|e�,Jl3A� � ��Wsth|*w

 Thanks

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





-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



UrlCompressingWebCodingStrategy

2011-07-07 Thread Horacio Natyural
Hi,

How do I replace the word 'wicket' that appears in
UrlCompressingWebCodingStrategy?



Thanks!
Carlo

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



Re: How to turn off the ModificationWatcher Task?

2011-07-07 Thread eugenebalt
Hi,

We already do setResourcePollFrequency(null). But the Debug statements still
keep appearing every half-a-second. I can't close my Console window in
Eclipse because it immediately re-appears with more messages. The question
is still open, how to turn off these ModificationWatcher messages?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-turn-off-the-ModificationWatcher-Task-tp3526322p3651700.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: How to turn off the ModificationWatcher Task?

2011-07-07 Thread Martin Grigorov
The answer is still the same.
Put a breakpoint in
org.apache.wicket.settings.Settings.getResourceWatcher(boolean) and
see why it enables.

On Thu, Jul 7, 2011 at 4:45 PM, eugenebalt eugeneb...@yahoo.com wrote:
 Hi,

 We already do setResourcePollFrequency(null). But the Debug statements still
 keep appearing every half-a-second. I can't close my Console window in
 Eclipse because it immediately re-appears with more messages. The question
 is still open, how to turn off these ModificationWatcher messages?

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/How-to-turn-off-the-ModificationWatcher-Task-tp3526322p3651700.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





-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: UrlCompressingWebCodingStrategy

2011-07-07 Thread Horacio Natyural
it seems that wicket is hard coded in the code...
is there anyway that this could be replaced?

are there any other webcodingstrategies other than urlcompressing and
encryptedurlstrategy?

Thanks

On Thu, Jul 7, 2011 at 10:36 PM, Horacio Natyural
horacio.natyu...@gmail.com wrote:
 Hi,

 How do I replace the word 'wicket' that appears in
 UrlCompressingWebCodingStrategy?



 Thanks!
 Carlo


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



Re: UrlCompressingWebCodingStrategy

2011-07-07 Thread Martin Grigorov
In 1.4 this is not possible.
In 1.5 it was possible in the early RCs but now this parameter is not
even needed.

On Thu, Jul 7, 2011 at 5:09 PM, Horacio Natyural
horacio.natyu...@gmail.com wrote:
 it seems that wicket is hard coded in the code...
 is there anyway that this could be replaced?

 are there any other webcodingstrategies other than urlcompressing and
 encryptedurlstrategy?

 Thanks

 On Thu, Jul 7, 2011 at 10:36 PM, Horacio Natyural
 horacio.natyu...@gmail.com wrote:
 Hi,

 How do I replace the word 'wicket' that appears in
 UrlCompressingWebCodingStrategy?



 Thanks!
 Carlo


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





-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: UrlCompressingWebCodingStrategy

2011-07-07 Thread Horacio Natyural
i just removed encryption from cryptedurlcodingstrategy instead...
seems to remove the wicket word

Thanks

On Thu, Jul 7, 2011 at 11:11 PM, Martin Grigorov mgrigo...@apache.org wrote:
 In 1.4 this is not possible.
 In 1.5 it was possible in the early RCs but now this parameter is not
 even needed.

 On Thu, Jul 7, 2011 at 5:09 PM, Horacio Natyural
 horacio.natyu...@gmail.com wrote:
 it seems that wicket is hard coded in the code...
 is there anyway that this could be replaced?

 are there any other webcodingstrategies other than urlcompressing and
 encryptedurlstrategy?

 Thanks

 On Thu, Jul 7, 2011 at 10:36 PM, Horacio Natyural
 horacio.natyu...@gmail.com wrote:
 Hi,

 How do I replace the word 'wicket' that appears in
 UrlCompressingWebCodingStrategy?



 Thanks!
 Carlo


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





 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com

 -
 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: Generate PDF

2011-07-07 Thread Igor Vaynberg
put a target=export attribute on the link tag.

-igor

On Thu, Jul 7, 2011 at 5:32 AM, ramlael grambab...@gmail.com wrote:
 Hi Friends,

 I have requirement need to generate pdf with string data which is in byte
 stream and need to open in new window (pop up).  I have used below code ,
 but its displaying in same window, not in pop up.. please can you help me on
 this.

  public void downloadPdf(RequestCycle requestCycle, final String
 eStatement, String filename) {

        final WebResponse webResponse = (WebResponse)
 requestCycle.getResponse();
        webResponse.setContentType(APPLICATION/PDF);
        webResponse.setHeader(Content-Disposition, inline; filename=\ +
 filename + \);
        requestCycle.setRequestTarget(new IRequestTarget() {

            public void respond(RequestCycle requestCycle) {
                try {

                    OutputStream stream = webResponse.getOutputStream();
                    OutputStreamWriter writer = new
 OutputStreamWriter(stream, ISO-8859-1);
                    writer.write(eStatement);
                   writer.flush();
                    writer.close();
                } catch (IOException ex) {
                    ex.printStackTrace();
                }
            }

            public void detach(RequestCycle requestCycle) {
            }

        });
    }


 Thanks in advance
 Rambabu

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Generate-PDF-tp3651354p3651354.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



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



Re: [ANNOUNCE] Wicketopia 0.9 Released...

2011-07-07 Thread androidcoolguy
James,

I am a new user of wicketopia :) I tried your cool tool and I got the NPE
error. I am not sure what else need to be configured for Spring to inject
PersistenceProvider. It might not be injected due to something I need to
setup in the Spring applicationContext?

Would you mind sharing the xml file or throw some light?

Thanks.

My codes -

package wicket.pages;

import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.model.Model;
import org.apache.wicket.spring.injection.annot.SpringBean;
import org.wicketopia.persistence.PersistenceProvider;
import org.wicketopia.persistence.component.scaffold.Scaffold;

import com.appspot.cloudserviceapi.media.xmm.Movies;

public class HomePage extends WebPage {
@SpringBean
private PersistenceProvider persistenceProvider;

public HomePage() {
add(new Label(message, new Model(Hello World!)));
add(new ScaffoldMovies(scaffold, Movies.class,
persistenceProvider));
}

}

The NPE is -

Unexpected RuntimeException

WicketMessage: Can't instantiate page using constructor public
wicket.pages.HomePage()

Root cause:

java.lang.NullPointerException
 at
org.wicketopia.persistence.component.scaffold.Scaffold.init(Scaffold.java:85)
 at wicket.pages.HomePage.init(HomePage.java:24)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
 at
com.google.appengine.tools.development.agent.runtime.Runtime.newInstance_(Runtime.java:112)
 at
com.google.appengine.tools.development.agent.runtime.Runtime.newInstance(Runtime.java:120)
 at
org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:192)
 at
org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:57)
 at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:298)
 at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:320)
 at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:234)
 at
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
 at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1250)
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)
 at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
 at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486)
 at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:319)
 at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
 at
com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java:35)
 at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
 at
com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:58)
 at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
 at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
 at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
 at
com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:122)
 at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
 at
com.google.appengine.tools.development.BackendServersFilter.doFilter(BackendServersFilter.java:97)
 at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
 at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
 at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
 at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
 at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
 at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
 at
com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:70)
 at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
 at
com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:351)
 at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
 at org.mortbay.jetty.Server.handle(Server.java:326)
 at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
 at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
 at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
 at 

Optional validation

2011-07-07 Thread Viktoras

Hi list,

I've got  an edit account window, where administrator/account owner 
can optionally change password, that is:
* if he intents not to change his current password, he leaves password 
and confirm password fields empty;
* to change password, standart form validators should apply, that's 
where i'd like to use EqualPasswordInputValidator and PatternValidator.


Currently i solved it by just writing my own form validator, but it 
seems like all i'm doing is rewriting those standard validators with an 
emtpy field check before that. Is there a better approach to this?


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



Re: Optional validation

2011-07-07 Thread Igor Vaynberg
validators are not called if the fields are left blank...

-igor

On Thu, Jul 7, 2011 at 12:59 PM, Viktoras ituden.ui...@gmail.com wrote:
 Hi list,

 I've got  an edit account window, where administrator/account owner can
 optionally change password, that is:
 * if he intents not to change his current password, he leaves password and
 confirm password fields empty;
 * to change password, standart form validators should apply, that's where
 i'd like to use EqualPasswordInputValidator and PatternValidator.

 Currently i solved it by just writing my own form validator, but it seems
 like all i'm doing is rewriting those standard validators with an emtpy
 field check before that. Is there a better approach to this?

 -
 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



IConverter.convertToObject not called

2011-07-07 Thread T P D

I've added an IConverter to a TextFieldString, to do formatting.

The converter's convertToString method is called on render, but 
convertToObject is not called on form submit.


Some of the Wicket 1.3 examples suggest that this is a known problem, 
and suggest using a wrapper type as a work-around.


As my experience suggests, is this stil teh problem in 1.4.x?

Thanks.

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



Re: IConverter.convertToObject not called

2011-07-07 Thread Igor Vaynberg
this is not a problem. yoru textfield's input is already a string, so
there is no need to convert it to a string. String
convertToObject(String) doesnt make sense.

-igor

On Thu, Jul 7, 2011 at 4:36 PM, T P D li...@diffenbach.org wrote:
 I've added an IConverter to a TextFieldString, to do formatting.

 The converter's convertToString method is called on render, but
 convertToObject is not called on form submit.

 Some of the Wicket 1.3 examples suggest that this is a known problem, and
 suggest using a wrapper type as a work-around.

 As my experience suggests, is this stil teh problem in 1.4.x?

 Thanks.

 -
 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



How can I encapsulate similar behavior yet varying markup?

2011-07-07 Thread T P D
I want to add several collapsable ListViews: a listview paired with a 
button to toggle showing either the full list or the fist N elements.


But each listview's populateItem and corresponding markup will be different.

If I write a Wicket Panel, I'm not only locked-in to one set of markup.

I must also new up the ListView in the Panel's constructor, which means 
I can't vary the code in ListView's overridden anonymous-class 
populateItem, as I could if I passed in ListView instance.


MyPanel() {
  add( new ListView(someid) {
void populateItem( ListItem i ) {
  i.add( new Label(foo) ...



If I instead pass in the ListView, then any user of my Panel class can 
pass in any instance or anonymous instance of ListView -- but my Panel 
can't call listView.setId() on the already constructed ListView to make 
its id match the id in the Panel's markup.


This seems like a simple thing, make two components collaborators and 
make that reusable, but the only way to do it seems to be to write a 
WebMarkupContainer-derived class, and pass in the ids, rather than 
writing a Panel.


is there a simpler way I'm not seeing?

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



Re: IConverter.convertToObject not called

2011-07-07 Thread T P D
I see your point -- because you're right, it's not a /type/ conversion 
I'm looking for.


But I am looking for a /format/ conversion. It would be handy if 
IConverter allowed that too, by unconditionally applying the conversion.


The Wicket example of formatting phone numbers 
(http://www.wicket-library.com/wicket-examples/forminput) demonstrates 
this use case, and complains about the need for a work-around:


/**
 * Represents a US phone number. We use this instead of the direct 
string to trigger conversion to
 * and from string. Conversion in general may be re-evaluated in Wicket 
1.3, hopefully making this a

 * hack from the past by then.
 *
 * @author Eelco Hillenius
 */

Is there by now a better work-around?

Or even handier, if say, a Google Guava Function or Apache Collections 
Transformer could be added to components to do arbitrary conversions.


(Guava's T FunctionF,T.apply(F)  takes an F and returns a T; Apache 
Collections is similar, but without generics. Either library allows 
Functions/Transformers to be arbitrarily composed (or chained).


On 7/7/2011 7:41 PM, Igor Vaynberg wrote:

this is not a problem. yoru textfield's input is already a string, so
there is no need to convert it to a string. String
convertToObject(String) doesnt make sense.

-igor

On Thu, Jul 7, 2011 at 4:36 PM, T P Dli...@diffenbach.org  wrote:

I've added an IConverter to a TextFieldString, to do formatting.

The converter's convertToString method is called on render, but
convertToObject is not called on form submit.

Some of the Wicket 1.3 examples suggest that this is a known problem, and
suggest using a wrapper type as a work-around.

As my experience suggests, is this stil teh problem in 1.4.x?

Thanks.

-
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: How can I encapsulate similar behavior yet varying markup?

2011-07-07 Thread Igor Vaynberg
a)

class mypanel extends panel {
  mypanel () {
add(new listview() { onpopulateitem(item) {
mypanel.this.onpopulateitem(): }{});
  }
  protected abstract onpopulateitem(item);
}

b) instead of trying to encapsulate both the listview and the button
in the component make a reusable button

class listviewcollapsebutton extends button {
 private listview view;
 private boolean expanded=true;
 onsubmit() { expanded=!expanded; if (expanded)
view.setitemsperpage(100); else {view.setitemsperpage(5);}
view.setcurrentpage(0); }
}

then its as easy as new listviewcollapsebutton(collapse, listview);

-igor


On Thu, Jul 7, 2011 at 4:50 PM, T P D li...@diffenbach.org wrote:
 I want to add several collapsable ListViews: a listview paired with a
 button to toggle showing either the full list or the fist N elements.

 But each listview's populateItem and corresponding markup will be different.

 If I write a Wicket Panel, I'm not only locked-in to one set of markup.

 I must also new up the ListView in the Panel's constructor, which means I
 can't vary the code in ListView's overridden anonymous-class populateItem,
 as I could if I passed in ListView instance.

 MyPanel() {
  add( new ListView(someid) {
    void populateItem( ListItem i ) {
      i.add( new Label(foo) ...



 If I instead pass in the ListView, then any user of my Panel class can pass
 in any instance or anonymous instance of ListView -- but my Panel can't call
 listView.setId() on the already constructed ListView to make its id match
 the id in the Panel's markup.

 This seems like a simple thing, make two components collaborators and make
 that reusable, but the only way to do it seems to be to write a
 WebMarkupContainer-derived class, and pass in the ids, rather than writing a
 Panel.

 is there a simpler way I'm not seeing?

 -
 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: IConverter.convertToObject not called

2011-07-07 Thread Igor Vaynberg
class functionmodel implements imodel {
  private final imodel delegate;
  private final function get, set;

   public object getobject() { return get.apply(delegate.getobject(); }
   public object setobject(val) { delegate.setobject(set.apply(val)); }
}

new textfield(foo, new functionmodel(textmodel, uppercase, lowercase));

-igor


On Thu, Jul 7, 2011 at 5:03 PM, T P D li...@diffenbach.org wrote:
 I see your point -- because you're right, it's not a /type/ conversion I'm
 looking for.

 But I am looking for a /format/ conversion. It would be handy if IConverter
 allowed that too, by unconditionally applying the conversion.

 The Wicket example of formatting phone numbers
 (http://www.wicket-library.com/wicket-examples/forminput) demonstrates this
 use case, and complains about the need for a work-around:

 /**
  * Represents a US phone number. We use this instead of the direct string to
 trigger conversion to
  * and from string. Conversion in general may be re-evaluated in Wicket 1.3,
 hopefully making this a
  * hack from the past by then.
  *
  * @author Eelco Hillenius
  */

 Is there by now a better work-around?

 Or even handier, if say, a Google Guava Function or Apache Collections
 Transformer could be added to components to do arbitrary conversions.

 (Guava's T FunctionF,T.apply(F)  takes an F and returns a T; Apache
 Collections is similar, but without generics. Either library allows
 Functions/Transformers to be arbitrarily composed (or chained).

 On 7/7/2011 7:41 PM, Igor Vaynberg wrote:

 this is not a problem. yoru textfield's input is already a string, so
 there is no need to convert it to a string. String
 convertToObject(String) doesnt make sense.

 -igor

 On Thu, Jul 7, 2011 at 4:36 PM, T P Dli...@diffenbach.org  wrote:

 I've added an IConverter to a TextFieldString, to do formatting.

 The converter's convertToString method is called on render, but
 convertToObject is not called on form submit.

 Some of the Wicket 1.3 examples suggest that this is a known problem, and
 suggest using a wrapper type as a work-around.

 As my experience suggests, is this stil teh problem in 1.4.x?

 Thanks.

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



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




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



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