Re: Manually Rendering a DataGridView

2011-07-31 Thread Pedro Santos
Hi, I had a similar need and used the code at TableParser[1] to render the component tree to a mock response and later get its char sequence. 1 - https://github.com/wicketstuff/core/blob/master/jdk-1.5-parent/wicket-poi-parent/wicket-poi/src/main/java/org/wicketstuff/poi/excel/TableParser.java

Re: RFC: Ten things every Wicket programmer must know?

2011-07-31 Thread samket
Knowing what my co-workers are like, these are the most important things that I say to them. So this list is directed towards them in particular. 1. When receiving parameters in a constructor or method, a model (an instance of IModel) is almost always the right choice instead of a raw model

RE: Wicket modal window example not working in IE8 on wicket-library.com

2011-07-31 Thread Chris Colman
My IE version is: 8.0.6001.18702IS I'll take a look at the plugins. Chris I just tested 8.0.7601.17514 and it worked. Maybe you have a local IE plugin that's interfering? On Sat, Jul 30, 2011 at 6:31 PM, Chris Colman chr...@stepaheadsoftware.comwrote: Does anyone else have a problem in IE8

Re: Manually Rendering a DataGridView

2011-07-31 Thread Matt Schmidt
So after calling tableParser.parse(myDataGridView), how do I get the the char sequence? Or iterate over each row to get the char sequence for each cell? I don't see any public methods for that. On Sunday, July 31, 2011, Pedro Santos pedros...@gmail.com wrote: Hi, I had a similar need and used

Form Model Not Available for AjaxFallbackLink

2011-07-31 Thread eugenebalt
I have a TextField and an AjaxFallbackLink. The AjaxFallbackLink, when clicked, must read the value of the TextField. But that value isn't available yet, because there has been no form submit and no model binding yet. Both getInput() and getModelObject() return NULL at the time of the

Re: Form Model Not Available for AjaxFallbackLink

2011-07-31 Thread vineet semwal
use ajaxsubmitlink and it will submit the form the textfield is in .. On Sun, Jul 31, 2011 at 7:25 PM, eugenebalt eugeneb...@yahoo.com wrote: I have a TextField and an AjaxFallbackLink. The AjaxFallbackLink, when clicked, must read the value of the TextField. But that value isn't available

Re: Form Model Not Available for AjaxFallbackLink

2011-07-31 Thread Rodrigo Heffner
I had the same question last week. This is probably what you want: http://wicket.apache.org/apidocs/1.4/org/apache/wicket/ajax/form/AjaxFormComponentUpdatingBehavior.html . Add this to your component and it's model will be updated without submitting the form. On 31 Jul 2011 15:05, vineet semwal

Re: Ajax broken in IE 8

2011-07-31 Thread T P D
Yes, I was wrong. It wasn't working on my machine (because I have Fiddler installed?) but is working in general. Sorry to have muddied the waters. On 7/29/2011 12:20 PM, Dan Retzlaff wrote: I'll help you test it if you boil it down to a quickstart application you can share. On Fri, Jul 29,

on the fly components

2011-07-31 Thread ramazan pekin
Hi to everyone, I am trying to generate dynamic form elements. I need to add and remove some components dynamically. I have added listChoice component succesfuly whenever user select a listChoice item, but when I tried to remove listChoice component, I received an error like that:

Re: on the fly components

2011-07-31 Thread Rodrigo Heffner
Hi Ramazan, I'm also very new to wicket, and I've came across a similar situation too. I solved my situation by using different panels with the same markup id. Something like (inside the populateItem method): if (condition == true) { item.add(new SomePanel(sameId)); } else {

Re: on the fly components

2011-07-31 Thread Christian Huber
Hi, this is just a wild guess but in your code you have line that calls item.remove(listChoice); under certain conditions and the listChoice instance is bound to the category identifier which does not seem right to me. As far as I understand ListViews the associated markup block is created

Re: Form Model Not Available for AjaxFallbackLink

2011-07-31 Thread eugenebalt
The first suggestion worked. Thanks. Regarding AjaxUpdatingBehavior, yes my component was Ajax, but the data was not binding to the model at the time of the click because we weren't submitting the form. I needed to read the value entered for one of the components and it wasn't available at that

Re: Form Model Not Available for AjaxFallbackLink

2011-07-31 Thread vineet semwal
second suggestion is good too ,you will have to specify the js event say onchange/onblur for ajaxformcomponentupdatingbehavior when that even will be fired,your model will be updated with the new value,you dont have to use ajaxsubmitlink in that case.. it depends on which way you want to do..

Updating a Component from anywhere

2011-07-31 Thread eugenebalt
I have a Panel containing a Label that shows how many items are in the shopping cart right now. The Label should be updated (via Ajax) from within any number of pages, forms, and panels throughout the application. Various sub- and sub-panels/forms/etc. may have the Add To Cart link that should

Re: Updating a Component from anywhere

2011-07-31 Thread eugenebalt
Essentially what I'm asking is, is there an easy way to find a component, among the entire current tree of all components included or cross-included in the final page, from anywhere in the code. -- View this message in context:

Re: on the fly components

2011-07-31 Thread ramazan pekin
Actually, as you said, when I add new bounded object to the collection new listChoice has been added to page, but whenever I tried to remove object from collection, related listChoice is not being removed from page. I have added wrapping container and I specified as target component to

Re: on the fly components

2011-07-31 Thread ramazan pekin
And this is CatogoryModel class: public class CategoryModel implements Serializable { private static final long serialVersionUID = 1L; private ListOmCategory omCategories; private OmCategory selectedCategory; public

Re: Updating a Component from anywhere

2011-07-31 Thread Martijn Dashorst
You're thinking about it the wrong way: you should ask how do I let this label (or panel) know about an ajax event happening? Queue wicket 1.5's event mechanism: https://cwiki.apache.org/WICKET/migration-to-wicket-15.html#MigrationtoWicket1.5-Intercomponentevents Martijn On Sun, Jul 31, 2011 at

Re: on the fly components

2011-07-31 Thread ramazan pekin
I removed item.remove(listChoice); from code and I just changed ListView definition, I used PropertyModel, and every thing working well... listView = new ListViewCategoryModel(categoryList, categories) { - I changed this line as below = listView = new ListViewCategoryModel(categoryList, new

Re: on the fly components

2011-07-31 Thread ramazan pekin
Thanks a lot :) On Mon, Aug 1, 2011 at 12:36 AM, ramazan pekin rep...@gmail.com wrote: I removed item.remove(listChoice); from code and I just changed ListView definition, I used PropertyModel, and every thing working well... listView = new ListViewCategoryModel(categoryList, categories) {

serialization problem with spring

2011-07-31 Thread Joe Fawzy
Hi i have a serialization problem with spring My CreatePage class looks like:- public class CreatePage extends WebPage{ @SpringBean AccountManager accountManager; } as i am using @SpringBean , it should handle creating a serializable proxy for me BUT i got the following exception

Re: serialization problem with spring

2011-07-31 Thread Bruno Borges
What version of Wicket are you using? On older versions you must declare your field as transient. Newer versions don't required this anymore. *Bruno Borges* www.brunoborges.com.br +55 21 76727099 On Sun, Jul 31, 2011 at 9:08 PM, Joe Fawzy joewic...@gmail.com wrote: Hi i have a

Re: Scala DSL for Wicket

2011-07-31 Thread Bruno Borges
This is an excellent piece of code. What I had was similar, but in a trait as a method: def ldm( loadF() = T ): IModel[T] = { ... } I guess breaking the DSL will make it easier to maintain. :-) And your approach is much better *Bruno Borges* www.brunoborges.com.br +55 21 76727099 On

Re: serialization problem with spring

2011-07-31 Thread Dan Retzlaff
Hi Joe, Based on the depth of that serialization stack, I doubt it's your AccountManager proxy that's giving you problems. I usually just breakpoint NotSerializableException and walk up the stack to find the culprit. Any change your CreatePage uses a method on AccountManager that returns an

Re: Manually Rendering a DataGridView

2011-07-31 Thread Pedro Santos
The char sequence is returned by mockResponse.getText() Sure, there are no public methods and would be a good idea to refectory the code and move the mock response logic to other place. You can use an IVisitor to visit cells in you component tree, create a mock response to render them and use its

Re: serialization problem with spring

2011-07-31 Thread Joe Fawzy
Hi i am living on the edge ,using wicket 1.5RC5.1 (the latest) and also using the newly released Spring data-jpa project for data access i do not use or reference PersistenceExceptionTranslationInterceptor directly, actually i never know it is there till i saw that error based on its name it

Re: serialization problem with spring

2011-07-31 Thread Joe Fawzy
Hi actually for testing , i tried using the new kryo-serializer from wicket stuff IT DOES NOT WORK, actually it has many more errors than the default one, actuallly it cannot serialize a JdkDynamicProxy which is the basis for injection If someone have a solution or workaround , please help Thanks

Re: Scala DSL for Wicket

2011-07-31 Thread Gary Thomas
I've written some Scala utilities as well, but instead of a DSL I'm using implicit conversions via traits, which I've found to be a really nice fit with Wicket. An example: import org.apache.wicket.model.IModel import org.apache.wicket.model.LoadableDetachableModel import