Re: Persisting optional fields (null vs empty object)

2013-03-05 Thread Marc Nuri San Félix
Hi Pureza If you are using an MVC architecture, this problem can be addressed in the controller. You should check the address field on the save event and if its values are empty, just set the address null. On the other hand, if there is an option to set the address as a whole as a null value, in

Re: inmethod-grid refresh issue

2013-03-04 Thread Marc Nuri San Félix
Hello Saty You should check methods markItemDirty(IModel model), markAllItemsDirty() and update(). This are the methods you are supposed to be calling when refreshing the grid's content. You should also make sure that the equals() method of your model objects return false when both objects

Re: inmethod-grid refresh issue

2013-03-04 Thread Marc Nuri San Félix
Ok, I see. Either way if it is a DataGrid, calling markAllItemsDirty() and update() from your ajax request should do the job. -- Marc Nuri www.marcnuri.com On Mon, Mar 4, 2013 at 4:35 PM, saty satya...@gmail.com wrote: Thanks Marc, i will take a look at these methods if they can help, however

Re: inmethod-grid refresh issue

2013-03-04 Thread Marc Nuri San Félix
The problem must be in your row models. What does your IDataSource implementation look like? -- Marc Nuri www.marcnuri.com On Mon, Mar 4, 2013 at 4:55 PM, saty satya...@gmail.com wrote: grid.markAllItemsDirty(); grid.update(); This does not help, for some reason grid is smart not to

Re: inmethod-grid refresh issue

2013-03-04 Thread Marc Nuri San Félix
What's the code for MyModel? -- Marc Nuri www.marcnuri.com On Mon, Mar 4, 2013 at 5:14 PM, saty satya...@gmail.com wrote: public class DataSource implements IDataSourceMyModel { private FilterMyModel myModelFilterChain; public DataSource(FilterChainMyModel myModelFilterChain)

Re: inmethod-grid refresh issue

2013-03-04 Thread Marc Nuri San Félix
In your IDataSource code, you left out the implementation public IModelMyModel model(MyModel object);, I'm quite suspicious that your models are the source of the problem. I'm assuming that you are using PropertyColumns in your grid, with these columns, your getter method should be getting called

Re: inmethod-grid refresh issue

2013-03-04 Thread Marc Nuri San Félix
You should start debugging your project instead of using print to see what is really happening (call stack, variable values...). PropertyColumn always calls the get method of your model object: code @Override public IRenderableI newCell(IModelI rowModel) { return new IRenderableI() { public void

Re: inmethod-grid refresh issue

2013-03-04 Thread Marc Nuri San Félix
I bet we are getting to the source of the problem. Non light-weight columns like yours, create the components just once when the grid is first rendered. So the model instances you pass when you create the Component will remain the same even if you update the grid. I believe non-lightweight

Re: motion jpeg and wicket

2013-01-14 Thread Marc Nuri San Félix
Hello The complex way of solving your problem would be by means of an IRequestHandler and an IRequestMapper. I use this same system to generate JSON responses in my projects without the need of using another servlet thus sharing all of my wicket Session security information. Your IRequestHandler

Re: motion jpeg and wicket

2013-01-14 Thread Marc Nuri San Félix
Ernesto I prefer to have all my URL mappings centralized, so I try to use the Wicket way where available. Although it's interesting to know that you can access wicket Session this way. What I'd really do is try to proxy/tunnel the stream directly from the webcam to the client using an appropriate

Re: motion jpeg and wicket

2013-01-11 Thread Marc Nuri San Félix
Hello This is not a motion jpeg, but it can be used to accomplish your needs without major complications You can create a Panel with an image that replaces the image every time it renders overriding the onBeforeRender method: addOrReplace(new Image(image, new

Re: Can't get AutocompleteBehavior to work

2012-12-14 Thread Marc Nuri San Félix
Hello I finally managed to solve the problem. My Page was loading another version of JQuery (1.8.3) along with Wicket's own JQuery version (1.8.2), this didn't allow Wicket's custom event inputchange to bind correctly to the TextField. Simply changing my custom JQuery Behaviors to use Wicket's

Can't get AutocompleteBehavior to work

2012-12-13 Thread Marc Nuri San Félix
Hello I'm migrating my applications to wicket 6.0.3 form the latest Wicket 1.5. I've got some problems with wicket AutocompleteBehavior. There are no javascript exceptions in the browser console, but some functionality is not working. The problems are regarding showing the list of choices when

Re: adding swing Jframe inside Wicket webpage

2012-11-22 Thread Marc Nuri San Félix
Hi I believe there are two solutions for your question: 1. You could do this with an Applet, and place it in a Page. 2. One other solution could be to set the content type of the JTextPane to text/html, get the content with getText() and display it using a WebMarkupContainer or

Re: Inmethod Grid Select All or Reload Grid

2011-04-20 Thread Marc Nuri San Félix
Hello. Of course, objects updated in the database shouldn't be equal to those previously displayed in the table (they aren't equal). If you don't comply to this you'll have problems not only with inmehtod grid. The equals method of my beans always include at least this: if (this.id !=

Re: Inmethod Grid Select All or Reload Grid

2011-04-18 Thread Marc Nuri San Félix
Try this: +++ grid.markAllItemsDirty(); grid.update(); // - This adds the grid to AjaxRequestTarget, so target.addComponent(grid) is not necessary +++ Regards -- Marc Nuri On Mon, Apr 18, 2011 at 10:15, GJT taulant.gju...@helvetic.com wrote: I am using wicket 1.4.16 and inmethod-grid 1.4.17

Re: Inmethod Grid Select All or Reload Grid

2011-04-18 Thread Marc Nuri San Félix
Have you debugged your project to see if the IDatasource is queried when you perform the Ajax reload?? If you reload the page does the data update?? -- Marc Nuri On Mon, Apr 18, 2011 at 13:19, GJT taulant.gju...@helvetic.com wrote: I tried that before and I tried it again, but it doesn't work.

Re: Inmethod Grid Select All or Reload Grid

2011-04-18 Thread Marc Nuri San Félix
For what you're saying, I believe you've got something messed up in your Bean's hashCode and equals method. Inmethod's Datagrid keeps a Set (HashSet) of IModel objects to keep track of which items are selected. If you've implemented correctly the equals method in your bean and believe that there's

Re: Dealing with json in wicket

2011-01-19 Thread Marc Nuri San Félix
Hi I use a combination of an IRequestTarget implementation and an extended UrlCodingStrategy. Regards. -- Marc Nuri This is what I use, maybe it helps public abstract class JSONRequestTarget implements IRequestTarget { private final

Re: Free wicket from component hierarchy hell

2010-11-05 Thread Marc Nuri San Félix
Hi In my opinion, when you use lots of inheritance in a page, its really imposible to control if a component appears just once in the page. Wicket is great for the ability to reuse components. Actually I've been able to create a private framework where I'm able to build an entire page with

Re: wicketstuff-core:jquery accordion broken?

2009-05-06 Thread Marc Nuri San Félix
Hi. Had same problem but found something at google: http://www.nabble.com/select-next-n-%22somethings%22-td21550403s27240.html Simply remove the '.r' from the expression and it will work. Best regards -- Marc Nuri hi currently the accordion in jquery-examples does not work in FF nor IE.