Re: InvalidUrlException thrown while clicking row in a InMethod DataGrid
Hi, Thanks for your reply. I believe these callbacks are not mandatory. Your workaround works fine but it also causes the grid selection to disappear which I don't want to happen. Thanks to your tip I found another workaround. This is to use the CloseButtonCallback to hide the iframe before closing the modal window. This prevents the exception from being thrown. Anyway the core reason of the problem still remains. Further testing shown that only the row selection causes the exception. Other operations on the grid like sorting, switching pages work just fine. br, Marcin Palka Juan Kipes wrote: > > I think you forgot this method in the modal > > modal.setCloseButtonCallback(new ModalWindow.CloseButtonCallback() { > > }); > > > modal.setWindowClosedCallback(new > ModalWindow.WindowClosedCallback() > { > > }); > > I attached the modified quickstar > -- View this message in context: http://old.nabble.com/InvalidUrlException-thrown-while-clicking-row-in-a-InMethod-DataGrid-tp27001559p27004581.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Ajax support for multipart forms & nested forms in 1.4.1
A JIRA report has been created: https://issues.apache.org/jira/browse/WICKET-2433 cheers, Marcin -- View this message in context: http://www.nabble.com/Ajax-support-for-multipart-forms---nested-forms-in-1.4.1-tp25098452p25112870.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Ajax and Form#setMultiPart(true)
Peter, I modifed your quickstart a bit and it seems to work with the wicket 1.4.0. Unfortunately I haven't been able for make it work with the 1.4.1. I've got no idea why. It may be a bug. http://www.nabble.com/file/p25103405/quickstart-modified.zip quickstart-modified.zip cheers, Marcin -- View this message in context: http://www.nabble.com/Ajax-and-Form-setMulitPart%28true%29-tp25092790p25103405.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Ajax and Form#setMultiPart(true)
Peter, I modified my example to allow removing items. I also modified it to use a RefreshingView instead of a ListView. I think you should read a bit about wicket models. Any component update should go the following way - first update a model that is bound to a component and then repaint the component. If you do not use ajax the component will get updated itself when you press a button of click a link. Do not use the setResponsePage unless you want to navigate to another page. If you do want to use ajax you refresh your component by adding it to the AjaxRequestTarget. In case of a ListView or any other repeater you just add or remove elements to a list that is provided as a Model for a repeater and then you just make it repaint (either ajax or non ajax way). http://www.nabble.com/file/p25099043/ListEditor.zip ListEditor.zip cheers Marcin -- View this message in context: http://www.nabble.com/Ajax-and-Form-setMulitPart%28true%29-tp25092790p25099043.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Ajax and Form#setMulitPart(true)
Peter, Have a look into the quickstart project that is attached to my post. It's a simple list editor based on ListView. http://www.nabble.com/file/p25096254/ListEditor.zip ListEditor.zip . Hope it helps. cheers, Marcin -- View this message in context: http://www.nabble.com/Ajax-and-Form-setMulitPart%28true%29-tp25092790p25096254.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AjaxTabbedPanel with different forms on each tab
Tim, You have to place your modal window within a form. It's mandatory if you want to use Forms on a modal. You have to write code similar to the following: modal placeholder Form outerForm =new Form("outerForm"); ModalWindowmodalWithTabs = new ModalWindow("modalWithTabs"); ... outerForm.add(modalWithTabs); add(outerForm); cheers, Marcin Help System wrote: > > Hi, > > I have an AjaxTabbedPanel in a ModalWindow. There are two tabs, each > containing a panel with a simple form. > > Looking at the html produced, the AjaxTabbedPanel moves the element > from the place in the panel to near the top of the tabbed panel html > hierarchy and changes the id. All form elements are then part of the new > tabbed panel form. > > The first tab works OK but the second tab fails to return from an > AjaxSubmit. The error shown in the debug window is > > *ERROR: * > Wicket.Ajax.Call.submitFormById: Trying to submit form with id > 'form3f' that is not in document. > > The panels and forms work fine when not displayed in the tabbed panel. > > Can anyone tell me what I'm doing wrong please? > > Using Wicket 1.4 > > Thanks, > Tim > > -- View this message in context: http://www.nabble.com/AjaxTabbedPanel-with-different-forms-on-each-tab-tp25044965p25049550.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Form tag does not get rendered on a Panel placed in a TabbedPanel within a ModalWindow
Matej, Thanks. I missed that remark :-| I have used forms within a modal window before and I haven't suffered of problems like this one. I mean I haven't had to put that extra form outside a modal window. Except for the fact that I haven't had any TabbedPanels on my modals. cheers, Marcin -- View this message in context: http://www.nabble.com/Form-tag-does-not-get-rendered-on-a-Panel-placed-in-a-TabbedPanel--within-a-ModalWindow-tp24795566p24795933.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket for non Web/AJAX developers?
Hi, I think the "Wicket in Action" is a good book to start. It even has a chapter called "Ajax explained" :-) I don't know if it explains how the web app works as such but it goes through the entire development process of a Wicket web application so you should be able to get the idea behind. And it's less than 400 pages :-) cheers, Marcin -- View this message in context: http://www.nabble.com/Wicket-for-non-Web-AJAX-developers--tp24780111p24782743.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: intercomponent communications
That's quite interesting stuff. Could you contribute your code to the wicketsuff (e.g. create a new wicketstuff project) ? cheers, Marcin Vladimir K wrote: > > I don't see much buzz about this topic here, just a request for the trick > for the forthcoming Johnatan Locke book. So it seems for now that just a > few > poople are interested in. > > I experienced problems in different places with approaches where > components > are loosely coupled and they try on their own to find the component which > is > supposed to be the source of events. > > I ended up with a form that serves as a subscription service for the > components and dispatches the events. Let me know if somebody is > interested > in the implementation. > > -- View this message in context: http://www.nabble.com/intercomponent-communications-tp24703947p24715276.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket, Jboss, EJB3
Looks like it works with 5.1GA too. See attached quickstart project. It's a maven-based enterprise application project that consists of a EJB, WAR and EAR modules. Build it and deploy the EAR into your JBoss AS. Please note that you have to configure your JBoss "home" folder to the top level pom file (look at the bottom of the file, jboss.home property). cheers, Marcin http://www.nabble.com/file/p24652774/SampleEA.zip SampleEA.zip -- View this message in context: http://www.nabble.com/Wicket%2C-Jboss%2C-EJB3-tp24650609p24652774.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket, Jboss, EJB3
Hi Loren, I must admit I have never tried to get the injection to work with JBosss-5.1 but I remember I was once able to inject EJBs just fine with wicket-contrib-javaee and JBoss version 4.something (I don't remember exact version but for sure it was EJB3.0-enabled). Anyways, I remember that I followed a tutorial to setup a project. This one it was: http://jeff-schwartz.blogspot.com/2009/05/wicket-ejb-di-with-netbeans-part-3.html cheers Marcin Loren Cole wrote: > > I've been using wicket-contrib-javaee-1.1 with glassfish for a while and > it > works fairly well, but the powers that be have decided we should try > porting > to JBoss and I cannot for the life of me get injection to work with Wicket > on JBoss-5.1.0.GA. > > Has anyone else done this? If so what did you need to do to make it work? > > > Thanks, > Loren > > -- View this message in context: http://www.nabble.com/Wicket%2C-Jboss%2C-EJB3-tp24650609p24651181.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket, Jboss, EJB3
Hi Loren, I must admit I have never tried to get the injection to work with JBosss-5.1 but I remember I was once able to inject EJBs just fine with wicket-contrib-javaee and JBoss version 4.something (I don't remember exact version but for sure it was EJB3.0-enabled). Anyways, I remember that I followed the following tutorial to setup a project: http://jeff-schwartz.blogspot.com/2009/05/wicket-ejb-di-with-netbeans-part-3.html cheers Marcin Loren Cole wrote: > > I've been using wicket-contrib-javaee-1.1 with glassfish for a while and > it > works fairly well, but the powers that be have decided we should try > porting > to JBoss and I cannot for the life of me get injection to work with Wicket > on JBoss-5.1.0.GA. > > Has anyone else done this? If so what did you need to do to make it work? > > > Thanks, > Loren > > -- View this message in context: http://www.nabble.com/Wicket%2C-Jboss%2C-EJB3-tp24650609p24651166.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: GZip HTML response
You may either use a servlet filter to gzip your responses or enable compresion in an Apache HTTP server (if you have one). A gzip filter: http://onjava.com/pub/a/onjava/2003/11/19/filters.html A gzip compression module for the Apache HTTP server. http://www.cyberciti.biz/tips/speed-up-apache-20-web-access-or-downloads-with-mod_deflate.html cheers, Marcin chrisdavis8 wrote: > > Hi All, > > I really need to enable GZip compression for HTML in my app, I see in Jira > that there is a bug fix for this but its not released in the stable build. > In the comments it suggest he following code snippet > > class GZipBufferedResponse extends BufferedResponse > { > public void close() > { > String result = toString(); > if (result.length != 0) > { >getOutputStream().write(compress(result)); > } > } > > > but I don't have a clue what to do with it, could anyone point me towards > the correct class where I am supposed to use this? > > thanks in advance > CD > > -- View this message in context: http://www.nabble.com/GZip-HTML-response-tp24631271p24633142.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How do I set a selected item outside of an inmethod datagrid?
If I understand your problem correctly you want to do master and detail grids. When you select an item in a master table (by means of a mouse click) you want to repopulate the details(history) table and make a selection on programmaticaly, right? I would say you first need to override onItemSelection changed to intercept selection events on your master table: @Override public void onItemSelectionChanged(IModel item, boolean newValue) { super.onItemSelectionChanged(item, newValue); if (newValue) { //selection has changed on the master table //so you have to update //the history table's datasource object updateHistoryTableDatasource(item);//you implementation goes here //mark all items in a detail table for update historyTable.markAllItemsDirty(); //refresh detail table historyTable.update(); } } And for selection of a newest item in a history I would suggest that you sort history by date that the newest item comes first and then simply select the first item in the historyTable. cheers Marcin -- View this message in context: http://www.nabble.com/How-do-I-set-a-selected-item-outside-of-an-inmethod-datagrid--tp24565364p24595335.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Tab panel child
Gerald, My example quickstart project is maven based. So I would suggest to use maven to compile it. If your're a beginner I would highly recommend that you download and use a Netbeans IDE (from http://www.netbeans.org) which has a built-in maven project support. Open the project from the IDE and then you should be able to build and run it with a single button click. cheers, Marcin MartinM wrote: > > And change compiler syntax > > ** > Martin > > 2009/7/21 Marcin Palka : >> >> Gerald, >> >> You have to use Java version 5. Earlier versions don't support generics. >> I >> believe Wicket 1.4 requires Java 5. >> >> cheers >> Marcin >> >> > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > > -- View this message in context: http://www.nabble.com/Tab-panel-child-tp24564353p24586192.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Tab panel child
Gerald, You have to use Java version 5. Earlier versions don't support generics. I believe Wicket 1.4 requires Java 5. cheers Marcin Gerald Fernando wrote: > > Hi marchin, > in your code > > > HashMap tabMap = new HashMap(); - this is a > line which shows error > > there is is error such as > > Parameterized types are only avilable if source level is 5. > what is this error how can i solve it? > > Thanks&Regards, > Gerald A > > > > On Tue, Jul 21, 2009 at 3:30 PM, Marcin Palka > wrote: > >> >> See an example in the attached file. It should be quite easy to >> understand. >> The example consists of two pages. First of them contains a tabbed panel >> with three tabs. Each of them contains a panel (an instance of the same >> panel class). The the same panel is embedded outside the tabbed panel >> into >> a >> page contents directly. Another page contains the same panel embedded >> once >> again. >> >> http://www.nabble.com/file/p24584839/TabsExample.zip TabsExample.zip >> >> cheers, >> Marcin >> -- >> View this message in context: >> http://www.nabble.com/Tab-panel-child-tp24564353p24584839.html >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > > > -- > ThanksĀ®ards, > Gerald A > > -- View this message in context: http://www.nabble.com/Tab-panel-child-tp24564353p24586058.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AutoCompleteTextField and IE8, javascript error thrown
Hi, I use the wicket 1.4 nad I haven't noticed anything like that. You may want to look into wicket svn and check if there were any changes made to the wicket-autocomplete.js between version 1.3.4 and 1.3.6. I've just looked into 1.4 branch in svn and it seems that there have been quite some changes made to the wicket-autocomplete.js recently. Maybe it's time to try the 1.4, it's just about to go final. cheers, Marcin -- View this message in context: http://www.nabble.com/AutoCompleteTextField-and-IE8%2C-javascript-error-thrown-tp23757807p24585957.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Tab panel child
See an example in the attached file. It should be quite easy to understand. The example consists of two pages. First of them contains a tabbed panel with three tabs. Each of them contains a panel (an instance of the same panel class). The the same panel is embedded outside the tabbed panel into a page contents directly. Another page contains the same panel embedded once again. http://www.nabble.com/file/p24584839/TabsExample.zip TabsExample.zip cheers, Marcin -- View this message in context: http://www.nabble.com/Tab-panel-child-tp24564353p24584839.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: 1.4 is ready for production?
Hi, My team develops a system that's based on the 1.4 and during the development we haven't experienced any serious issues with prior-final builds of 1.4. System is currently being tested. We started development with rc1 and moved forward to every new release candidate version. Except for minor modal window issue and lack of developer experience (first Wicket project within a company) we haven't suffered any wicket-specific issues at all. cheers, Marcin -- View this message in context: http://www.nabble.com/1.4-is-ready-for-production--tp24572049p24575642.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: CheckBoxMultipleChoice Construtor Nigthmare...
Hi, Try it this way. http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd"; > Wicket Quickstart Archetype Homepage item public class HomePage extends WebPage { private static final long serialVersionUID = 355590356144986L; //this lists holds selected items ArrayList chosen = new ArrayList(); //this list provides available choices List choices = Arrays.asList(new String[]{"One", "Two", "Three"}); public HomePage(final PageParameters parameters) { Form form = new Form("form"); //add a checkbox group form.add(new CheckBoxMultipleChoice("choices", new Model(chosen), choices)); add(form); //render selected items in a listview add(new ListView("listview", chosen) { @Override protected void populateItem(ListItem item) { item.add(new Label("item", item.getModelObject())); } }); } } cheers Marcin -- View this message in context: http://www.nabble.com/CheckBoxMultipleChoice-Construtor-Nigthmare...-tp24505133p24505999.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: FeedbackPanel does not show up on a page shown as a result of a redirect using RestartResponseAtInterceptPageException
It turns out to be my bad. I call the continueToOriginalDestination method to log the value that it returns. It seems this call causes the unwanted redirect. Removing the following line seems to make the trick. logger.debug("onSubmit username=" + username + " password=" + password + " continueToOriginalDestination=" + continueToOriginalDestination()); -- View this message in context: http://www.nabble.com/FeedbackPanel-does-not-show-up-on-a-page-shown-as-a-result-of-a--redirect-using-RestartResponseAtInterceptPageException-tp24380159p24382117.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [kind-of-announce] Swit 0.9.0, wicket library for graphics stuff
Great lib, great work, thanks :-) I am a developer, not a webmaster. It may make my work much easier. BTW: Internet Exploder 7 messes the example layout a bit (moves the whole thing to the right). -- View this message in context: http://www.nabble.com/-kind-of-announce--Swit-0.9.0%2C-wicket-library-for-graphics-stuff-tp24211061p24211754.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: ModalWindow.setResizable(false) no longer works in 1.4-rc5?
I provided a patch that fixes the issue. cheers Marcin -- View this message in context: http://www.nabble.com/ModalWindow.setResizable%28false%29-no-longer-works-in-1.4-rc5--tp24135317p24210823.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: ModalWindow.setResizable(false) no longer works in 1.4-rc5?
I filled a JIRA for this: https://issues.apache.org/jira/browse/WICKET-2345 -- View this message in context: http://www.nabble.com/ModalWindow.setResizable%28false%29-no-longer-works-in-1.4-rc5--tp24135317p24210005.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [announce] Wicket 1.4-RC5 released
Hi all, Did anything bad happen to the RC5? I mean I cannot see any anouncement about the release on the wicket.apache.org. Was the release been canceled or delayed? cheers, Marcin -- View this message in context: http://www.nabble.com/-announce--Wicket-1.4-RC5-released-tp24101241p24182619.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow.setResizable(false) no longer works in 1.4-rc5?
James, thanks for the reply. The problem turns out to be more complex. Simple page with a modal window works like a charm with RC5 (I mean I can easily set modal window's resizability). My application's modal windows on the other hand don't. I will try to investigate it further and fill a JIRA report if needed. So far I compared the markup generated by both, my problematic application and simple quickstart application and it seems that style attributes are missing in the app that experiences resizability problem. The style attributes that are missing are "cursor: default;" (as below). Fixed size modal window: Resizable (but supposed to be fixed size) modal window: I will dig into the ModalWindow's code to find out when these atributes are added and when they don't. And the code I use to construct and show a modal window: final ModalWindow modal = new ModalWindow("modal"); modal.setContent(new DummyPanel(modal.getContentId())); //DummyPanel contains only static text modal.setTitle("Modal window"); modal.setHeightUnit("px"); modal.setWidthUnit("px"); modal.setInitialHeight(100); modal.setInitialWidth(300); modal.setResizable(false); add(modal); AjaxFallbackLink showModal = new AjaxFallbackLink("show_modal") { @Override public void onClick(AjaxRequestTarget target) { modal.show(target); } }; add(showModal); Marcin James Carman-3 wrote: > > The 1.4 release is all about "genericizing" Wicket. If you've got a > regression like this, it's probably not supposed to be happening. I > would file a JIRA and attach a quickstart. > -- View this message in context: http://www.nabble.com/ModalWindow.setResizable%28false%29-no-longer-works-in-1.4-rc5--tp24135317p24138498.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
ModalWindow.setResizable(false) no longer works in 1.4-rc5?
Hi, I migrated my application from 1.4-rc1 to 1.4-rc5 and noticed that the ModalWindow's setResizable(false) method no longer works. All the modal dialogs in my application became resizable. Was there any change introduced in this area in the RC5 or is this a regular bug? cheers, Marcin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Different xml property filename for the markup and java
Hi Jens, I would suggest to create a base page class that contains common elements and then for each customer extend your base page class. This makes it possible to keep common message keys in a base class property file(s). As far as I know in case wicket is not able to find a message key in a property file(s) with the same name as a class file it will look into its base class property files as well. You may want to read this article (especially the "Finding the message" section): http://day-to-day-stuff.blogspot.com/2008/05/wicket-internationalization.html cheers Marcin -- View this message in context: http://www.nabble.com/Different-xml-property-filename-for-the-markup-and-java-tp23847329p23851943.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: OutOfMemory on certain combinations of controls
Should it be considered a bad design to use callbacks from a modal window? I use modal windows to edit rows from a grid. On save action I close the modal window and then call a callback method back in the the calling panel which makes the grid refresh. Does this approach carry any risk? What approach do you guys suggest to solve this? Marcin -- View this message in context: http://www.nabble.com/OutOfMemory-on-certain-combinations-of-controls-tp23750424p23814865.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Inmethod DataGrid without column headers?
Thanks for reply. I already gave this one a try. It does not seem to be called at all. I searched through inmethod grid sources and it seems that it really isn't called at all. My search shown only one occurence of addHeaderToolbar method which is its declaration in AbstractDataGrid class. This is my code: DataGrid grid = new DataGrid("usersGrid", usersDS, columns) { @Override public void onItemSelectionChanged(IModel item, boolean newValue) { super.onItemSelectionChanged(item, newValue); selectedUser = (User) item.getObject(); } @Override protected void onRowPopulated(WebMarkupContainer rowComponent) { super.onRowPopulated(rowComponent); rowComponent.add(new AjaxEventBehavior("ondblclick") { @Override protected void onEvent(AjaxRequestTarget target) { showModalUserEditor(ComponentViewMode.EDIT); } }); } @Override public void addHeaderToolbar(AbstractHeaderToolbar toolbar) { logger.info("addHeaderToolbar"); //super.addHeaderToolbar(toolbar); } @Override public void addTopToolbar(AbstractToolbar toolbar) { logger.info("addTopToolbard"); //super.addTopToolbar(toolbar); } }; Marcin -- View this message in context: http://www.nabble.com/Inmethod-DataGrid-without-column-headers--tp23782672p23784978.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Inmethod DataGrid without column headers?
Hi, Is there any way to render a Inmethod DataGrid without column headers? For wicket's standard DataTable there's a HeaderlessColumn but I haven't been able to find an equivalent column type for DataGrid. cheers Marcin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: CompoundPropertyModel and Combobox
The code below works just fine for me. Instead of using complex type as a model object for a drop down I use an instance of IChoiceRenderer to control what's used for an id and what's displayed as a value. User user = ; setModel(new CompoundPropertyModel(user)); add(new DropDownChoice("usrRole", SystemRole.asStringList(), new IChoiceRenderer() { @Override public String getDisplayValue(Object object) { return Enum.valueOf(SystemRole.class, object.toString()).getRoleName(); } @Override public String getIdValue(Object object, int index) { if (index == -1) { return SystemRole.SALESMAN.toString(); } return SystemRole.asStringList().get(index); } }).setRequired(true)); The combo items are populated from Enum values: public enum SystemRole { SYS_ADMIN("Administrator systemu"), SERVICEMAN("Serwisant"), NETWORK_ADMIN("Administrator sieci"), SALESMAN("Pracownik punktu"), ANY("Bez roli"); private final String roleName; SystemRole(String roleName) { this.roleName = roleName; } public String getRoleName() { return roleName; } private static List stringList; public static List asStringList() { if (stringList == null) { stringList = new ArrayList(); for (SystemRole sr : values()) { stringList.add(sr.toString()); } } return stringList; } } And this is how model object looks like: public class User { private Integer usrId; private String usrLogin; private String usrPasswrd; private String usrEmail; private String usrMobile; private String usrLandline; private String usrFirstName; private String usrLastName; private String usrRole; } Hope this helps :-) cheers, Marcin -- View this message in context: http://www.nabble.com/CompoundPropertyModel-and-Combobox-tp23733910p23741340.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org