Re: Freemarker+ExtJS vs Wicket questions

2011-12-04 Thread Martin Grigorov
Hi, I don't want to convince you anyhow. Just responding to your questions/observations. On Sun, Dec 4, 2011 at 6:30 AM, Andrei Voden are...@gmail.com wrote: Hi. I have been developing for a while using Freemarker + some JS frameworks (like ExtJS, Dojo and JQuery) and Java as Model building on

Re: Freemarker+ExtJS vs Wicket questions

2011-12-04 Thread Andrei Voden
Thank you for your input. Really helping me to grasp it. Question on #4 in Cons: what I ment is to generate templated content outside of the tags. Like for example I have: script .templated code. /script Is that doable? Sorry if that sounds newbeesh. Andrei

Re: Freemarker+ExtJS vs Wicket questions

2011-12-04 Thread Martin Grigorov
o.a.w.Component and Behavior classes have method #renderHead(IHeaderResponse) with IHeaderResponse#renderXyz methods you can contribute JS, CSS and plain text to the page. It is up to you how you'll generate the constribution. In TagIt component I used TextTemplate to prepare the template and

Event or Notice when a ListView's Model changes

2011-12-04 Thread hfriederichs
Hello, I have a Wicket ListView, who's Model is based on a select on a process-database. Users can initiate a (deploy-)process, and when the process is finished, a row is added in the database, and so also in the ListView's Model's backing List. When this happens, I want to rerender another part

Re: Event or Notice when a ListView's Model changes

2011-12-04 Thread Andrea Del Bene
Hi, have you tried overriding onModelChanged()? You can fire event in this method. Hello, I have a Wicket ListView, who's Model is based on a select on a process-database. Users can initiate a (deploy-)process, and when the process is finished, a row is added in the database, and so also in

Re: Event or Notice when a ListView's Model changes

2011-12-04 Thread hfriederichs
Yes, I'm sorry, I wrote /I tried various methods, onChange and the like/ by which I meant onModelChanged(). But onModelChanged() isn't called when a row is added. I think that makes sense, because the backing List on itself hasn't changed. Furthermore, I experimented by replacing the ListView by a

Re: Internationalization on panels

2011-12-04 Thread cosmindumy
Hi again, I have the same problems with table header columns internationalization. This is what I use: -columns.add(new PropertyColumnUser(new ModelString(new ResourceModel(name.name, Default).getObject()), age, age)); -columns.add(new PropertyColumnUser(new ModelString(getString(name.name)),

Re: Event or Notice when a ListView's Model changes

2011-12-04 Thread Martin Grigorov
call manually listview.modelChanged() after the update of its List this will call onModelChanged On Sun, Dec 4, 2011 at 8:37 PM, hfriederichs h.friederi...@ohra.nl wrote: Yes, I'm sorry, I wrote /I tried various methods, onChange and the like/ by which I meant onModelChanged(). But

Re: Internationalization on panels

2011-12-04 Thread cosmindumy
It works with columns.add(new PropertyColumnUser(new ResourceModel(name.name, Default), age, age)); but I don't understand why it didn't find property with the first variant. columns.add(new PropertyColumnUser(new ModelString(new ResourceModel(name.name, Default).getObject()), age, age)); --

Re: Event or Notice when a ListView's Model changes

2011-12-04 Thread hfriederichs
But the List isn't updated by a user's action. There's a decoupling here: the user's action inserts a row that has a 'state-column' that's initialized with, let's call it 'unfinished'. The processes are executed asynchronously by another thread, that, after some minutes, updates the state-column

Re: Event or Notice when a ListView's Model changes

2011-12-04 Thread Igor Vaynberg
the label that outputs the status can keep its last status, and in onbeforerender can check if the new status coming from the model is different then the old. if it is, it can fire the event. -igor On Sun, Dec 4, 2011 at 12:59 PM, hfriederichs h.friederi...@ohra.nl wrote: But the List isn't

Re: Event or Notice when a ListView's Model changes

2011-12-04 Thread hfriederichs
I'm sorry if my writing is confusing. But there isn't a label that outputs the state, because the list shows /only/ finished processes. Maybe the following flow explains what happens: - A user chooses an application he wants to deploy to a certain stage, let's say production - When he has chosen,

Re: Internationalization on panels

2011-12-04 Thread Martin Grigorov
Read https://cwiki.apache.org/WICKET/working-with-wicket-models.html Be careful on the static vs. dynamic part ;-) On Sun, Dec 4, 2011 at 8:54 PM, cosmindumy cosmind...@yahoo.com wrote: It works with columns.add(new PropertyColumnUser(new ResourceModel(name.name, Default), age, age)); but I

Re: Internationalization on panels

2011-12-04 Thread cosmindumy
Thanks. I red the tutorial and now is more clear. Now I am looking for a solution to change the ResourceModel of a Lable. For instance I want the key to be changed between show.components and when the component is displayed the property to be hide.componets. Therefore I need a way to set my

Re: Event or Notice when a ListView's Model changes

2011-12-04 Thread Andrea Del Bene
If you override listview's onBeforeRender you could check if finished processes' list contains version displayed by label and if so, you could update it. I'm sorry if my writing is confusing. But there isn't a label that outputs the state, because the list shows /only/ finished processes. Maybe

Re: Internationalization on panels

2011-12-04 Thread Igor Vaynberg
class mymodel extends abstractreadonlymodelstring { string getobject() { if (show) return getstring(show.components) else return getstring(hide.components);}} -igor On Sun, Dec 4, 2011 at 2:09 PM, cosmindumy cosmind...@yahoo.com wrote: Thanks. I red the tutorial and now is more clear.