Re: Models and panel updates

2010-07-15 Thread Sven Meier
Hi, >I think you mean that I need to use the PanelDetails class as a model, and create all the properties in it. it's not necessary to copy all properties to the panel. A CompoundPropertyModel doesn't care where it gets its properties from. As I have written, the following should work:

Re: AjaxRequestTarget.appendJavascript broken arrays

2010-07-15 Thread Igor Vaynberg
yes, i think the debug window shows it unescaped. -igor On Thu, Jul 15, 2010 at 8:47 PM, DmitryM wrote: > > Okay, I will double check that (since it's still in the XML response coming > back to the page) > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/AjaxReque

Re: AjaxRequestTarget.appendJavascript broken arrays

2010-07-15 Thread DmitryM
Okay, I will double check that (since it's still in the XML response coming back to the page) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxRequestTarget-appendJavascript-broken-arrays-tp2290353p2290924.html Sent from the Wicket - User mailing list archive at Na

Re: AjaxRequestTarget.appendJavascript broken arrays

2010-07-15 Thread Igor Vaynberg
it is expected in order to escape any possible CDATA]]> closing tags, this is escaped back into ] by javascript on the client side. -igor On Thu, Jul 15, 2010 at 9:07 AM, DmitryM wrote: > > Hello, guys > > I've noticed one thing recently (could not find anything related in the > forum). > My Wic

Re: AjaxRequestTarget.appendJavascript broken arrays

2010-07-15 Thread John Armstrong
Are you sure its not actually ^M which is a windows CR/LF linefeed? This may be causing the parser to choke if its passing them through as literals. Long shot, sorry :) J On Thu, Jul 15, 2010 at 9:07 AM, DmitryM wrote: > > Hello, guys > > I've noticed one thing recently (could not find anything

Re: Models and panel updates

2010-07-15 Thread Mansour Al Akeel
Sven, thank you. I had a look at the Ajax example. I think you mean that I need to use the PanelDetails class as a model, and create all the properties in it. This is very verbose as the Product class contains many fields that I need to edit, and adding getters/setters to the PanelDetails class wil

Re: Adding vertical scrollbar to the listview

2010-07-15 Thread Jeremy Thomerson
That's a css question. http://www.google.com/search?q=css+overflow On Thu, Jul 15, 2010 at 6:19 PM, jammyjohn wrote: > > Hi, > > I have a list view that displays 5 blank rows. When I click the "add blank > row" button, it adds 5 more rows to the existing 5 blank rows. Likewise, my > listview ma

Adding vertical scrollbar to the listview

2010-07-15 Thread jammyjohn
Hi, I have a list view that displays 5 blank rows. When I click the "add blank row" button, it adds 5 more rows to the existing 5 blank rows. Likewise, my listview may grow. Is there a possibility to add a scrollbar to my listview. Appreciate your help in this regard. Thanks J -- View this m

RE: Preventing double-click of AjaxButtons in ModalWindow

2010-07-15 Thread Alex Grant
That's perfect, thank you for the help. Alex -Original Message- From: Pedro Santos [mailto:pedros...@gmail.com] Sent: Friday, 16 July 2010 12:07 a.m. To: users@wicket.apache.org Subject: Re: Preventing double-click of AjaxButtons in ModalWindow You can use an IAjaxCallDecorator to disab

Re: Models and panel updates

2010-07-15 Thread Sven Meier
Hi, please see EditableLabelPage.java in wicket-examples for AjaxEditableLabels working with a CompoundPropertyModel. Why would the reference be outdated, since ProperyModel is considered dynamic module ? PropertyModel is dynamic in the property it provides, but it is hard-wired on the obj

Re: Models and panel updates

2010-07-15 Thread Mansour Al Akeel
Sven, thank you, but it worked when using this ? add(new Label("codProduct")); Is there an easy way to update the default model And the AjaxEditableLabel in the similar fasion? Nice to have an example. Why would the reference be outdated, since ProperyModel is considered dynamic module ? Thank

Re: Models and panel updates

2010-07-15 Thread Sven Meier
Hi, it's the "outdated reference" problem (as often when something goes wrong with models): new PropertyModel(getDefaultModel(), "codProduct")) Note that you're putting the current default model into another model. Later on you change the default model: setDefaultModel(new CompoundProper

Re: Loading static javascript

2010-07-15 Thread Martin Makundi
Then you might want to use a resourcestream ? Something like: IResourceStream resourceStream = new AttachmentResourceStream( new ByteArrayInputStream(item.getModelObject().getFile())); getRequestCycle().setRequestTarget( new ResourceStreamRe

Re: Loading static javascript

2010-07-15 Thread Jarosz Yohan
Perhaps I have badly explained something. my javascript files are not located in my webapps directory, but on the filesystem On Jul 15, 2010, at 6:31 PM, Jarosz Yohan wrote: In fact, this is not working too. I think it because wicket couldn't find my javascript file. when I give url (this file ca

Re: Loading static javascript

2010-07-15 Thread Jarosz Yohan
In fact, this is not working too. I think it because wicket couldn't find my javascript file. when I give url (this file can be accessed via url also) it's working, but not with a filesystem path and I really need not to pass by filesytem... On Jul 15, 2010, at 6:06 PM, Martin Makundi wrote: Thi

Re: IPropertyReflectionAwareModel

2010-07-15 Thread Igor Vaynberg
no reason that i can see, file a jira. cant be fixed in 1.4 though. -igor 2010/7/15 Uwe Schäfer : > hi > > is there a particular reason, why IPropertyReflectionAwareModel does not > extend IModel? > > it looks like an extension of IModel and i need exactly this: an IModel > that implements IPrope

AjaxRequestTarget.appendJavascript broken arrays

2010-07-15 Thread DmitryM
Hello, guys I've noticed one thing recently (could not find anything related in the forum). My Wicket is 1.4.9 and I needed a JSON data with arrays which is attached to the Ajax response. Currently I see that all arrays' closing brackets ']' are turned into ']^' which technically breaks my JSON

Re: Loading static javascript

2010-07-15 Thread Martin Makundi
This is easier: response.renderJavascriptReference("/js/jquery.js"); ** Martin 2010/7/15 Jarosz Yohan : > Hello, > > I'm trying to load statatic js files. I 'm using in the init of the > application > > getResourceSettings().addResourceFolder("/somePath/"); > resourceSettings.setResourceSt

Loading static javascript

2010-07-15 Thread Jarosz Yohan
Hello, I'm trying to load statatic js files. I 'm using in the init of the application getResourceSettings().addResourceFolder("/somePath/"); resourceSettings.setResourceStreamLocator(new RessourceLocator()); with public class RessourceLocator extends ResourceStreamLocator{ public RessourceLocat

Re: wicket in a mobile application.

2010-07-15 Thread Martin Funk
2010/7/15 amit1400158 > > Is it favourable to develop android application in wicket or to use android > sdk or any other framework?? > as with so many other questions: it depends and there is no easy answer to that. There probably already have been written ephic papers on that subject. Short ans

Re: Models and panel updates

2010-07-15 Thread Mansour Al Akeel
Hello Martrin, and Ernesto, it's still not working. I have this ProductPanel to be updated and (possibly edited). It shows the product info when an item is clicked. Here's the code for the Product Panel: public class ProductDetails extends Panel { @EJB private ProductServicesLocal

How to prevent rendering of unauthorized components?

2010-07-15 Thread Martin Makundi
Hi! I would like to avoid this error, to prevent the render alltogether. How can I do that? 2010-07-15 17:15:52,117 75919560 [24056...@qtp-13963314-568] ERROR RequestCycle - Component [Page class = com.mycompany.application.view.application.MainPage, id = 0, version = 3, ajax = 1] does not permi

IPropertyReflectionAwareModel

2010-07-15 Thread Uwe Schäfer
hi is there a particular reason, why IPropertyReflectionAwareModel does not extend IModel? it looks like an extension of IModel and i need exactly this: an IModel that implements IPropertyReflectionAwareModel: might be PropertyModel, might be something homebrewn currently i have to do

Re: wicket in a mobile application.

2010-07-15 Thread Jeremy Thomerson
On Thu, Jul 15, 2010 at 4:58 AM, amit1400158 wrote: > > Is it favourable to develop android application in wicket or to use android > sdk or any other framework?? > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/wicket-in-a-mobile-application-tp2287273p2289914.htm

Re: Models and panel updates

2010-07-15 Thread Martin Makundi
you need to add the updated panel into target: target.addComponent(panelToBeUpdated); 2010/7/15 Mansour Al Akeel : > I just tried it. It doesn't update the panel. Here's the full code: > > public class ProductDetails extends Panel { > >       �...@ejb >        private ProductServicesLocal produ

Re: Models and panel updates

2010-07-15 Thread Ernesto Reinaldo Barreiro
Do you mean update the whole panel when you edit the "codProduct"? Ernesto On Thu, Jul 15, 2010 at 2:41 PM, Mansour Al Akeel wrote: > I just tried it. It doesn't update the panel. Here's the full code: > > public class ProductDetails extends Panel { > >       �...@ejb >        private ProductSer

Re: Models and panel updates

2010-07-15 Thread Mansour Al Akeel
I just tried it. It doesn't update the panel. Here's the full code: public class ProductDetails extends Panel { @EJB private ProductServicesLocal productServices; public ProductDetails(String id, final Product product) { super(id); setOutpu

Re: Models and panel updates

2010-07-15 Thread Martijn Dashorst
If you look at the source code for AjaxEditableLabel you could've seen that it is not suited for CompoundPropertyModel usage. Because the editor requires two components: a label and an input box, which are both created with "label" ,resp. "editor" component identifiers, which both bind to the defau

Re: Models and panel updates

2010-07-15 Thread Ernesto Reinaldo Barreiro
can you try add(new AjaxEditableLabel("codProduct", new PropertyModel(product, "codProduct")); Ernesto On Thu, Jul 15, 2010 at 2:08 PM, Mansour Al Akeel wrote: > Hello all, I have been trying to resolve this issue. I have a panel > that shows a product info. > > public class ProductDetails ext

Re: Models and panel updates

2010-07-15 Thread Mansour Al Akeel
so what should I use in this case? can you give me an example, to update the panel and have ajax fields ? On Thu, Jul 15, 2010 at 3:17 PM, Martin Makundi wrote: > Hi! > > I would dis-advice you using compoundpropertymodel. Dropping it will > make everything more explicit and clear all your probl

Re: Models and panel updates

2010-07-15 Thread Martin Makundi
Hi! I would dis-advice you using compoundpropertymodel. Dropping it will make everything more explicit and clear all your problems. Using compoundpropertymodel you will get all kinds of surprises.. sometimes, and spend lot of extra time resolving. ** Martin 2010/7/15 Mansour Al Akeel : > Hello a

Models and panel updates

2010-07-15 Thread Mansour Al Akeel
Hello all, I have been trying to resolve this issue. I have a panel that shows a product info. public class ProductDetails extends Panel { public ProductDetails(String id, final Product product) { super(id); setOutputMarkupId(true); this.set

Re: Preventing double-click of AjaxButtons in ModalWindow

2010-07-15 Thread Pedro Santos
You can use an IAjaxCallDecorator to disable buttons and re-enable them with the ajax request completes On Wed, Jul 14, 2010 at 7:53 PM, Alex Grant wrote: > I have ModalWindows whose content contains OK AjaxButtons, which, assuming > validation passes, will do some processing and then close the M

Re: localizing resources

2010-07-15 Thread Paul Szulc
ok, thx! On Thu, Jul 15, 2010 at 12:23 PM, Martin Grigorov wrote: > name it logo_en.png, logo_es.png, ... > then just set the Session locale after login: > > if (loginOk) { > session.setLocale(user.getLocale()) > ... > } > > see also Session#setStyle(). > > On Thu, 2010-07-15 at 11:58 +0200, Pau

Re: localizing resources

2010-07-15 Thread Martin Grigorov
name it logo_en.png, logo_es.png, ... then just set the Session locale after login: if (loginOk) { session.setLocale(user.getLocale()) ... } see also Session#setStyle(). On Thu, 2010-07-15 at 11:58 +0200, Paul Szulc wrote: > Can we localize resources in Wicket? I mean imagine I have multiple-la

Re: using comet to find all clients using a page

2010-07-15 Thread fachhoch
wicket cometd is it asychronous or synchronus ? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/using-comet-to-find-all-clients-using-a-page-tp2283204p2289929.html Sent from the Wicket - User mailing list archive at Nabble.com. -

localizing resources

2010-07-15 Thread Paul Szulc
Can we localize resources in Wicket? I mean imagine I have multiple-language application and this application has a logo image. I have pl_logo.ong en_logo.png es_logo.png and so on. And now I want to define my image in markup once and in controller one, and let wicket to decided which resource (whi

Re: wicket in a mobile application.

2010-07-15 Thread amit1400158
Is it favourable to develop android application in wicket or to use android sdk or any other framework?? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-in-a-mobile-application-tp2287273p2289914.html Sent from the Wicket - User mailing list archive at Nabble.co

Re: Wicket's Form Model (using hibernate entity or value objects) Design

2010-07-15 Thread vov
see org.apache.wicket.model.LoadableDetachableModel -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Re-Wicket-s-Form-Model-using-hibernate-entity-or-value-objects-Design-tp2289854p2289870.html Sent from the Wicket - User mailing list archive at Nabble.com. --

Re: Changing CSS classes

2010-07-15 Thread Ernesto Reinaldo Barreiro
Josh, If you use default FeedbackPanel that's already done for you, as following method shows... protected String getCSSClass(final FeedbackMessage message) { return "feedbackPanel" + message.getLevelAsString(); } So, all you have to do is add CSS for 'li.feedba

Re: Wicket's Form Model (using hibernate entity or value objects) Design

2010-07-15 Thread Nivedan Nadaraj
Hi All I use Wicket with Hibernate. I have used the hibernate entity as a Form's Model.Now however I noticed that I need to also add/update an LDAP instance's entries.This means as part of my submit Ineed to wicket to capture the non-entity properties also. 1. I either have to use a Value Object a

tomcat 7.0.0 getRelativePathPrefixToContextRoot

2010-07-15 Thread Ludger Kluitmann
Hi, with running a wicket application under tomcat 7 I found a strange difference to tomcat 6. getRelativePathPrefixToContextRoot in tomcat 6 is empty. In tomcat 7 getRelativePathPrefixToContextRoot delivers ../ I'm not sure if it is a wicket or a tomcat problem, but nevertheless I get wrong path

Changing CSS classes

2010-07-15 Thread Josh Kamau
Hi guys; I would like to change the CSS style of my feedback component depending on whether its error or info. How do do that? How do i modify the css class or id attribute of a component. Regards. Josh.

Re: Logging

2010-07-15 Thread Martin Makundi
That's a whole another story ... ;) ** Martin 2010/7/15 Josh Kamau : > Thanks Martin. I wanted to make sure am doing the right thing.. > > Regards. > On Thu, Jul 15, 2010 at 10:59 AM, Martin Makundi < > martin.maku...@koodaripalvelut.com> wrote: > >>        private static final Logger log = >> Lo

Re: Logging

2010-07-15 Thread Josh Kamau
Thanks Martin. I wanted to make sure am doing the right thing.. Regards. On Thu, Jul 15, 2010 at 10:59 AM, Martin Makundi < martin.maku...@koodaripalvelut.com> wrote: >private static final Logger log = > LoggerFactory.getLogger(WebPage.class); > > > 2010/7/15 Josh Kamau : > > Hi guys; > >

Re: Output just text, no component

2010-07-15 Thread Ted Vinke
Darn, that's it! Thanks a lot! Regards, Ted Op 14-7-2010 16:04, James Carman schreef: You can use a org.apache.wicket.util.template.JavaScriptTemplate. On Wed, Jul 14, 2010 at 9:51 AM, Ted Vinke wrote: Hi everybody! I'm trying to accomplish something new with Wicket: output just some tex

Re: Initiating File Download through Ajax is not working

2010-07-15 Thread MattyDE
Hey Svaen, thanks a lot. This works smoothly ;) download = new AjaxDownloadBehavoir() { @Override protected IResourceStream getResourceStream() { return

Re: Initiating File Download through Ajax is not working

2010-07-15 Thread Sven Meier
Hi, IIRC you have to override AJAXDownload#getFileName(), this should trigger a download dialog in the browser. Regards Sven On 07/15/2010 09:46 AM, MattyDE wrote: Hi Folks, i need to write an Web-XML-Filler. So i have to generate a XML-File on-the-fly and after that i want to stream the g

Re: TextFilteredPropertyColumn feature?

2010-07-15 Thread Ivan Dudko
thank you! error is really here. 2010/7/15 vov : > > I thing that you can have a problem with your FilterCriterionInterface: > public String getComparedValue() >        { >          return filter.get("Name").toString(); >        } > ...it can throw NullPointerExcaption if you did not input name f

Re: Logging

2010-07-15 Thread Martin Makundi
private static final Logger log = LoggerFactory.getLogger(WebPage.class); 2010/7/15 Josh Kamau : > Hi guys; > > I know wicket comes with pre configured logging . How do i get hold of the > Logger object so that i can log messages in my pages and panels? > > regards. > > Josh. >

Logging

2010-07-15 Thread Josh Kamau
Hi guys; I know wicket comes with pre configured logging . How do i get hold of the Logger object so that i can log messages in my pages and panels? regards. Josh.

Initiating File Download through Ajax is not working

2010-07-15 Thread MattyDE
Hi Folks, i need to write an Web-XML-Filler. So i have to generate a XML-File on-the-fly and after that i want to stream the generated File to the browser. Iam using this Example : https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow ... and it works hal

Re: TextFilteredPropertyColumn feature?

2010-07-15 Thread vov
I thing that you can have a problem with your FilterCriterionInterface: public String getComparedValue() { return filter.get("Name").toString(); } ...it can throw NullPointerExcaption if you did not input name filter Try to debug your dao.getResultSetFullSize(fltr) -- V

Re: TextFilteredPropertyColumn feature?

2010-07-15 Thread Ivan Dudko
I know, it works.. But only if i fill two inputs it starts filtering. If i miss one field - nothing heppens. public class MyDataProvider extends SortableDataProvider implements IFilterStateLocator{ private static final long serialVersionUID = 4127276061657391787L; DataSou

Re: TextFilteredPropertyColumn feature?

2010-07-15 Thread vov
Your page look fine, but you do not attach code for 'MyDataProvider' -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/TextFilteredPropertyColumn-feature-tp2289687p2289754.html Sent from the Wicket - User mailing list archive at Nabble.com.