[Wicket-user] Problem about DatePicker

2006-02-20 Thread wang lei
I used to define a path of a wicket application just like "/user.page" instead of "/user/*"  But the "datePicker" of wicket extension can't work when i define the path "/user.page"
		 
雅虎1G免费邮箱百分百防垃圾信

Re: [Wicket-user] VOTE

2006-02-16 Thread wang lei
I vote for 2.  2. Do the constructor change in a seperate release (Wicket 1.3) andput Java 5 in the next (Wicket 2.0)
		 
雅虎1G免费邮箱百分百防垃圾信 
雅虎助手-搜索、杀毒、防骚扰 
 


Re: [Wicket-user] Post 1.2 roadmap

2006-02-13 Thread wang lei
I am sorry,i forget the time for 2.0 release. But I still have doubt about one year is enough.  I never used Retrotranslator  and other retroweaver tools.I am not sure it can run in different jdk with problems.So i avoid it.  Stick with the old version is not bad, we seldom change the version for consistence.     The last sentence is my fault.There is a wrong word "projects" insteadof "objects".  I just want to way "retroweaver" is not a good choice,just a solution for urgency.   - Original Message 
 -
   From: Jesse Sightler   To: wicket-user@lists.sourceforge.net   Sent: Tuesday, February 14, 2006 1:17 PM  Subject: Re: [Wicket-user] Post 1.2 roadmap  On 2/13/06, wang lei <[EMAIL PROTECTED]> wrote: Here is my opinions:>> - should the post 1.2 version of Wicket involve both changes?Absolutely not.I s
 upport
 the constructor change ,because it force the programmer to do in a right way. I don't want wicket support JDK1.5 soon.I know generics can bring many benefits.But there is a long time before most of us move to JDK1.5.Some projects from my clients are stilling run on JDK1.4 even JDK1.3.One year ,at least, is necessary for waiting.My clients would just move to  JDK1.4 easily,because they need to pay a lot of money and not sure the old software can move to the new JDK easily.  Based on the current pace of development, a 2.0 release would probably not land until late this year at the earliest, I would think.  Does that make 1.5 sound a little better?And 1.4 users would have two choices:Use the new version through Retrotranslator   Stick with the old version until they can safely migrateI don't think either of those options is particularly bad.   >>- should we make different releases for either change, and thus postponing 1.5 to   Wicket 3?No, one version is enough. Wicket2 or wicket3 are not important.I think if you move to JDK1.5 too soon.You will lose many users.It's not good for wicket.Wicket still has a long way to go.  Of course, it would also gain users thanks to the nicer development environment.  :)  >> - how many would object to having a retroweaver build of a JDK 5 Wicket, which   enables you to run 1.5 code on a 1.4 JRE?I never try to do that.I'm not sure what you mean... just that you've never tried it?  Or do you have some obje
 ction to
 this approach? Thanks,Jesshttp://www.jroller.com/page/jsight/__赶快注册雅虎超大容量免费邮箱?http://cn.mail.yahoo.com

Re: [Wicket-user] Post 1.2 roadmap

2006-02-13 Thread wang lei
Here is my opinions:>> - should the post 1.2 version of Wicket involve both changes?Absolutely not.I support the constructor change ,because it force the programmer to do in a right way.I don't want wicket support JDK1.5 soon.I know generics can bring many benefits.But there is a long time before most of us move to JDK1.5.Some projects from my clients are stilling run on JDK1.4 even JDK1.3.One year ,at least, is necessary for waiting.My clients would just move to  JDK1.4 easily,because they need to pay a lot of money and not sure the old software can move to the new JDK easily. >>- should we make different releases for either change, and thus postponing 1.5 to   Wicket 3?No, one version is enough. Wicket2 or wicket3 are not important.I think if you move to JDK1.5 too soon.You will lose many users.It's not good for wicket.Wicket still has a long way to go.>>- how many of you s
 till
 require for current or future projects to run on JDK 1.4?In fact,this question is suitable.Most time,the clients choose the platform,instead of us.Many clients are running different jdk, I can't predict. But for you,i would prefer JDK1.4.>> - how many would object to having a retroweaver build of a JDK 5 Wicket, which   enables you to run 1.5 code on a 1.4 JRE?I never try to do that.
		无限容量雅虎相册,原图等大下载,超快速度,赶快抢注! 

[Wicket-user] A strange problem or a bug of jdk

2005-12-24 Thread wang lei
  I just find a strange problem in some versions of jdk.  I am not sure it's a bug or not.  I report it to sun as a bug.     But i need more infomation from you.     A jdk version is needed also.  You can get it by the following url.  http://newhua.ruyi.com/down/j2sdk-1_4_2-windows-i586.exeThis is a big software provider of china.     the following shows the version infomation.  Just run "java -version" in console.     Java(TM) 2 Runtime Environm
 ent,
 Standard Edition (build 1.4.2-b28)Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)   3 classes are needed to test this problem.  I use ognl to access the property.  The same problem will happen while i use jakarta beanutils.   The following is the source code of class "Table"     package org.bug.jdk;     import java.beans.PropertyChangeEvent;import java.beans.PropertyChangeListener;     public class Table implements PropertyChangeListener{ private Schema schema;      public Schema getSchema() {  return schema; }      public void setSchema(Schema r_Schema) {  this.schema =
 r_Schema; }      public void propertyChange(PropertyChangeEvent evt) {  // Nothing to do      }}     The following is the source code of class "Schema"     package org.bug.jdk;     public class Schema{      private String name;      public String getName() {  return this.name; }      public void setName(String r_Name) {  this.name = r_Name; } 
     public void addTable(Table r_Table) {      }      public void removeTable(Table r_Table) {      }}     The following is the source code of class "TestPropertyAccessor"     package org.bug.jdk;     import ognl.Ognl;import ognl.OgnlException;import junit.framework.TestCase;     public class TestPropertyAccessor extends TestCase{ public void testRun() throws OgnlException {  Schema t_Schema =
  new
 Schema();  Table t_Table = new Table();  t_Table.setSchema(t_Schema);       Ognl.getValue("schema.name", t_Table);     //the following statement will pass test  // Ognl.getValue("schema", t_Table); }}  Of course ,this test will fails to pass.     I have three ways to solve the problem.   If the class of "Table" don't implement java.beans.PropertyChangeListener.The test will pass.   If you remove one of the methods "addTable","removeTable",The test will pass.   If you rename one of the methods "addTable","removeTable",just like "doAddTable"The test will pass.  It seems some jdk take "add" and "remove" as a style to access property.  It's really strange.     If you change to the new jdk version like 1.4.2_10 or 
 1.5
 update6.  This test will pass.      __赶快注册雅虎超大容量免费邮箱?http://cn.mail.yahoo.com

[Wicket-user] Discussion about strategy

2005-10-30 Thread wang lei
I use wicket for over months and develop one project with it.
So i have a suggestion for wicket core or wicket-stuff.
 
All of us know,ACL is necessary for a project.
Just a simple example,




name
here is user name
Password(label)
here is user password(TextField)

...
...
...
...

...
...
...
...

...
...
...
...
 
If the viewer is a administrator,he can see the password,and other users can't see the password.
The common users will see the following table.




name
here is user name



...
...
...
...

...
...
...
...

...
...
...
...
 
In the simple ways,just set the label and textfield invisible.You also can add a wicket container as the parent of the label and textfield.Just the container visible.
But both of them are not flexible.
 
So i just design a IStrategy interface and many components based on wicket components like label,TextField and other components.
 
The IStrategy interface  control the visiblity ,readonly, disabled and other properties of the component. It will make the component flexible.
 
I also add jaas and dao together so the component can control itself.
How about the design.
I need more options about it.
 

		 
雅虎免费G邮箱-中国第一绝无垃圾邮件骚扰超大邮箱 
雅虎助手¨D搜索、杀毒、防骚扰 
 

		 
雅虎免费G邮箱-中国第一绝无垃圾邮件骚扰超大邮箱 
雅虎助手¨D搜索、杀毒、防骚扰 
 


[Wicket-user] a new component of PageGridView

2005-09-27 Thread wang lei

In most projects,the developers need a PageGridView to support data view.
In my opinion,i will describe the functions as the following:
 
Core Function:

Pageing: The developers can define the navigation and other infomation,so the client can view data with paging and easy to naviagte between the pages.  
Format:  The developers can define the data format,like 2005-09-09 or 09/09/05 and so on. 
Server Sort: If necessary,users can sort data. 
Flexible: It must be easy to extend.Developers can define grid cell output easily,for example,link of delete,edit and so on.
 
 
Extended Function:

Client Sort: sometime the function is needed,thougth i thought it's useless,but somebody may need it.  
StyleClass:  Generaly speaking,just like, the even row has a different color with the odd row. 
Mouse change color: For  emphasis,the row should can change color when the mouse is over the row. 
Mouse click color: For  emphasis,the row should can change color when the row is clicked .
 
I analysised another discussion about PageGridView,but i feel it too complicated.
So I want to design another PageGridView,in this process,i refer valuelist and displaytag.
 
The core desigh is simple,just tow classes(PageGridView and Column) and tow interfaces(IPageList and GridCellRender).
 
PageGridView acts as control mainly,it assigne the value from model(IPageList) to header render and cell renderer to output html.
 
I also finish some default implemention of IPageList and GridCellRender.And write a demo web application,and packaged it as a .war file.If somebody knows where i can upload it.I will upload it for demo and discussion.Because it's under test,so i don't want to upload it to sourceforge.
 
The following is source code of PageGridView :
 
package wicket.contrib.view;
 
import java.util.ArrayList;import java.util.List;
 
import wicket.AttributeModifier;import wicket.contrib.view.impl.LineColumn;import wicket.markup.html.list.ListItem;import wicket.markup.html.list.ListView;import wicket.markup.html.list.PageableListView;import wicket.markup.html.navigation.paging.IPageable;import wicket.markup.html.navigation.paging.PagingNavigator;import wicket.markup.html.panel.Panel;import wicket.model.IModel;import wicket.model.Model;
 
/** *  * @author Lei.wang  * FUNCTION:  * This class is used for view. * It add some function to PageableListView * It support sorting,format  * Create-time:2005-9-25  *  * Rule for variable:  * prefix of "t_" means the variable inside the body of a method  * prefix of "r_" means the parameter,i like to call it reference
  */
 
public class PageGridView extends Panel{
 
 private PagingNavigator  headerNavigator;
 
 // The navigation for header
 
 private PagingNavigator  footerNavigator;
 
 // The navigation for footer
 
 private PageableListView pageableListView;
 
 // The current paging component
 
 /**  *   * @param r_ID  * @param r_PageList  */ public PageGridView(String r_ID, IPageList r_PageList) {  this(r_ID, new Model(r_PageList)); }
 
 /**  * The parameter "r_Model" must provide a IPageList as the method of "getObject" is called.  *   * @param r_ID  * @param r_Model  */ public PageGridView(String r_ID, IModel r_Model) {  super(r_ID, r_Model); }
 
 /**  * This method is to control the grid header for output.  *   */ private void onRenderHeader() {  final IPageList t_PageList = (IPageList) this.getModelObject();
 
  ListView t_ListView = new ListView("header", getColumns())  {
 
   protected void populateItem(ListItem r_ListItem)   {Column t_Column = (Column) r_ListItem.getModelObject();
 
r_ListItem.add(t_Column.getHeaderRender().getComponent("title", t_Column, r_ListItem, t_PageList));
 
   }  };
 
  this.add(t_ListView); }
 
 /**  * This method is to control the grid cell for output  */ private void onRenderRows() {  final IPageList t_PageList = (IPageList) this.getModelObject();
 
  pageableListView = new PageableListView("rows", t_PageList, t_PageList.getRowsPerPage())  {
 
   protected void populateItem(final ListItem r_ListItem)   {ListView t_ChildListView = new ListView("columns", getColumns()){
 
 protected void populateItem(final ListItem r_ChildListItem) {  Column t_Column = (Column) r_ChildListItem.getModelObject();
 
  r_ChildListItem.add(t_Column.getCellRender().getComponent("content", t_Column, r_ListItem, t_PageList)); }};
 
r_ListItem.add(t_ChildListView);
 
String t_Style = (String) t_PageList.getConfiguration().getStyleClass(r_ListItem.getIndex());if (null != t_Style){ r_ListItem.add(new AttributeModifier("class", true, new Model(t_Style)));}// control the css style
 
String t_MouseOut = (String) t_PageList.getConfiguration().getMouseOut(r_ListItem.getIndex());if (null != t_MouseOut){ r_ListItem.add(new AttributeModifier("onMouseOut", true, new Model(t_MouseOut)));}// control the onMouseOut script
 
String t_Mouse

[Wicket-user] the discussion about PageGridView

2005-09-26 Thread wang lei
 
In most projects,the developers need a PageGridView to support data view.
In my opinion,i will describe the functions as the following:
 
Core Function:

Pageing: The developers can define the navigation and other infomation,so the client can view data with paging and easy to naviagte between the pages.  
Format:  The developers can define the data format,like 2005-09-09 or 09/09/05 and so on. 
Server Sort: If necessary,users can sort data. 
Flexible: It must be easy to extend.Developers can define grid cell output easily,for example,link of delete,edit and so on.
 
 
Extended Function:

Client Sort: sometime the function is needed,thougth i thought it's useless,but somebody may need it.  
StyleClass:  Generaly speaking,just like, the even row has a different color with the odd row. 
Mouse change color: For  emphasis,the row should can change color when the mouse is over the row. 
Mouse click color: For  emphasis,the row should can change color when the row is clicked .
 
I analysised another discussion about PageGridView,but i feel it too complicated.
So I want to design another PageGridView,in this process,i refer valuelist and displaytag.
 
The core desigh is simple,just tow classes(PageGridView and Column) and tow interfaces(IPageList and GridCellRender).
 
PageGridView acts as control mainly,it assigne the value from model(IPageList) to header render and cell renderer to output html.
 
I also finish some default implemention of IPageList and GridCellRender.And write a demo web application,and packaged it as a .war file.If somebody knows where i can upload it.I will upload it for demo and discussion.Because it's under test,so i don't want to upload it to sourceforge.
 
The following is source code of PageGridView :
 
package wicket.contrib.view;
 
import java.util.ArrayList;import java.util.List;
 
import wicket.AttributeModifier;import wicket.contrib.view.impl.LineColumn;import wicket.markup.html.list.ListItem;import wicket.markup.html.list.ListView;import wicket.markup.html.list.PageableListView;import wicket.markup.html.navigation.paging.IPageable;import wicket.markup.html.navigation.paging.PagingNavigator;import wicket.markup.html.panel.Panel;import wicket.model.IModel;import wicket.model.Model;
 
/** *  * @author Lei.wang  * FUNCTION:  * This class is used for view. * It add some function to PageableListView * It support sorting,format  * Create-time:2005-9-25  *  * Rule for variable:  * prefix of "t_" means the variable inside the body of a method  * prefix of "r_" means the parameter,i like to call it reference
  */
 
public class PageGridView extends Panel{
 
 private PagingNavigator  headerNavigator;
 
 // The navigation for header
 
 private PagingNavigator  footerNavigator;
 
 // The navigation for footer
 
 private PageableListView pageableListView;
 
 // The current paging component
 
 /**  *   * @param r_ID  * @param r_PageList  */ public PageGridView(String r_ID, IPageList r_PageList) {  this(r_ID, new Model(r_PageList)); }
 
 /**  * The parameter "r_Model" must provide a IPageList as the method of "getObject" is called.  *   * @param r_ID  * @param r_Model  */ public PageGridView(String r_ID, IModel r_Model) {  super(r_ID, r_Model); }
 
 /**  * This method is to control the grid header for output.  *   */ private void onRenderHeader() {  final IPageList t_PageList = (IPageList) this.getModelObject();
 
  ListView t_ListView = new ListView("header", getColumns())  {
 
   protected void populateItem(ListItem r_ListItem)   {Column t_Column = (Column) r_ListItem.getModelObject();
 
r_ListItem.add(t_Column.getHeaderRender().getComponent("title", t_Column, r_ListItem, t_PageList));
 
   }  };
 
  this.add(t_ListView); }
 
 /**  * This method is to control the grid cell for output  */ private void onRenderRows() {  final IPageList t_PageList = (IPageList) this.getModelObject();
 
  pageableListView = new PageableListView("rows", t_PageList, t_PageList.getRowsPerPage())  {
 
   protected void populateItem(final ListItem r_ListItem)   {ListView t_ChildListView = new ListView("columns", getColumns()){
 
 protected void populateItem(final ListItem r_ChildListItem) {  Column t_Column = (Column) r_ChildListItem.getModelObject();
 
  r_ChildListItem.add(t_Column.getCellRender().getComponent("content", t_Column, r_ListItem, t_PageList)); }};
 
r_ListItem.add(t_ChildListView);
 
String t_Style = (String) t_PageList.getConfiguration().getStyleClass(r_ListItem.getIndex());if (null != t_Style){ r_ListItem.add(new AttributeModifier("class", true, new Model(t_Style)));}// control the css style
 
String t_MouseOut = (String) t_PageList.getConfiguration().getMouseOut(r_ListItem.getIndex());if (null != t_MouseOut){ r_ListItem.add(new AttributeModifier("onMouseOut", true, new Model(t_MouseOut)));}// control the onMouseOut script
 
String t_Mous

[Wicket-user] about Encoding of wicket

2005-04-24 Thread wang lei
I am a programmer from china ,using zh_CN as our native language.
I have used wicket for months,I found a little problem and a solution to it about encoding.
Our web-application based on the wicket frameworkf,It runs on a linux platform.When it runs on windows platform.Everything is fine,the output characters is right.But everything changes on linux platform.(I use fedora 2).
I first use the method mentioned in the article :http://wicket.sourceforge.net/wiki/doku.php?id=user:markup_encoding.
But the problem keep unresovled.
After is add a simple sentence  to the first line
of the html file.The problem is resolved.
 
I don't know other solutions to the problem.
But it also provide a solution to others who encouter the problem.
 
If you have any suggestions about encoding, you can send a mail to [EMAIL PROTECTED]
 
I hope this can help others.
 
 Do You Yahoo!?
150万曲MP3疯狂搜,带您闯入音乐殿堂美女明星应有尽有,搜遍美图、艳图和酷图
1G就是1000兆,雅虎电邮自助扩容!