Re: [Wicket-user] Modal Window and "Page Expired".

2007-07-18 Thread
I want to descript the context.
Some one write a web application based on wicket.Many pages uses ajax.
I encoutered a strange problem.
After 5 ajax modal windows are poped up.The brower will give me a warming 
dialog to tell me that the current browse page will be closed.Then the page is 
redirected to a login page.Sure ,this means the session is out.

I tries someway:
1 Clear the IE cookies.
2 Clear the tomcat workdir
3 force the tomcat use url-rewrite mode.
4 close the IE cookies.

Then the application works fine.
Maybe you need close the browse cookie and use tomcat url-rewrite both.
Try it.



> - Original Message - 
> From: "Igor Vaynberg" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; 
> Sent: Wednesday, July 18, 2007 2:49 PM
> Subject: Re: [Wicket-user] Modal Window and "Page Expired".
> 
> 
>> On 7/13/07, Laurent Brucher <[EMAIL PROTECTED]> wrote:
>>>
>>>  Hi all,
>>>
>>> There was a post last December about the same problem that I'm facing
>>> right now, which is getting a page expired error page after I close a modal
>>> window.
>>> The post was called "Firefox and ModalWindow" and seemed to talk about the
>>> issue for FF only.
>>> I've encountered the problem first with FF (2.0.0.4). After reading the
>>> post, I tried with IE7 and it worked ok (that was this afternoon).
>>> This evening, neither IE7 or FF work anymore. Darn! Clearing cookies and
>>> stuff don't change a thing.
>>> Oh, and of course, the Ajax ModalWindow example works just fine (my code
>>> is heavily inspired from that example)...
>>> I'm using Wicket 1.2.6, Tomcat 5.5.20, Jdk1.6u2.
>>>
>>> Have you guys shed any light on this issue at all?
>>> I've tried to trace the code, but as I'm rather new to Wicket, I couldn't
>>> really figure out what's going on...
>>>
>>> Anything I can do to help address this?
>>>
>> 
>> i wonder, clear cookies in firefox and try again. i know there was a similar
>> problem if you didnt set the cookie name in the modal window using
>> setcookiename(), but looks like you did that. still, try clearing the
>> cookies.
>> 
>> -igor
>> 
>> 
>> 
>> 
>> Below is the code I use, just in case.
>>>
>>> Reagrds,
>>> Laurent.
>>>
>>>
>>> // Page containing the modal window
>>> public class MainPage extends WebPage {
>>> public MainPage()
>>> {
>>> ...
>>> add( *new* PreferredStationsDialog("prefStationsDialog") );
>>> ...
>>> }
>>> }
>>>
>>> // The modal window impl.
>>> public class PreferredStationsDialog extends ModalWindow {
>>> *public* PreferredStationsDialog(String id)
>>> {
>>> *super*(id);
>>>
>>> setTitle("xyz");
>>> setCookieName("prefStationsDialog");
>>> setPageMapName("prefStationsDialogPageMap");
>>> setPageCreator( *new* ModalWindow.PageCreator() {
>>> @Override
>>> *public* Page createPage() {
>>> *return* 
>>> *new*PreferredStationsDialogPage(PreferredStationsDialog.
>>> *this*);
>>> }
>>> });
>>>
>>> setCloseButtonCallback(*new* ModalWindow.CloseButtonCallback() {
>>> *public* *boolean* onCloseButtonClicked(AjaxRequestTarget
>>> target) {
>>> *return* *true*;
>>> }
>>> });
>>> }
>>> }
>>>
>>> // The content of the modal window, as a Page
>>> public class PreferredStationsDialogPage extends WebPage
>>> {
>>> *public* PreferredStationsDialogPage( *final* PreferredStationsDialog
>>> dialog )
>>> {
>>> *super*();
>>>
>>> add( *new* AjaxLink("button.save") {
>>> @Override
>>> *public* *void* onClick(AjaxRequestTarget target) {
>>> dialog.*close*(target);
>>> }
>>> }.add( *new* Label("text", "Save")) );
>>>
>>> add( *new* AjaxLink("button.cancel") {
>>> @Override
>>> *public* *void* onClick(AjaxRequestTarget target) {
>>> dialog.*close*(target);
>>> }
>>> }.add( *new* Label("text", "Cancel")) );
>>> }
>>> }
>>>
>>>
>>> -
>>> This SF.net email is sponsored by DB2 Express
>>> Download DB2 Express C - the FREE version of DB2 express and take
>>> control of your XML. No limits. Just data. Click to get it now.
>>> http://sourceforge.net/powerbar/db2/
>>> ___
>>> Wicket-user mailing list
>>> Wicket-user@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>>
>>>
>> -
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> ___
>> Wicket-user mailing list
>> Wicket-user@lists.sourceforge.net
>> https://list

Re: [Wicket-user] Fw: Modal Window and "Page Expired".

2007-07-17 Thread
What i mean is not turn the cookie off in the browser.
Just change the server session mode.
You can refer
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html 


- Original Message - 
From: "Laurent Brucher" <[EMAIL PROTECTED]>
To: 
Sent: Wednesday, July 18, 2007 1:16 AM
Subject: Re: [Wicket-user] Fw: Modal Window and "Page Expired".


>I turned off cookies in FFox but that doesn't change anything :(
> 
> As I previously said, the Ajax/ModalWindow sample in the wicket-examples
> works fine for me (deployed in the same Tomcat instance as my app).
> One difference I found with my environement is that all the URLs in the
> examples are bookmarkable. Mine are not.
> I don't really know whether this matters at all or not.
> 
> What I can see by tracing the code is that the page that the app is trying
> to go back to after the modal window is closed does not exist in the pagemap
> anymore. Hence the page expired. I have not figured out why yet but any clue
> would be helpful.
> 
> Laurent.
> 
> 
>  _  
> 
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of ??
> Sent: mardi 17 juillet 2007 7:27
> To: wicket-user@lists.sourceforge.net
> Subject: [Wicket-user] Fw: Modal Window and "Page Expired".
> 
> 
> 
> 
> Maybe,you can try the server running on url-rewrite mode instead of cookie.
> I encoutered the same problem on IE,but the same problem won't happen on FF.
> After i change the session mode from cookie to url-rewrite,it works fine.
> You also can reverse what i did.
> 
> - Original Message - 
> From: Laurent Brucher   
> To: wicket-user@lists.sourceforge.net 
> Sent: Saturday, July 14, 2007 4:41 AM
> Subject: [Wicket-user] Modal Window and "Page Expired".
> 
> Hi all,
> 
> There was a post last December about the same problem that I'm facing right
> now, which is getting a page expired error page after I close a modal
> window.
> The post was called "Firefox and ModalWindow" and seemed to talk about the
> issue for FF only.
> I've encountered the problem first with FF (2.0.0.4). After reading the
> post, I tried with IE7 and it worked ok (that was this afternoon).
> This evening, neither IE7 or FF work anymore. Darn! Clearing cookies and
> stuff don't change a thing.
> Oh, and of course, the Ajax ModalWindow example works just fine (my code is
> heavily inspired from that example)...
> I'm using Wicket 1.2.6, Tomcat 5.5.20, Jdk1.6u2.
> 
> Have you guys shed any light on this issue at all?
> I've tried to trace the code, but as I'm rather new to Wicket, I couldn't
> really figure out what's going on...
> 
> Anything I can do to help address this?
> Below is the code I use, just in case.
> 
> Reagrds,
> Laurent.
> 
> 
> // Page containing the modal window
> public class MainPage extends WebPage {
>public MainPage()
>{
>...
>add( new PreferredStationsDialog("prefStationsDialog") );
>...
>}
> }
> 
> // The modal window impl.
> public class PreferredStationsDialog extends ModalWindow {
>public PreferredStationsDialog(String id)
>{
>super(id);
> 
>setTitle("xyz");
>setCookieName("prefStationsDialog");
>setPageMapName("prefStationsDialogPageMap");
>setPageCreator( new ModalWindow.PageCreator() {
>@Override
>public Page createPage() {
>return new
> PreferredStationsDialogPage(PreferredStationsDialog.this);
>}
>});
> 
>setCloseButtonCallback(new ModalWindow.CloseButtonCallback() {
>public boolean onCloseButtonClicked(AjaxRequestTarget target) {
>return true;
>}
>});
>}
> }
> 
> // The content of the modal window, as a Page
> public class PreferredStationsDialogPage extends WebPage
> {
>public PreferredStationsDialogPage( final PreferredStationsDialog dialog
> )
>{
>super();
> 
>add( new AjaxLink("button.save") {
>@Override
>public void onClick(AjaxRequestTarget target) {
>dialog.close(target);
>}
>}.add( new Label("text", "Save")) );
> 
>add( new AjaxLink("button.cancel") {
>@Override
>public void onClick(AjaxRequestTarget target) {
>dialog.close(target);
>}
>}.add( new Label("text", "Cancel")) );
>}
> }
> 
> 
> 
> 
>  _  
> 
> 
> 
> 
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/ 
> 
> 
> 
>  _  
> 
> 
> 
> 
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 
> -

[Wicket-user] Fw: Modal Window and "Page Expired".

2007-07-16 Thread




Maybe,you can try the server running on url-rewrite mode instead of cookie.
I encoutered the same problem on IE,but the same problem won't happen on FF.
After i change the session mode from cookie to url-rewrite,it works fine.
You also can reverse what i did.
  - Original Message - 
  From: Laurent Brucher 
  To: wicket-user@lists.sourceforge.net 
  Sent: Saturday, July 14, 2007 4:41 AM
  Subject: [Wicket-user] Modal Window and "Page Expired".


  Hi all,

  There was a post last December about the same problem that I'm facing right 
now, which is getting a page expired error page after I close a modal window.
  The post was called "Firefox and ModalWindow" and seemed to talk about the 
issue for FF only.
  I've encountered the problem first with FF (2.0.0.4). After reading the post, 
I tried with IE7 and it worked ok (that was this afternoon).
  This evening, neither IE7 or FF work anymore. Darn! Clearing cookies and 
stuff don't change a thing.
  Oh, and of course, the Ajax ModalWindow example works just fine (my code is 
heavily inspired from that example)...
  I'm using Wicket 1.2.6, Tomcat 5.5.20, Jdk1.6u2.

  Have you guys shed any light on this issue at all?
  I've tried to trace the code, but as I'm rather new to Wicket, I couldn't 
really figure out what's going on...

  Anything I can do to help address this?
  Below is the code I use, just in case.

  Reagrds,
  Laurent.


  // Page containing the modal window
  public class MainPage extends WebPage {
  public MainPage()
  {
  ...
  add( new PreferredStationsDialog("prefStationsDialog") );
  ...
  }
  }

  // The modal window impl.
  public class PreferredStationsDialog extends ModalWindow {
  public PreferredStationsDialog(String id)
  {
  super(id);

  setTitle("xyz");
  setCookieName("prefStationsDialog");
  setPageMapName("prefStationsDialogPageMap");
  setPageCreator( new ModalWindow.PageCreator() {
  @Override
  public Page createPage() {
  return new 
PreferredStationsDialogPage(PreferredStationsDialog.this);
  }
  });

  setCloseButtonCallback(new ModalWindow.CloseButtonCallback() {
  public boolean onCloseButtonClicked(AjaxRequestTarget target) {
  return true;
  }
  });
  }
  }

  // The content of the modal window, as a Page
  public class PreferredStationsDialogPage extends WebPage
  {
  public PreferredStationsDialogPage( final PreferredStationsDialog dialog )
  {
  super();

  add( new AjaxLink("button.save") {
  @Override
  public void onClick(AjaxRequestTarget target) {
  dialog.close(target);
  }
  }.add( new Label("text", "Save")) );

  add( new AjaxLink("button.cancel") {
  @Override
  public void onClick(AjaxRequestTarget target) {
  dialog.close(target);
  }
  }.add( new Label("text", "Cancel")) );
  }
  }



--


  -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/ 


--


  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] What features do want to show in wicket demo

2007-04-23 Thread


I choose hibernate or ibatis insteadof JPA.
 One reason is i am not familiar with it and have much experenices on hibernate.
 As far as criteria,i prefer to OJB.
 
 Blog is a good idea.
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] What features do want to show in wicket demo

2007-04-22 Thread
I will begin a open source project for wicket which name is pupa.
I hope it can be a best practice for wicket users.
Wicket1.3 is the best choice to write the project,becuase i think stateless 
page is very important feature.
But wicket2.0 is too far to use.
So ,i need more advices about the features in the demo.
I also want know which ORM framework is your favourite,Hibernate or 
IBatis,maybe OJB is not bad.

One world, one dream.
I like it.-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] A forum about wicket in china

2007-04-19 Thread
I take a forum about wicket in china.
You can access it by the following url.
http://gocom.primeton.com/modules/newbb/viewforum41.htm

If you want to know more about wicket in china.
try it.

my open-source software is in the release stage.
After it,i will begin a pupa project for wicket.
I hope it can be a best practice for wicket users.-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] The problem about encoding and event in ajax

2006-09-22 Thread



I think this problem is caused by 
javaSciprt.
Additionally, i can use textfield with 
ajx.
There is no problems.
 
The following is the code.
The code are simple,most of them are the same as the 
example of ajax.
Just with a println statement to show whether there is 
a event while input a chinese word.
Thanks for all of you to give me advice.
 
Html Template:

 

 
Country: 
 

 
 
Java Code:
 
public class AutoPage extends WebPage {
 
 public AutoPage() 
{  super();  Form form = new 
Form("form");  add(form);  AutoCompleteTextField 
textField;  textField = new AutoCompleteTextField("ac", new 
Model("")) {   protected Iterator getChoices(String input) 
{
 
String 
newInput;try {
 
 newInput = new 
String(input.getBytes("iso8859-1"), "UTF-8");
 
} catch 
(UnsupportedEncodingException e) 
{ e.printStackTrace(); newInput 
= input;}
 
if (Strings.isEmpty(input)) 
{ return 
Collections.EMPTY_LIST.iterator();}
 
List choices = new 
ArrayList(10);
 
Locale[] locales = 
Locale.getAvailableLocales();
 
for (int i = 0; i < 
locales.length; i++) { final Locale locale = 
locales[i]; final String country = 
locale.getDisplayCountry();
 
 if 
(country.toUpperCase().startsWith(input.toUpperCase())) 
{  choices.add(country);  if 
(choices.size() == 10) 
{   break;  } }}
 
return 
choices.iterator();   }  };
 
  form.add(textField); }}
 
 

  - Original Message - 
  From: 
  Johan 
  Compagner 
  To: wicket-user@lists.sourceforge.net 
  
  Sent: Friday, September 22, 2006 4:56 
PM
  Subject: Re: [Wicket-user] The problem about 
  encoding and event in ajax
  for this we need to have a sample case.Also i checked 
  in a encoding problem in the 1.2.x branch (and 2.0 but i don't think that one 
  is completely fixed yet...)So if you could build/test it from svn maybe it 
  is fixed then. johan
  On 9/22/06, 王磊 
  <[EMAIL PROTECTED]> 
  wrote: 
  Also 
it brings some trouble,but i can solve the problem of encoding.But i 
can't know why there is not a event in the server while i input or paste a 
chinese word in the AutoCompleteTextField.I am not 
familiar  with _javascript_. Thanks for your advice 
.- Original Message -From: "Martijn Dashorst" 
<[EMAIL PROTECTED]>To: 
< 
wicket-user@lists.sourceforge.net>Sent: Friday, September 22, 
2006 3:52 PMSubject: Re: [Wicket-user] The problem about encoding and 
event in ajax> We have had some problems with Ajax and UTF-8 
encoding. You'll have to > configure the uri encoding on your 
httpconnector to use UTF-8. In> tomcat that would go into your 
server.xml>> Martijn>> On 9/22/06, 王磊 < [EMAIL PROTECTED]> 
wrote:>> In fact, i use utf-8 as my coding.>> The 
following is the content of the html.>>>>>> 
 >> 
>> >> >> 
>> >> Country:  >> >> 
>>>> I also tried many ways>> 
1.keep meta charset or remove it.>> 2.keep  or remove it. >>>> I can't get the 
right result.>>>> Another problem>> You can 
copy a chinese word and paste to the AutoCompleteTextField, no event will 
fired.You can see it in the server side. 
>>>>>> - Original Message 
->> From: "Erik van Oosten" <[EMAIL PROTECTED]>>> 
To: < 
wicket-user@lists.sourceforge.net>>> Sent: Friday, 
September 22, 2006 3:03 PM>> Subject: Re: [Wicket-user] The 
problem about encoding and event in ajax>>>>>> 
> Dear ??, >> >>> > The problem is because you 
can not encode Chinese characters in>> > ISO-8859-1. You must 
use UTF-8 throughout your application.>> >>> > 
> String newInput = new String( input.getBytes("iso8859-1"), 
"UTF-8");>> > first converts the string to ISO8859-1 and 
thereby replaces all Chinese>> > characters with a 
"?".>> >>> > Please make sure that the HTML pages 
that Wicket renders are in UTF-8. >> > This true by default, 
but to be sure you could do>> 
>getRequestCycleSettings().setResponseRequestEncoding("UTF-8")>> 
>>> > Then replace the line above with: >> > 
String newInput = input;>> >>> > 
Regards,>> > Erik.>> 
>>> >>> > 王磊 schreef:>> >> I 
just try to write a book about wicket.(It's written in chinese,

Re: [Wicket-user] The problem about encoding and event in ajax

2006-09-22 Thread
Also it brings some trouble,but i can solve the problem of encoding.

But i can't know why there is not a event in the server while i input or paste 
a chinese word in the AutoCompleteTextField.
I am not familiar  with javascript.

Thanks for your advice .



- Original Message - 
From: "Martijn Dashorst" <[EMAIL PROTECTED]>
To: 
Sent: Friday, September 22, 2006 3:52 PM
Subject: Re: [Wicket-user] The problem about encoding and event in ajax


> We have had some problems with Ajax and UTF-8 encoding. You'll have to
> configure the uri encoding on your httpconnector to use UTF-8. In
> tomcat that would go into your server.xml
> 
> Martijn
> 
> On 9/22/06, 王磊 <[EMAIL PROTECTED]> wrote:
>> In fact, i use utf-8 as my coding.
>> The following is the content of the html.
>>
>>
>> 
>> 
>> 
>> 
>> 
>> 
>> Country: > />
>> 
>> 
>>
>> I also tried many ways
>> 1.keep meta charset or remove it.
>> 2.keep  or remove it.
>>
>> I can't get the right result.
>>
>> Another problem
>> You can copy a chinese word and paste to the AutoCompleteTextField, no event 
>> will fired.You can see it in the server side.
>>
>>
>> - Original Message -
>> From: "Erik van Oosten" <[EMAIL PROTECTED]>
>> To: 
>> Sent: Friday, September 22, 2006 3:03 PM
>> Subject: Re: [Wicket-user] The problem about encoding and event in ajax
>>
>>
>> > Dear ??,
>> >
>> > The problem is because you can not encode Chinese characters in
>> > ISO-8859-1. You must use UTF-8 throughout your application.
>> >
>> > > String newInput = new String(input.getBytes("iso8859-1"), "UTF-8");
>> > first converts the string to ISO8859-1 and thereby replaces all Chinese
>> > characters with a "?".
>> >
>> > Please make sure that the HTML pages that Wicket renders are in UTF-8.
>> > This true by default, but to be sure you could do
>> >getRequestCycleSettings().setResponseRequestEncoding("UTF-8")
>> >
>> > Then replace the line above with:
>> > String newInput = input;
>> >
>> > Regards,
>> > Erik.
>> >
>> >
>> > 王磊 schreef:
>> >> I just try to write a book about wicket.(It's written in chinese,and
>> >> it's free to get a e-book).
>> >> But while i writing a ajax example,i got a stange problem.
>> >>
>> >> I writed a auto-complete text application with AutoCompleteTextField
>> >> control.
>> >> But i got the following 2 problems.
>> >>
>> >> 1. If i input a chinese word,no request is sent to the server side.(I
>> >> write "println" in server application,no output).
>> >>
>> >> 2. If in input a chinese word,then input a letter like 'd',the server
>> >> side will get a string input like "???d", it's in wrong code. I use
>> >> the following code to get the right input.
>> >>
>> >> String newInput = new String(input.getBytes("iso8859-1"), "UTF-8");
>> >>
>> >>
>> >> I think these problems are caused by javascript,because i am not
>> >> familiar with javascript.
>> >> So i can't give reasons.
>> >> May somebody can give a patch.
>> >
>> > --
>> > Erik van Oosten
>> > http://www.day-to-day-stuff.blogspot.com/
>> >
>> >
>> > -
>> > Take Surveys. Earn Cash. Influence the Future of IT
>> > Join SourceForge.net's Techsay panel and you'll get the chance to share 
>> > your
>> > opinions on IT & business topics through brief surveys -- and earn cash
>> > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> > ___
>> > Wicket-user mailing list
>> > Wicket-user@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/wicket-user
>> >
>> -
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to share your
>> opinions on IT & business topics through brief surveys -- and earn cash
>> http://www.techsay.com/default.php?page=join.php&p=s

Re: [Wicket-user] The problem about encoding and event in ajax

2006-09-22 Thread
In fact, i use utf-8 as my coding.
The following is the content of the html.








Country: 



I also tried many ways
1.keep meta charset or remove it.
2.keep  or remove it.

I can't get the right result.

Another problem
You can copy a chinese word and paste to the AutoCompleteTextField, no event 
will fired.You can see it in the server side.


- Original Message - 
From: "Erik van Oosten" <[EMAIL PROTECTED]>
To: 
Sent: Friday, September 22, 2006 3:03 PM
Subject: Re: [Wicket-user] The problem about encoding and event in ajax


> Dear ??,
> 
> The problem is because you can not encode Chinese characters in 
> ISO-8859-1. You must use UTF-8 throughout your application.
> 
> > String newInput = new String(input.getBytes("iso8859-1"), "UTF-8");
> first converts the string to ISO8859-1 and thereby replaces all Chinese 
> characters with a "?".
> 
> Please make sure that the HTML pages that Wicket renders are in UTF-8. 
> This true by default, but to be sure you could do
>getRequestCycleSettings().setResponseRequestEncoding("UTF-8")
> 
> Then replace the line above with:
> String newInput = input;
> 
> Regards,
> Erik.
> 
> 
> 王磊 schreef:
>> I just try to write a book about wicket.(It's written in chinese,and 
>> it's free to get a e-book).
>> But while i writing a ajax example,i got a stange problem.
>>  
>> I writed a auto-complete text application with AutoCompleteTextField 
>> control.
>> But i got the following 2 problems.
>>  
>> 1. If i input a chinese word,no request is sent to the server side.(I 
>> write "println" in server application,no output).
>>  
>> 2. If in input a chinese word,then input a letter like 'd',the server 
>> side will get a string input like "???d", it's in wrong code. I use 
>> the following code to get the right input.
>>  
>> String newInput = new String(input.getBytes("iso8859-1"), "UTF-8");
>>  
>>  
>> I think these problems are caused by javascript,because i am not 
>> familiar with javascript.
>> So i can't give reasons.
>> May somebody can give a patch.
> 
> -- 
> Erik van Oosten
> http://www.day-to-day-stuff.blogspot.com/
> 
> 
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] The problem about encoding and event in ajax

2006-09-21 Thread



I just try to write a book about wicket.(It's written in 
chinese,and it's free to get a e-book).
But while i writing a ajax example,i got a stange 
problem.
 
I writed a auto-complete text application with 
AutoCompleteTextField control.
But i got the following 2 problems.
 
1. If i input a chinese word,no request is sent to the server 
side.(I write "println" in server application,no output).
 
2. If in input a chinese word,then input a letter like 'd',the 
server side will get a string input like "???d", it's in wrong code. I use 
the following code to get the right input.
 
String newInput = new String(input.getBytes("iso8859-1"), 
"UTF-8");
 
 
I think these problems are caused by _javascript_,because i am 
not familiar with _javascript_.
So i can't give reasons.
May somebody can give a patch.
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user