your first line shows final TextField tx = new TextField("cell", new PropertyModel(values[row][col],"data"));
But I got java.lang.IllegalArgumentException: Parameter modelObject cannot be null I have put final TextField tx = new TextField("cell", model); but this time I did not get any exception BUt validate is not working. so i am not able validate. please explain. I am using your code only. Please check http://cwiki.apache.org/WICKET/how-to-work-with-excel-in-wicket-using-jexcel-api.html Ayodeji Aladejebi wrote: > > and dont forget to create a resource key for the "error.toolongvalue". You > should hae it in yor property file that maps to your class > > On 6/29/07, Ayodeji Aladejebi <[EMAIL PROTECTED]> wrote: >> >> that should be simple, although my wicket is bit rusty at the moment, I >> think >> >> final TextField tx = new TextField("cell", new >> PropertyModel(values[row][col],"data")); >> tx.add(new IValidator(){ >> public void validate(FormComponent fc){ >> >> if(fc.getValue() is greater than 20){ >> fc.add(new AttributeModifier("style",true, new >> Model("background-color: #FF0000;"))); >> fc.error("error.toolongvalue",null); >> }else{ >> fc.add(new AttributeModifier("style",true, new >> Model("background-color: normal-color;"))); >> } >> >> } >> }); >> item.add(tx); >> >> >> something like dat...just buzz around >> On 6/29/07, Edi <[EMAIL PROTECTED] > wrote: >> > >> > >> > Or, tell me how to validate, if the text box value exceeds 20 >> > characters, I >> > want to change the color of the text box. HOW? >> > >> > >> > >> > Ayodeji Aladejebi wrote: >> > > >> > > well, >> > > yu can use String.length to do dat. but be aware it might jumble your >> > > table >> > > because some Text will be *This is a very long text that can expand >> > the >> > > Textfield too much* and some will be just "Hi". >> > > >> > > I had to make that trade off as well >> > > >> > > i am looking for some javascript technique maybe yu can show me if yu >> > > find. >> > > >> > > Look for a javascript library that can allow a user to dynamically >> > expand >> > > the textfield lenght with his mouse. so that we can attach that >> > Behavior >> > > to >> > > each Textfield >> > > >> > > >> > > >> > > On 6/29/07, Edi <[EMAIL PROTECTED]> wrote: >> > >> >> > >> >> > >> Hi, >> > >> >> > >> In your sample code, >> > >> >> > >> tx.add (new AttributeModifier("size",true, new Model(String.valueOf >> > (8)))); >> > >> It shows all the size of textbox is same. >> > >> >> > >> I want to change the size of text box value according to text each >> > >> contents >> > >> >> > >> >> > >> >> > >> Ayodeji Aladejebi wrote: >> > >> > >> > >> > meanwhile, >> > >> > if yu look at this code in the Wicket - JExcel example >> > >> > >> > >> > Cell cell = sheet.getCell(col, row); >> > >> > values[row][col] = new >> > XCell(row, >> > >> > col,cell.getContents()); >> > >> > >> > >> > return >> > values[row][col].getData(); >> > >> > >> > >> > >> > >> > The Cell object is from JExcel and its where Datatype should be >> > >> retrieved >> > >> > from >> > >> > >> > >> > 2. To validate, >> > >> > >> > >> > You can write a default wicket validator (See Validator examples), >> > >> > The validator can access the Textfield arrays and then check for >> > >> validity >> > >> > >> > >> > its shouldn't be too difficult anyway >> > >> > >> > >> > >> > >> > >> > >> > On 6/28/07, Ayodeji Aladejebi <[EMAIL PROTECTED]> wrote: >> > >> >> >> > >> >> I think that is within the scope of the JExcel API and not a >> > wicket >> > >> >> thing. >> > >> >> Refer to the JExcel API doc first >> > >> >> >> > >> >> On 6/28/07, Edi < [EMAIL PROTECTED]> wrote: >> > >> >> > >> > >> >> > >> > >> >> > Hi, >> > >> >> > >> > >> >> > I am Newbie of Wicket. I have downloaded sample example to read >> > XLS >> > >> >> file >> > >> >> > >> > >> >> > using Wicket with JExcel. >> > >> >> > It's working fine. >> > >> >> > >> > >> >> > My doubt is 1.How can I retrieve the datatype of each cell? and >> > 2. >> > >> How >> > >> >> > to >> > >> >> > validate the each cell values? >> > >> >> > >> > >> >> > Please give me some Suggestions. >> > >> >> > >> > >> >> > Thanking You. >> > >> >> > Regards, >> > >> >> > Edi >> > >> >> > -- >> > >> >> > View this message in context: >> > >> >> > >> > http://www.nabble.com/Wicket-with-JExcel-tf3994102.html#a11342103 >> > >> >> > Sent from the Wicket - User mailing list archive at Nabble.com. >> > >> >> > >> > >> >> > >> > >> >> > >> > >> >> > >> > >> >> >> > >> >> > >> ------------------------------------------------------------------------- >> > >> >> > 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 >> > >> > >> > >> > >> > >> >> > >> -- >> > >> View this message in context: >> > >> http://www.nabble.com/Wicket-with-JExcel-tf3994102.html#a11356793 >> > >> Sent from the Wicket - User mailing list archive at Nabble.com. >> > >> >> > >> >> > >> >> > >> ------------------------------------------------------------------------- >> > >> 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 >> > > >> > > >> > >> > -- >> > View this message in context: >> > http://www.nabble.com/Wicket-with-JExcel-tf3994102.html#a11357007 >> > Sent from the Wicket - User mailing list archive at Nabble.com. >> > >> > >> > >> ------------------------------------------------------------------------- >> > >> > 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 >> > >> >> > > > -- > Aladejebi Ayodeji A., > DabarObjects Solutions > Phone: +234 9 481 7 156 > Mobile: +234 803 589 1780 > Email: [EMAIL PROTECTED] > Web: www.dabarobjects.com > Blog: blog.dabarobjects.com > > Participate, Collaborate, Innovate > Join Community: > http://www.cowblock.net/ > > Get A Free Blog: > http://blogs.cowblock.net/ > > ------------------------------------------------------------------------- > 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 > > -- View this message in context: http://www.nabble.com/Wicket-with-JExcel-tf3994102.html#a11359468 Sent from the Wicket - User mailing list archive at Nabble.com. ------------------------------------------------------------------------- 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