Re: page without class
Have you tried? I'd guess it should just work. Regards, Linda tubin gen wrote: can I create a page just with html and not write class ? I need some static html pages and writing java for those will be of no use . Geen virus gevonden in het binnenkomende-bericht. Gecontroleerd door AVG - www.avg.com Versie: 9.0.707 / Virusdatabase: 270.14.63/2500 - datum van uitgifte: 11/13/09 08:54:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Adding wicket components to a fixed container
Well it should be possible (if I understand correctly what you want). For example I have a screen with a panel where I want to show several different kinds of information. I've named the panel viewdetails and fill it with either a panel where you can edit the details or with a panel where you can merely view them. If this is the kind of effect you are talking about, I'd be happy to mail you my code. Regards, Linda ping ping wrote: Is that possible for me to define a span container inside wicket html markup, such that i can add different component to that container based on different situation? Regards _ Windows 7: Simplify what you do everyday. Find the right PC for you. http://windows.microsoft.com/shop No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.423 / Virus Database: 270.14.27/2452 - Release Date: 10/22/09 18:44:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: where download inmethod datagrid
It's part of wicketstuff now: http://wicketstuff.org/confluence/display/STUFFWEB/Home Regards, Linda Roman Ilin wrote: Hi *, I saw some screen shots of inmethod datagrid components. I see some messages in this mailing list as well writing people are using them. But I can't find it following the link to http://www.inmethod.com/ on wicket site. Can someone tell me how can I start using it? Docs, maven repo? Regards Roman - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.423 / Virus Database: 270.14.27/2453 - Release Date: 10/23/09 06:56:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Small bug in inmethod datagrid
I've just reported a bug with the inmethod datagrid: http://wicketstuff.org/jira/browse/GRID-2 I've added a quickstart as well. When I try to resize the columns of a datagrid with both columns that are lightweight and those that are not, the position of the table borders changes, but the text doesn't move position. The text position is only refreshed if I resize the first column or if I resize the window. This bug only occurs in Firefox and not in IE or Chrome. Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to throw new PageExpiredException?
When I ran into this problem myself with 1.4-rc4, I remembered this message and upgraded to rc7. But I still get the Unexpected RuntimeException page instead of my custom SessionExpiredPage. Am I doing something wrong? Regards, Linda public class WicketApplication extends AuthenticatedWebApplication { @Override public ClassHomePage getHomePage() { return HomePage.class; } @Override protected Class? extends WebPage getSignInPageClass() { return LoginPage.class; } @Override protected Class? extends AuthenticatedWebSession getWebSessionClass() { return LunaSession.class; } @Override protected void init() { super.init(); IApplicationSettings settings = getApplicationSettings(); settings.setPageExpiredErrorPage(SessionExpiredPage.class); } public class SessionExpiredPage extends WebPage { private static final long serialVersionUID = 1L; /** * Constructor that is invoked when page is invoked without a session. * @param parameters Page parameters */ public SessionExpiredPage(final PageParameters parameters) { super(parameters); add(new StyleSheetReference(stylesheet, HomePage.class, luna.css)); add(new Image(bookshelf, new ResourceReference(HomePage.class, bookshelf.png))); } } Major Péter wrote: Which wicket version are you using? With 1.4-rc7 this behaviour should be fixed. Peter - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Column filtering on inmethod datagrid
I've tried to add column filtering to the inmethod datagrid by creating a new class ChoiceFilteredPropertyColumn which extends the new class FilteredPropertyColumn, which extends the inmethod PropertyColumn and implements the new interface IFilteredColumn. In other words, I've merged two sets of classes: the column classes of the inmethod datagrid package and the filtered columns that come with wicket extensions. For some reason however, this isn't working yet. At first I thought that the classes themselves weren't working properly. But then I saw that the filters ARE included in the HTML. They simply don't show up on the website itself. And I can't figure out why. I didn't see any style=display:none or anything obvious like that. Does anybody have any pointers that I could look for? (I'd love to include some code, but it's rather bulky and I have no idea what portion to include to be helpful.) Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
inmethod IDataSource
Hello, I have a problem with the inmethod IDataSource. I've provided my own implementation for it, including implementing the query method. But for some reason, it only seems to want to return one row, while I know there should be two. Can anybody tell me what I might be doing wrong? It must be that I've made a stupid mistake somewhere, because I did get it working for two other kinds of data. I simply don't see what I did differently. Here's the query method. It's the initializing of the QueryParam variable that fails. When I add in the line that I've commented out just below it, I do get the two rows I'm expecting. public void query(final IQuery query, final IQueryResult result) { String sortProperty = null; boolean sortAsc = true; // is there any sorting if (query.getSortState().getColumns().size() 0) { // get the most relevant column ISortStateColumn state = query.getSortState().getColumns().get(0); // get the column sort properties sortProperty = convertToFieldName(state.getPropertyName()); sortAsc = state.getDirection() == IGridSortState.Direction.ASC; } ListBook resultList; try { filter.setSort(sortProperty); filter.setSortOrder(sortAsc); // HERE'S MY PROBLEM: query.getCount() is 1 for some reason QueryParam qp = new QueryParam(query.getFrom(), query.getCount()); //QueryParam qp = new QueryParam(0, 0); ListBook books = new BookRetriever().getAllBooks(filter, qp); // determine the total count result.setTotalCount(books.size()); resultList = books; } catch (Exception e) { resultList = new ArrayListBook(); } result.setItems(resultList.iterator()); } Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: inmethod IDataSource
The trouble is that getting the books is dependent on the queryparam variable. Matej Knopp wrote: Does it also happen when you call result.setTotalCount(books.size()) before calling getCount()? From IDataSource: /** * Sets the total items count. Alternatively, if the total item count can't be determined, * either {...@link #MORE_ITEMS} or {...@link #NO_MORE_ITEMS} constant can be used to indicate * whether there are more items left or not. * * If the real items count is specified, it might affect the result of * {...@link IQuery#getCount()}, so it is preferred to call this method before calling * {...@link #setItems(Iterator)}. * * @param count *the total count of items */ public void setTotalCount(int count); -Matej On Mon, Oct 19, 2009 at 2:52 PM, Linda van der Pal lvd...@heritageagenturen.nl wrote: Hello, I have a problem with the inmethod IDataSource. I've provided my own implementation for it, including implementing the query method. But for some reason, it only seems to want to return one row, while I know there should be two. Can anybody tell me what I might be doing wrong? It must be that I've made a stupid mistake somewhere, because I did get it working for two other kinds of data. I simply don't see what I did differently. Here's the query method. It's the initializing of the QueryParam variable that fails. When I add in the line that I've commented out just below it, I do get the two rows I'm expecting. public void query(final IQuery query, final IQueryResult result) { String sortProperty = null; boolean sortAsc = true; // is there any sorting if (query.getSortState().getColumns().size() 0) { // get the most relevant column ISortStateColumn state = query.getSortState().getColumns().get(0); // get the column sort properties sortProperty = convertToFieldName(state.getPropertyName()); sortAsc = state.getDirection() == IGridSortState.Direction.ASC; } ListBook resultList; try { filter.setSort(sortProperty); filter.setSortOrder(sortAsc); // HERE'S MY PROBLEM: query.getCount() is 1 for some reason QueryParam qp = new QueryParam(query.getFrom(), query.getCount()); //QueryParam qp = new QueryParam(0, 0); ListBook books = new BookRetriever().getAllBooks(filter, qp); // determine the total count result.setTotalCount(books.size()); resultList = books; } catch (Exception e) { resultList = new ArrayListBook(); } result.setItems(resultList.iterator()); } Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.422 / Virus Database: 270.14.21/2445 - Release Date: 10/19/09 06:40:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: inmethod IDataSource
Thanks! I knew I was doing something stupid. :) It's working now. Linda Matej Knopp wrote: The total count can not depend on query parameters. It is the total count of all books that match the filter, regardless of offset and pagesize. -Matej On Mon, Oct 19, 2009 at 4:16 PM, Linda van der Pal lvd...@heritageagenturen.nl wrote: The trouble is that getting the books is dependent on the queryparam variable. Matej Knopp wrote: Does it also happen when you call result.setTotalCount(books.size()) before calling getCount()? From IDataSource: /** * Sets the total items count. Alternatively, if the total item count can't be determined, * either {...@link #MORE_ITEMS} or {...@link #NO_MORE_ITEMS} constant can be used to indicate * whether there are more items left or not. * * If the real items count is specified, it might affect the result of * {...@link IQuery#getCount()}, so it is preferred to call this method before calling * {...@link #setItems(Iterator)}. * * @param count *the total count of items */ public void setTotalCount(int count); -Matej On Mon, Oct 19, 2009 at 2:52 PM, Linda van der Pal lvd...@heritageagenturen.nl wrote: Hello, I have a problem with the inmethod IDataSource. I've provided my own implementation for it, including implementing the query method. But for some reason, it only seems to want to return one row, while I know there should be two. Can anybody tell me what I might be doing wrong? It must be that I've made a stupid mistake somewhere, because I did get it working for two other kinds of data. I simply don't see what I did differently. Here's the query method. It's the initializing of the QueryParam variable that fails. When I add in the line that I've commented out just below it, I do get the two rows I'm expecting. public void query(final IQuery query, final IQueryResult result) { String sortProperty = null; boolean sortAsc = true; // is there any sorting if (query.getSortState().getColumns().size() 0) { // get the most relevant column ISortStateColumn state = query.getSortState().getColumns().get(0); // get the column sort properties sortProperty = convertToFieldName(state.getPropertyName()); sortAsc = state.getDirection() == IGridSortState.Direction.ASC; } ListBook resultList; try { filter.setSort(sortProperty); filter.setSortOrder(sortAsc); // HERE'S MY PROBLEM: query.getCount() is 1 for some reason QueryParam qp = new QueryParam(query.getFrom(), query.getCount()); //QueryParam qp = new QueryParam(0, 0); ListBook books = new BookRetriever().getAllBooks(filter, qp); // determine the total count result.setTotalCount(books.size()); resultList = books; } catch (Exception e) { resultList = new ArrayListBook(); } result.setItems(resultList.iterator()); } Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.422 / Virus Database: 270.14.21/2445 - Release Date: 10/19/09 06:40:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.422 / Virus Database: 270.14.21/2445 - Release Date: 10/19/09 06:40:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: inmethod datagrid and wicket 1.4 and generics
I'm certain there is a 1.4 version, as I have it downloaded. Try using this URL to get it from SVN: https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/releases/wicketstuff-core-1.4-rc7/inmethod-grid-parent Regards, Linda Stefan Lindner wrote: I found inmethod datagrid at http://wicketstuff.org/maven/repository/com/inmethod/grid-examples/ but no hint or link to it on the wiki page http://wicketstuff.org/confluence/display/STUFFWIKI/Wiki. The project remained in 1.0 state since the end of last year. Is it compatible with wicket 1.4? Is it still under development? Does it support generics now? Does anybody use it togehter with wicket 1.4? Stefan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.421 / Virus Database: 270.14.11/2430 - Release Date: 10/12/09 04:01:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Highlighting selected row in AjaxFallbackDefaultDataTable
I solved this problem by switching over to the inmethod datagrid. Which has, of course, given me other problems that I still need to solve. Regards, Linda Roman Ilin wrote: Hello *, is it possible to highlight selected row without rewrithing populateItem() or something similar? If not then what is the best method to override? Regards Roman - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.421 / Virus Database: 270.14.8/2423 - Release Date: 10/08/09 18:33:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: InvalidUrlException - how to show 404 page
I haven't tried such a thing yet, but the last chapter of Wicket in Action describes how to do such things. Here's the example they give for responding with different error pages for specific errors. public class CheesrRequestCycle extends WebRequestCycle { public CheesrRequestCycle(WebApplication application, WebRequest request, Response response) { super(application, request, response); } @Override public Page onRuntimeException(Page page, RuntimeException e) { Throwable cause = e; if(cause instanceof WicketRuntimeException) cause = cause.getCause(); if(cause instanceof InvocationTargetException) cause = cause.getCause(); if (cause instanceof OutOfCheeseException) { return new CheesrErrorPage(); } return super.onRuntimeException(page, e); } } Regards, Linda Thomas Singer wrote: As I have reported a couple of weeks ago (but can't find the message any more for a follow-up), Wicket shows an ugly internal-error page if one somehow modified the stateful URLs, e.g. http://localhost:8080/?wicket:interface=:8 Following exception is logged: org.apache.wicket.protocol.http.request.InvalidUrlException: org.apache.wicket.WicketRuntimeException: Internal error parsing wicket:interface = :6 at org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.decode(WebRequestCodingStrategy.java:231) at org.apache.wicket.Request.getRequestParameters(Request.java:172) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1301) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1419) at org.apache.wicket.RequestCycle.request(RequestCycle.java:545) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:289) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) How to configure Wicket to show the configured 404-page instead? Tom - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.420 / Virus Database: 270.14.2/2408 - Release Date: 10/01/09 18:23:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How would you realize a delete-Link in a datagrid row?
I created a deteletButton as follows. I have a DeleteButton innerclass, and a method that adds this button to the panel that is shown in the table. private class DeleteButton extends Button { private static final long serialVersionUID = 1L; public DeleteButton(final String id, final IModelString model) { super(id, model); } @Override public void onSubmit() { try { deleteData((String) getModelObject()); // a method that does the actual data deletion in the database } catch (SQLException se) { error(StringResources.SQLERROR_GET + '\n' + se.getMessage()); } catch (IOException ie) { error(StringResources.IOERROR + '\n' + ie.getMessage()); } } @Override public boolean isEnabled() { return isEditingAuthorised(); } } private void addDeleteLink(final IModel? model) { String id = (String)getIdFromModel(model); // a method that extracts the id from the model (based on what kind of class is in the model) Button deleteButton = new DeleteButton(delete, new ModelString(id)); deleteButton.add(new Image(deleteIcon, new ResourceReference(EmptyIconReference.class, list-remove.png))); deleteButton.add(new SimpleAttributeModifier(onclick, return confirm('Are you sure?');)); add(deleteButton); } I hope this helps. Regards, Linda Peter Arnulf Lustig wrote: Hi, I'd like to create a delete link where you can delete a row in a datagrid. But when you click on the delete link, the delete label should change and a warning occurs: Do you really want to delete xyz. After the second click it finally deletes the content. How can I achieve that? Could you verbalize the procedure? Thanks!! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.115/2404 - Release Date: 09/30/09 05:52:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AW: How would you realize a delete-Link in a datagrid row?
I used this with a AjaxFallbackDefaultDataTable and then I didn't have to tell it that the DB had changed. Peter Arnulf Lustig wrote: Thank you! Your solution is really nice. It functions well! I have a problem which the datagrid. After removing a row in the database it throws an exception, because wicket is unable to populate an item (I assume the deleted one) How can I tell wicket to reload the datagrid because something in the DB changed. - Ursprüngliche Mail Von: Linda van der Pal lvd...@heritageagenturen.nl An: users@wicket.apache.org Gesendet: Mittwoch, den 30. September 2009, 11:43:40 Uhr Betreff: Re: How would you realize a delete-Link in a datagrid row? I created a deteletButton as follows. I have a DeleteButton innerclass, and a method that adds this button to the panel that is shown in the table. private class DeleteButton extends Button { private static final long serialVersionUID = 1L; public DeleteButton(final String id, final IModelString model) { super(id, model); } @Override public void onSubmit() { try { deleteData((String) getModelObject()); // a method that does the actual data deletion in the database } catch (SQLException se) { error(StringResources.SQLERROR_GET + '\n' + se.getMessage()); } catch (IOException ie) { error(StringResources.IOERROR + '\n' + ie.getMessage()); } } @Override public boolean isEnabled() { return isEditingAuthorised(); } } private void addDeleteLink(final IModel? model) { String id = (String)getIdFromModel(model); // a method that extracts the id from the model (based on what kind of class is in the model) Button deleteButton = new DeleteButton(delete, new ModelString(id)); deleteButton.add(new Image(deleteIcon, new ResourceReference(EmptyIconReference.class, list-remove.png))); deleteButton.add(new SimpleAttributeModifier(onclick, return confirm('Are you sure?');)); add(deleteButton); } I hope this helps. Regards, Linda Peter Arnulf Lustig wrote: Hi, I'd like to create a delete link where you can delete a row in a datagrid. But when you click on the delete link, the delete label should change and a warning occurs: Do you really want to delete xyz. After the second click it finally deletes the content. How can I achieve that? Could you verbalize the procedure? Thanks!! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.115/2404 - Release Date: 09/30/09 05:52:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.115/2404 - Release Date: 09/30/09 05:52:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AW: AW: How would you realize a delete-Link in a datagrid row?
table = new AjaxFallbackDefaultDataTable(datatable, createColumns(), contentProvider, 10); @Override protected IColumn?[] createColumns() { IColumn?[] columns = new IColumn[3]; columns[0] = createActionsColumn(); columns[1] = new PropertyColumnString(new ResourceModel(label.name), name, name); columns[2] = new PropertyColumnString(new ResourceModel(label.owners), owners, owners); return columns; } So datatable would become benutzer, contentProvider would become new AdministratorDataProvider(), and you'd have to add your own columns. (The number 10 is the number of rows you want to show on a page.) On the Wicket-examples site is an extensive example of this construct. Regards, Linda Peter Arnulf Lustig wrote: could you tell me how to use this? I have a Dataview like this: dataView = new DataViewAdministrator(benutzer, new AdministratorDataProvider()) { } thanks! - Ursprüngliche Mail Von: Linda van der Pal lvd...@heritageagenturen.nl An: users@wicket.apache.org Gesendet: Mittwoch, den 30. September 2009, 13:37:44 Uhr Betreff: Re: AW: How would you realize a delete-Link in a datagrid row? I used this with a AjaxFallbackDefaultDataTable and then I didn't have to tell it that the DB had changed. Peter Arnulf Lustig wrote: Thank you! Your solution is really nice. It functions well! I have a problem which the datagrid. After removing a row in the database it throws an exception, because wicket is unable to populate an item (I assume the deleted one) How can I tell wicket to reload the datagrid because something in the DB changed. - Ursprüngliche Mail Von: Linda van der Pal lvd...@heritageagenturen.nl An: users@wicket.apache.org Gesendet: Mittwoch, den 30. September 2009, 11:43:40 Uhr Betreff: Re: How would you realize a delete-Link in a datagrid row? I created a deteletButton as follows. I have a DeleteButton innerclass, and a method that adds this button to the panel that is shown in the table. private class DeleteButton extends Button { private static final long serialVersionUID = 1L; public DeleteButton(final String id, final IModelString model) { super(id, model); } @Override public void onSubmit() { try { deleteData((String) getModelObject()); // a method that does the actual data deletion in the database } catch (SQLException se) { error(StringResources.SQLERROR_GET + '\n' + se.getMessage()); } catch (IOException ie) { error(StringResources.IOERROR + '\n' + ie.getMessage()); } } @Override public boolean isEnabled() { return isEditingAuthorised(); } } private void addDeleteLink(final IModel? model) { String id = (String)getIdFromModel(model); // a method that extracts the id from the model (based on what kind of class is in the model) Button deleteButton = new DeleteButton(delete, new ModelString(id)); deleteButton.add(new Image(deleteIcon, new ResourceReference(EmptyIconReference.class, list-remove.png))); deleteButton.add(new SimpleAttributeModifier(onclick, return confirm('Are you sure?');)); add(deleteButton); } I hope this helps. Regards, Linda Peter Arnulf Lustig wrote: Hi, I'd like to create a delete link where you can delete a row in a datagrid. But when you click on the delete link, the delete label should change and a warning occurs: Do you really want to delete xyz. After the second click it finally deletes the content. How can I achieve that? Could you verbalize the procedure? Thanks!! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.115/2404 - Release Date: 09/30/09 05:52:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.115/2404 - Release Date: 09/30/09 05:52:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h
Difference between DropDownChoice and ListMultipleChoice from the eyes of an IVisitor
I've used the ShinyFormVisitor that Alastair Maw came up with (http://londonwicket.googlecode.com/files/LondonWicket-FormsWithFlair.pdf) to format the validation errors on my form. But now I'm running into something that I can't explain. I have two complex fields on my form, one a FormComponentPanel with a DropDownChoice on it, and one a FormComponentPanel with a ListMultipleChoice on it. Both are required fields. For the former the formatting works without a problem, but for the latter it does not. I've looked into the source code, but I don't see what is causing this difference in behavior. Can anybody tell me what I'm missing here? Because when I try submitting the form with the ListMultipleChoice as the only empty field, it does still stop short of actually saving the data, it merely doesn't show the error message I'm expecting. Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Truncating DataTable content
Just in case anybody is interested in the solution. I've extended ChoiceFilteredPropertyColumn (as that was the type of column I was using for my AjaxFallbackDefaultDataTable) and have overridden populateItem (which was originally implemented in PropertyColumn). In that method I both truncate the table data and add the PrototipBehavior that shows the tooltip. Regards, Linda Iain Reddick wrote: Like this (for a basic html tooltip): cellItem.add( new SimpleAttributeModifier(title, maximalStringModel) ); Or use one of the js-library wrappers from Wicket Stuff for something slicker? Linda van der Pal wrote: Thanks for the ideas, but the truncating itself is not the main problem. (I could easily truncate the data in the SortableDataProvider.) The main problem that requires met to dive deeply into the code is my requirement to also show the full data in a tooltip. Regards, Linda Iain Reddick wrote: Create some kind of generic StringTruncatingModel that does the ... truncation on getObject(). In DataTable.populateItem(), wrap the row model in a StringTruncatingModel, before passing to the Label being used to show the string? Linda van der Pal wrote: I thought it would be a cool idea to truncate the data in my table, so the data isn't spread over several lines in the table row. It should then be possible to read the complete content in a tooltip. After digging into the code of the AjaxFallbackDefaultDataTable I found that to do this I would have to alter/copy the entire structure, as it seemed the code I need to alter is inside AbstractDataGridView. This seems like an aweful lot of work for such a relatively small feature. So my question is, has anybody ever tried this before? And even if not, do you have a better idea how to tackle this? So I want the content of a single field to go from this: Struts: the complete reference to Struts: the... (with a tooltip listing the whole title) Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.65/2322 - Release Date: 08/23/09 18:03:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.65/2323 - Release Date: 08/24/09 06:05:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Truncating DataTable content
Thanks for the ideas, but the truncating itself is not the main problem. (I could easily truncate the data in the SortableDataProvider.) The main problem that requires met to dive deeply into the code is my requirement to also show the full data in a tooltip. Regards, Linda Iain Reddick wrote: Create some kind of generic StringTruncatingModel that does the ... truncation on getObject(). In DataTable.populateItem(), wrap the row model in a StringTruncatingModel, before passing to the Label being used to show the string? Linda van der Pal wrote: I thought it would be a cool idea to truncate the data in my table, so the data isn't spread over several lines in the table row. It should then be possible to read the complete content in a tooltip. After digging into the code of the AjaxFallbackDefaultDataTable I found that to do this I would have to alter/copy the entire structure, as it seemed the code I need to alter is inside AbstractDataGridView. This seems like an aweful lot of work for such a relatively small feature. So my question is, has anybody ever tried this before? And even if not, do you have a better idea how to tackle this? So I want the content of a single field to go from this: Struts: the complete reference to Struts: the... (with a tooltip listing the whole title) Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.65/2322 - Release Date: 08/23/09 18:03:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Blank page problem
My guess would be that the page doesn't render at all, therefore also not rendering the Wicket Ajax Debug label and link. Regards, Linda Arie Fishler wrote: Hi, I have a page rendering all sorts of stuff. I do it on development so I see the Wicket Ajax Debug label. From time to time, not on a constant basis I get a blank page instead of getting the content I expect. A side effect of this is that every time that happens the Wicket Ajax Debug label does not appear on the page as well. No errors in the logs. I am trying to understand what is going on with the page. since I don;t have a real clue I would like your help to understand what failure might be causing the Wicket Ajax Debug label (and link) not to appear on the page? I hope that this information will get me some kind of insight on the overall problem. Thanks Arie No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.65/2323 - Release Date: 08/24/09 06:05:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How do I get my DropDownChoice to refresh the list of choices with Ajax?
Doh, I should have thought of that myself. That'll teach me to send a question at the end of the day. Thanks for taking the time to answer my question, Bas and Igor. Regards, Linda Bas Gooren wrote: Linda, Without looking at your question very long I noticed that you supply your component with a static ListAuthor. This means that this list is only retrieved once (at initialization). It sounds like you want it to be refreshed when other components change their input. This would mean you need to supply a Model which returns a ListAuthor; That way when you re-render the component through AJAX, it reloads the list of authors. Regards, Bas - Original Message - From: Linda van der Pal lvd...@heritageagenturen.nl To: users@wicket.apache.org Sent: Wednesday, August 19, 2009 4:54 PM Subject: How do I get my DropDownChoice to refresh the list of choices with Ajax? I have a page with a dropdown list on it with authors. If I enter a new book I want my fields to be filled based on the ISBN. This works just fine. But now I want those fields to be filled with data I collect from the internet, meaning that it isn't always already in my database, and therefor the author might not yet be in the list. I have already decided to save the new author so I can select it in the list, but the list isn't updated, and I can't figure out how to get it to update. Here are some pieces of code I think are relevant: This is how I create the authorfield: authorField = new MultiSelectFieldSwitchPanel(authors, dataRetriever.fetchAuthors(), new PropertyModel(this, book.authors)); dataRetriever.fetchAuthors return a ListAuthor Here's the constructor of MultiSelectFieldSwitchPanel which extends FormComponentPanel: public MultiSelectFieldSwitchPanel(final String id, final List? extends DomainObject authors, final IModelListAuthor model) { super(id, model); lmc = new ListMultipleChoice(selectField, new PropertyModelListAuthor(this, selectedObjects), authors, new ChoiceRendererDomainObject(name, id)); init(lmc); } The init method adds a link to swap the lmc for a textfield where new authors can be entered, which is not really relevant in this case. I have of course already added authorField to the AjaxRequestTarget in the behavior that is triggered by updating the ISBN. Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.61/2314 - Release Date: 08/19/09 18:06:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Truncating DataTable content
I thought it would be a cool idea to truncate the data in my table, so the data isn't spread over several lines in the table row. It should then be possible to read the complete content in a tooltip. After digging into the code of the AjaxFallbackDefaultDataTable I found that to do this I would have to alter/copy the entire structure, as it seemed the code I need to alter is inside AbstractDataGridView. This seems like an aweful lot of work for such a relatively small feature. So my question is, has anybody ever tried this before? And even if not, do you have a better idea how to tackle this? So I want the content of a single field to go from this: Struts: the complete reference to Struts: the... (with a tooltip listing the whole title) Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
How do I get my DropDownChoice to refresh the list of choices with Ajax?
I have a page with a dropdown list on it with authors. If I enter a new book I want my fields to be filled based on the ISBN. This works just fine. But now I want those fields to be filled with data I collect from the internet, meaning that it isn't always already in my database, and therefor the author might not yet be in the list. I have already decided to save the new author so I can select it in the list, but the list isn't updated, and I can't figure out how to get it to update. Here are some pieces of code I think are relevant: This is how I create the authorfield: authorField = new MultiSelectFieldSwitchPanel(authors, dataRetriever.fetchAuthors(), new PropertyModel(this, book.authors)); dataRetriever.fetchAuthors return a ListAuthor Here's the constructor of MultiSelectFieldSwitchPanel which extends FormComponentPanel: public MultiSelectFieldSwitchPanel(final String id, final List? extends DomainObject authors, final IModelListAuthor model) { super(id, model); lmc = new ListMultipleChoice(selectField, new PropertyModelListAuthor(this, selectedObjects), authors, new ChoiceRendererDomainObject(name, id)); init(lmc); } The init method adds a link to swap the lmc for a textfield where new authors can be entered, which is not really relevant in this case. I have of course already added authorField to the AjaxRequestTarget in the behavior that is triggered by updating the ISBN. Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Ajax based filling of form
Well the model doesn't update. (Not that I'd expect it to.) Here's some pieces of my code I deem relevant to the problem. if (key == null || key.getIsbn() == null) { book = new Book(); } else { book = bookRetriever.getBook(key.getIsbn(), key.getCollectionId()); } setDefaultModel(new CompoundPropertyModelBook(book)); // ... isbnField.add(new AjaxFormComponentUpdatingBehavior(onchange) { private static final long serialVersionUID = 1L; @Override protected void onUpdate(final AjaxRequestTarget target) { try { book = bookRetriever.getBook(isbnField.getInput()); modelChanged(); target.addComponent(titleField); //... target.addComponent(genrefield); } catch (SQLException e) { //... } } }); John Krasnay wrote: Sounds like you're on the right track. What's the problem? jk On Wed, Aug 12, 2009 at 04:27:41PM +0200, Linda van der Pal wrote: I have a panel with a form. This form has several fields, one of which is the ISBN of a book. The fields are filled by a CompoundPropertyModel if the user is editing his previous entry, and they are empty if the user is adding a new book. Simply entering data or updating it and then submitting already works. But now I want to fetch the data for the other fields if the ISBN is already in the database. It is a multi-user system, so it is in fact possible that the ISBN is already in there. I was thinking of achieving this with AJAX, but I'm not really sure how to do it. I was thinking of adding an AjaxFormComponentUpdatingBeavior, where all the related fields are added to the target. But as the ISBN is part of the model, I don't really now how to get this working. Any hints on what direction I should be searching in? Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.392 / Virus Database: 270.13.53/2299 - Release Date: 08/12/09 18:12:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Ajax based filling of form
Awesome! Thanks for the help. Regards, Linda John Krasnay wrote: The problem is the CompoundPropertyModel continues to point to the original Book object. You would have to get rid of the CompoundPropertyModel and give each FormComponent its own model that is tolerant to changes to the book member. Something like this would work: add(new TextField(title, new PropertyModel(this, book.title))); jk On Thu, Aug 13, 2009 at 09:15:50AM +0200, Linda van der Pal wrote: Well the model doesn't update. (Not that I'd expect it to.) Here's some pieces of my code I deem relevant to the problem. if (key == null || key.getIsbn() == null) { book = new Book(); } else { book = bookRetriever.getBook(key.getIsbn(), key.getCollectionId()); } setDefaultModel(new CompoundPropertyModelBook(book)); // ... isbnField.add(new AjaxFormComponentUpdatingBehavior(onchange) { private static final long serialVersionUID = 1L; @Override protected void onUpdate(final AjaxRequestTarget target) { try { book = bookRetriever.getBook(isbnField.getInput()); modelChanged(); target.addComponent(titleField); //... target.addComponent(genrefield); } catch (SQLException e) { //... } } }); John Krasnay wrote: Sounds like you're on the right track. What's the problem? jk On Wed, Aug 12, 2009 at 04:27:41PM +0200, Linda van der Pal wrote: I have a panel with a form. This form has several fields, one of which is the ISBN of a book. The fields are filled by a CompoundPropertyModel if the user is editing his previous entry, and they are empty if the user is adding a new book. Simply entering data or updating it and then submitting already works. But now I want to fetch the data for the other fields if the ISBN is already in the database. It is a multi-user system, so it is in fact possible that the ISBN is already in there. I was thinking of achieving this with AJAX, but I'm not really sure how to do it. I was thinking of adding an AjaxFormComponentUpdatingBeavior, where all the related fields are added to the target. But as the ISBN is part of the model, I don't really now how to get this working. Any hints on what direction I should be searching in? Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.392 / Virus Database: 270.13.53/2299 - Release Date: 08/12/09 18:12:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.392 / Virus Database: 270.13.54/2300 - Release Date: 08/13/09 06:11:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Ajax based filling of form
I have a panel with a form. This form has several fields, one of which is the ISBN of a book. The fields are filled by a CompoundPropertyModel if the user is editing his previous entry, and they are empty if the user is adding a new book. Simply entering data or updating it and then submitting already works. But now I want to fetch the data for the other fields if the ISBN is already in the database. It is a multi-user system, so it is in fact possible that the ISBN is already in there. I was thinking of achieving this with AJAX, but I'm not really sure how to do it. I was thinking of adding an AjaxFormComponentUpdatingBeavior, where all the related fields are added to the target. But as the ISBN is part of the model, I don't really now how to get this working. Any hints on what direction I should be searching in? Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Beginner problems with TabbedPanel
Try adding the following line to that delteBtnClick method (as the last line): target.addComponent(tabPanel); Linda Gajo Csaba wrote: This is what the link does in Wicket's source code: new Link(linkId) { private static final long serialVersionUID = 1L; @Override public void onClick() { setSelectedTab(index); // - } }; This is my code: /** Click on the Delete button */ private void deleteBtnClick(AjaxRequestTarget target, Form? form) { TabbedPanel tabPanel = ((HomePage)getWebPage()).getTabbedPanel(); tabPanel.setSelectedTab(0); // --- } Wicket's code works, mine doesn't. I've tried with a button and an ajaxfallbacklink... Maybe I really should redirect to the same page with another parameter, like you did. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [OT] Continue to support Wicket 1.2 in WicketForge
I've only ever seen questions on this list about 1.3 and 1.4 (in the few months I've been on it, that is), so I'm guessing that if there are users of 1.2 they are either knowledgable enough not to have questions, or they're simply not on this list. Regards, Linda Maarten Bosteels wrote: We only use wicket 1.4.* Regards, Maarten On Sat, Jul 25, 2009 at 2:16 PM, Erik van Oosten e.vanoos...@grons.nlwrote: Mostly Wicket 1.4 at my company, just 1 Wicket 1.3 project left. Regards, Erik. Nick Heudecker wrote: Hi, For those of you that don't know, I maintain WicketForge, the Wicket plugin for IDEA (http://plugins.intellij.net/plugin/?id=1545 or http://code.google.com/p/wicketforge). Currently, WicketForge supports Wicket 1.2 in addition to 1.3 and 1.4, but I'd like to remove support for 1.2 to clean a few things up. First, I want to see if people are still using 1.2 with WF. My question to you is: are you still using WicketForge with Wicket 1.2? Thanks for your time and feedback. -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.392 / Virus Database: 270.13.32/2266 - Release Date: 07/27/09 05:58:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: the effective ways of wicket models to access database
Well the reason the book leaves it open is that it really is up to you how you get your DAOs. That has nothing to do with Wicket anymore and depends wholly on your own preferences. Regards, Linda David Chang wrote: Hello, I am reading Wicket in Action to learn Wicket. The example on Page 99 is about teaching detachable models. Here it goes: --- public class CheeseModel extends Model { private Long id; private transient Cheese cheese; public CheeseModel() { } public CheeseModel(Cheese cheese) { setObject(cheese); } public CheeseModel(Long id) { this.id = id; } @Override public Object getObject() { if(cheese != null) return cheese; if(id == null ) { cheese = new Cheese(); } else { CheeseDao dao = ... cheese = dao.getCheese(id); } return cheese; } @Override public void setObject(Object object) { this. cheese = (Cheese)object; id = (cheese == null) ? null : cheese.getId(); } @Override public void detach() { this. cheese = null; } } --- I would like to know how dao is obtained as indicated as follows: CheeseDao dao = ... Use a locator pattern? Or should I let CheeseModel extend a custom model in which dao is set via Spring? Does the latter way create more memory footprint? What are the effective ways of getting DAO avaiable to wicket models? Thanks for your input! Cheers! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.392 / Virus Database: 270.13.32/2266 - Release Date: 07/27/09 05:58:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Check if ajax request in HeaderContributor
So you are rendering the entire page again? Because usually you only target certain areas of the page, so the headers don't come into the picture. Linda Marieke Vandamme wrote: Hello, How do I test if the request is an ajax request in the HeaderContributor? Because I don't want to call renderJavascriptReference and renderCSSReference when processing ajax request. Many thanks in advance! Marieke. DISCLAIMER A HREF=http://www.tvh.be/newen/pages/emaildisclaimer.html; http://www.tvh.be/newen/pages/emaildisclaimer.html /A This message is delivered to all addressees subject to the conditions set forth in the attached disclaimer, which is an integral part of this message. No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.392 / Virus Database: 270.13.22/2253 - Release Date: 07/21/09 18:02:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Ajax-y interactions inside a form
Have you tried adding an AjaxFormComponentUpdatingBehavior? Something like this: dropdown.add(new AjaxFormComponentUpdatingBehavior(onchange) { private static final long serialVersionUID = 1L; @Override protected void onUpdate(final AjaxRequestTarget target) { target.addComponent(textfield); } }); Linda Andrea Aime wrote: Hi, I'm having quite a headache figuring out a clean way to make a form that behaves like a desktop app. Basically I have a dropdown that allows to choose some template, and ajax link that should populate the contents of a text area based on what you chose in the dropdown (content that can be retrieved only at the server side). Making it work when there are other components that need validation in the same form is sort of a nighmare (or more likely, lack of understanding of how things work): - if the link is a plain link, the onClick is always triggered, but the form components are not updated (so I don't get to know what's inside the drop down) - if I use a AjaxSubmitLink it does work, but only if the form as a whole is valid. Not what I want - if I disable the normal form processing in the ajax submit link the onSubmit is triggered even if the form is not valid, but then I have to validated by hand the components in order to be able and grab what the user selected (using getConvertedInput) I've attached a sample application that does what I want, but it's not exactly elegant... on the contrary, it seems quite convoluted and I got there mostly by trial and error... is there a better way? Cheers Andrea - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.392 / Virus Database: 270.13.23/2254 - Release Date: 07/22/09 05:59:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Ajax-y interactions inside a form
Well I'm not too familiar with this area of Wicket, but there's also AjaxLink which is similar to Link, but sends a request using Ajax*. Which means it doesn't submit like AjaxSubmitLink does. Linda *quote from Wicket in Action (Which I heartily recommend if you haven't read it yet.) Andrea Aime wrote: Linda van der Pal ha scritto: Have you tried adding an AjaxFormComponentUpdatingBehavior? Something like this: dropdown.add(new AjaxFormComponentUpdatingBehavior(onchange) { private static final long serialVersionUID = 1L; @Override protected void onUpdate(final AjaxRequestTarget target) { target.addComponent(textfield); } }); I did not actually, I also need to ask the user if he really wants to overwrite the contents of the textarea before going, something which I attached to the link. My problem is also more general, I have plenty of forms in which I'd like a more desktop-ish behaviour and this general problem tends to pop up in many variations depending on the form, so I'm looking either for a better understanding or for a more elegant solution (e.g. in other forms I have lists to be filled with whatever the user types in a text field, or palette components to be modified based on the contents of another component in the form, and so on). Cheers Andrea No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.392 / Virus Database: 270.13.23/2254 - Release Date: 07/22/09 05:59:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: best or common practice for application plug-ins
Seeing how it looks like you want to create your own CMS, you might want to have a look at Hippo CMS. They've built it in Wicket AFAIK. Regards, Linda Sam Stainsby wrote: On Mon, 20 Jul 2009 09:10:57 +0200, Per Lundholm wrote: Well, plug-ins, are they compile-time or run-time? Sounds like compile-time from your description. Runtime I think if I understand you correctly. Suppose a sys admin has already deployed the war file for the core application and wants to add some functions. Also, from your description, it sounds that it is more than web-tier. Remember Wicket is web-tier only. There are solutions for the server tier for plug-ins. Look att OSGi http://www.osgi.org and ESB. It could well be more than web-tier, but I thought if anyone has done this is would be a Wicket user :-) I looked at OSGi before I started my framework. I didn't see anything about deployment of add-ons/plug-ins. I already have a framework that incorporates IoC as a fundamental feature. Its the actual deployment of add-on functionality that interests me. ESB on first glance looks way too complicated, and I'm not sure it even does what I want. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.392 / Virus Database: 270.13.20/2249 - Release Date: 07/19/09 17:59:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to get context path of Application
What is it exactly you are trying to do? Linda Gerald Fernando wrote: How to get context path of Application Thanks7Regards, Gerald A No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.375 / Virus Database: 270.13.17/2242 - Release Date: 07/16/09 18:00:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to get context path of Application
Well I guess Alex already gave the answer. ((WebRequest)RequestCycle.get().getRequest()).getHttpServletRequest().getContextPath() Alex Objelean Linda Gerald Fernando wrote: Hi Linda, Actually my page need to call a XML file.I have stored that file in my web content .error shows that the system could not find the file.but i give a absolute path it is working so i need to get my tomcat path to access that file. How can i access that file?Is there any other way. am expecting your reply urgent. Thanksregards, Gerald A On Fri, Jul 17, 2009 at 1:12 PM, Linda van der Pal lvd...@heritageagenturen.nl wrote: What is it exactly you are trying to do? Linda Gerald Fernando wrote: How to get context path of Application Thanks7Regards, Gerald A No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.375 / Virus Database: 270.13.17/2242 - Release Date: 07/16/09 18:00:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.375 / Virus Database: 270.13.17/2242 - Release Date: 07/16/09 18:00:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: how to Get Context path
Per, Look at the reply he gave me to that same question. Linda Per Newgro wrote: Gerald Fernando schrieb: Hello Friends, how to get the context path of current class ThanksRegards, Gerald A Can you please explain what you mean with context path of current class? Cheers Per - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.375 / Virus Database: 270.13.18/2243 - Release Date: 07/17/09 06:08:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to throw new PageExpiredException?
A quote from Wicket in Action: = The three custom error pages can be set in the init method of your Application using the application settings. Here’s an example: @Override protected void init() { IApplicationSettings settings = getApplicationSettings(); settings.setAccessDeniedPage(CheesrAccessDeniedPage.class); settings.setPageExpiredErrorPage(CheesrPageExpiredErrorPage.class); settings.setInternalErrorPage(CheesrInternalErrorPage.class); } = Doesn't this accomplish what you want? Regards, Linda Ann Baert wrote: That's not how I want it. I have a custom PageExpiredErrorPage (and AccessDenied...), so he has to take those automaticly. getApplicationSettings().setPageExpiredErrorPage(CustomPageExpiredErrorPage.class); With your solution I have to repeat them everywhere, like I do now with setResponsePage(). Serkan Camurcuoglu-3 wrote: If all you want is to display a page expired page, maybe you could just use throw new RestartResponseException(PageExpiredErrorPage.class); in your page constructor. Ann Baert wrote: Can anyone help me with this problem please? Thanks in advance, Ann. Ann Baert wrote: I have overridden the RequestCycle.onRuntimeException method: @Override public RequestCycle newRequestCycle(final Request request, final Response response) { return new WebRequestCycle(this, (WebRequest) request, (WebResponse) response) { @Override public Page onRuntimeException(Page page, RuntimeException e) { Throwable t = e.getCause(); while(t != null) { if(t instanceof PageExpiredException) { return super.onRuntimeException(page, new PageExpiredException(test)); } t = t.getCause(); } return super.onRuntimeException(page, e); } }; } He comes in the if(t instanceof PageExpiredException)..., but in the AbstractRequestCycleProcessor.respond(RuntimeException e, RequestCycle requestCycle) method he doesn't do anything with the RuntimeException. So he has still a WicketRuntimeException instead of the PageExpiredException. Ann igor.vaynberg wrote: you can try unwrapping the exceptions in requestcycle.onruntimeexception and call super with the page exipred exception. -igor On Fri, Jul 10, 2009 at 3:00 AM, Ann Baertann.ba...@tvh.be wrote: Hello, How can I throw a PageExpiredException in the constructor of my WebPage? Because the exception is wrapped by Wicket with WicketRuntimeException it goes to the InternalErrorPage. Thanks, Ann DISCLAIMER http://www.tvh.be/newen/pages/emaildisclaimer.html http://www.tvh.be/newen/pages/emaildisclaimer.html This message is delivered to all addressees subject to the conditions set forth in the attached disclaimer, which is an integral part of this message. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.375 / Virus Database: 270.13.16/2240 - Release Date: 07/15/09 17:58:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: what is wicket
Have a look at the documentation: http://wicket.apache.org/introduction.html Linda Gerald Fernando wrote: Hello Friends, Am Gerald, new to wicket. can anyone say about wicket and advantages over other technologies it is very useful to my next step. please help me ThanksRegards, Gerald A No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.375 / Virus Database: 270.13.13/2237 - Release Date: 07/14/09 05:56:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: xml+wicket component
So is the XML replacing a database? Or is it meant more like internationalization? Regards, Linda Gerald Fernando wrote: Hi mark, i dont have sample code am very new to wicket. my requirement is that i think like option A i have a xml file which has first name,last name and middle name supose my wicket page is Data.java which should get first and last name from xml file now my Data.html markup file to show the first name and last name in grid view. the grid might be inside panel or form component. this is my requirement please give me urgent reply if possible give me some model code ThanksRegards, Gerald A On Wed, Jul 8, 2009 at 12:40 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Hi! Please explain in more detail if this is your situation: A) 1. You have xml file. 2. You load the xml file into Java using JAXB or similar. 3. You want to display only some details from the xml-Java object using Wicket (if so, please give sample code html what you need). B) 1. You have an xml file. 2. You want to display the whole xml as HTML. 3. You use XSLT to transform the XML into HTML. 4. You do not need Wicket. ** Martin 2009/7/8 Gerald Fernando gerald.anto.ferna...@gmail.com: Hello Friends, i am Gerald Anto Fernando,since past 7 days i have started to learn Wicket. As I am debut to wicket,please forgive me if i ask any small questions. shall we bind the data from xml file into wicket component. If it possible please give me some models. Thanking You, Gerald Anto Fernando, Chennai - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.375 / Virus Database: 270.13.8/2223 - Release Date: 07/07/09 17:54:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: xml+wicket component
First of all create a parser for the XML, I'm not very experienced in Wicket, but I haven't heard of any Wicket object that does this for you. Then create a repeater backed by a model that contains the data you just got from the parser. If you haven't done so yet, I can advise you to read Wicket in Action, it will explain most about repeaters and models and showing data on a page. Regards, Linda Gerald Fernando wrote: our database data comes as xml file. How do i display it in client side using wicket On Wed, Jul 8, 2009 at 3:18 PM, Linda van der Pal lvd...@heritageagenturen.nl wrote: So is the XML replacing a database? Or is it meant more like internationalization? Regards, Linda Gerald Fernando wrote: Hi mark, i dont have sample code am very new to wicket. my requirement is that i think like option A i have a xml file which has first name,last name and middle name supose my wicket page is Data.java which should get first and last name from xml file now my Data.html markup file to show the first name and last name in grid view. the grid might be inside panel or form component. this is my requirement please give me urgent reply if possible give me some model code ThanksRegards, Gerald A On Wed, Jul 8, 2009 at 12:40 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Hi! Please explain in more detail if this is your situation: A) 1. You have xml file. 2. You load the xml file into Java using JAXB or similar. 3. You want to display only some details from the xml-Java object using Wicket (if so, please give sample code html what you need). B) 1. You have an xml file. 2. You want to display the whole xml as HTML. 3. You use XSLT to transform the XML into HTML. 4. You do not need Wicket. ** Martin 2009/7/8 Gerald Fernando gerald.anto.ferna...@gmail.com: Hello Friends, i am Gerald Anto Fernando,since past 7 days i have started to learn Wicket. As I am debut to wicket,please forgive me if i ask any small questions. shall we bind the data from xml file into wicket component. If it possible please give me some models. Thanking You, Gerald Anto Fernando, Chennai - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.375 / Virus Database: 270.13.8/2223 - Release Date: 07/07/09 17:54:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.375 / Virus Database: 270.13.8/2224 - Release Date: 07/08/09 05:53:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Model Question
Is there a Calendar object under the covers somewhere? Cause it looks like a conversion error, seeing how the months start counting from zero in the Calendar object. Regards, Linda jpalmer1...@mchsi.com wrote: I have the following code to allow the user to select the date that a report is to be generated for. For some reason, though, whatever date is selected from the textfield, the previous date is being used. For example, if the user inputs 07/06/2009 into the dateTextField, 07/05/2009 is being used. I'm assuming this is because I'm using the wrong model, so any assistance would be greatly appreciated. public class AccountingDashboardPage extends EzdecBaseWebPage { private Date date; public AccountingDashboardPage(Date date) { if (date == null) { this.date = new Date(); } Form form = new Form(accountingDashboardForm, new PropertyModel(this, date)) { @Override protected void onSubmit() { Date d = (Date)getModelObject(); setResponsePage(new AccountingDashboardPage(d)); } }; add(form); EzdecDateTextField reportDate = new EzdecDateTextField(stampDate, form.getModel()); reportDate.setModelValue(new String[]{new SimpleDateFormat(MM/dd/).format(date).toString()}); form.add(reportDate); } } No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.375 / Virus Database: 270.13.5/2220 - Release Date: 07/05/09 17:54:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [OFF TOPIC] Java desktop applications
Try reading Filthy Rich Clients by Chet Haase and Romain Guy. That will at least help with the nice-looking part. Regards, Linda Jeremy Thomerson wrote: I would like to build a nice-looking java desktop application. I hope that isn't an oxymoron :). I have built some desktop apps before - a lot of command line utilities in various languages, and some GUI apps (perl, java, python, php, even vb (yikes!), c# etc...). The question is - what framework do you use for your UI components and layout on a desktop app? I would like to use Java because I'll be most efficient with it and it will work for me on linux machines and others on Windoze, etc.. But when I've built Swing apps in the past, I have hated having to layout everything in the code and I can never make anything aesthetically pleasing. So 1 - do you have any recommendations on a good framework for nice looking desktop apps? 2 - any other recommendations for desktop apps in general? 3 - It should be a lightweight, easy install - and I would prefer to stay away from using the Eclipse framework for building the app (I use the IDE but it doesn't need to be something that heavy for the GUI) 4 - I have even thought about building an app that opens a swing window that contains an embedded browser and jetty servlet running the app so that I can use Wicket. Has anyone thought of or done this before? Basically, it's a CRUD application, but containing personal data that the user should not store on someone else's server. I would use an embedded database that stores the data with encryption. Ideas? -- Jeremy Thomerson http://www.wickettraining.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.339 / Virus Database: 270.12.64/2170 - Release Date: 06/11/09 17:59:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ListMultipleChoice and HashSet
Thanks for the help Igor! I was sure I had already tried to add the friends = new HashSetUser(); line to my constructor and that it didn't work. Apparently I screwed up somehow, because it is working after all. Regards, Linda Linda van der Pal wrote: I've created a quickstart and attached it to a jira: https://issues.apache.org/jira/browse/WICKET-2318 I hope I did everything right. Feel free to educate me if I didn't. And as ever, thank you so very much for all the help! Regards, Linda Igor Vaynberg wrote: generate an archetype with maven, cmd line is here wicket.apache.org/quickstart after you are done mvn clean zip the dir attach to a jira -igor On Tue, Jun 9, 2009 at 1:40 AM, Linda van der Pallvd...@heritageagenturen.nl wrote: I've found where the problem is residing, but I'm still not quite sure what the problem is. So I've used the quickstart to make a small project that reproduces the bug. Can anyone tell me what the procedure is to make this into an actual quickstart that I can pass around? I can make some guesses, but I'd rather do it right the first time. Regards, Linda Linda van der Pal wrote: Well it's unlikely to be a bug in Wicket (not that I was expecting one). When I tried to make a quickstart, the quickstart didn't show the error. It worked as I expected in the first place. So now I'm off to hunt for the bug in my original code. Thanks for all the help! Linda. Igor Vaynberg wrote: you can create a quickstart and attach it to a jira issue. its hard to tell without having all the code. -igor On Thu, Jun 4, 2009 at 11:49 PM, Linda van der Pallvd...@heritageagenturen.nl wrote: That is very strange, as this is the code in the domain model: public SetUser getFriends() { return friends; } public void setFriends(final SetUser friends) { this.friends = friends; } So I don't see why it would recognize the getter, but not the setter. Linda Igor Vaynberg wrote: so looks like you are using a set as the model object but dont have a setter that takes a set as an argument in your domain model. -igor On Wed, Jun 3, 2009 at 11:57 PM, Linda van der Pal lvd...@heritageagenturen.nl wrote: Igor Vaynberg wrote: need to see more of the stacktrace -igor This is the entire stacktrace that is shown: WicketMessage: Error calling method: public void nl.lunaris.bookdb.model.database.User.setFriends(java.util.Set) on object: User: Test Root cause: java.lang.IllegalArgumentException: argument type mismatch at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.wicket.util.lang.PropertyResolver$MethodGetAndSet.setValue(PropertyResolver.java:1100) at org.apache.wicket.util.lang.PropertyResolver$ObjectAndGetSetter.setValue(PropertyResolver.java:582) at org.apache.wicket.util.lang.PropertyResolver.setValue(PropertyResolver.java:136) at org.apache.wicket.model.AbstractPropertyModel.setObject(AbstractPropertyModel.java:169) at org.apache.wicket.Component.setDefaultModelObject(Component.java:3021) at org.apache.wicket.markup.html.form.ListMultipleChoice.updateModel(ListMultipleChoice.java:344) at org.apache.wicket.markup.html.form.Form$FormModelUpdateVisitor.component(Form.java:223) at org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:488) at org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:467) at org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrder(FormComponent.java:439) at org.apache.wicket.markup.html.form.Form.internalUpdateFormComponentModels(Form.java:1970) at org.apache.wicket.markup.html.form.Form.updateFormComponentModels(Form.java:1938) at org.apache.wicket.markup.html.form.Form.process(Form.java:960) at org.apache.wicket.markup.html.form.Form.process(Form.java:908) at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:876) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:182) at org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1192) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1271) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1370) at org.apache.wicket.RequestCycle.request(RequestCycle.java:501) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:455
Re: ListMultipleChoice and HashSet
I've found where the problem is residing, but I'm still not quite sure what the problem is. So I've used the quickstart to make a small project that reproduces the bug. Can anyone tell me what the procedure is to make this into an actual quickstart that I can pass around? I can make some guesses, but I'd rather do it right the first time. Regards, Linda Linda van der Pal wrote: Well it's unlikely to be a bug in Wicket (not that I was expecting one). When I tried to make a quickstart, the quickstart didn't show the error. It worked as I expected in the first place. So now I'm off to hunt for the bug in my original code. Thanks for all the help! Linda. Igor Vaynberg wrote: you can create a quickstart and attach it to a jira issue. its hard to tell without having all the code. -igor On Thu, Jun 4, 2009 at 11:49 PM, Linda van der Pallvd...@heritageagenturen.nl wrote: That is very strange, as this is the code in the domain model: public SetUser getFriends() { return friends; } public void setFriends(final SetUser friends) { this.friends = friends; } So I don't see why it would recognize the getter, but not the setter. Linda Igor Vaynberg wrote: so looks like you are using a set as the model object but dont have a setter that takes a set as an argument in your domain model. -igor On Wed, Jun 3, 2009 at 11:57 PM, Linda van der Pal lvd...@heritageagenturen.nl wrote: Igor Vaynberg wrote: need to see more of the stacktrace -igor This is the entire stacktrace that is shown: WicketMessage: Error calling method: public void nl.lunaris.bookdb.model.database.User.setFriends(java.util.Set) on object: User: Test Root cause: java.lang.IllegalArgumentException: argument type mismatch at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.wicket.util.lang.PropertyResolver$MethodGetAndSet.setValue(PropertyResolver.java:1100) at org.apache.wicket.util.lang.PropertyResolver$ObjectAndGetSetter.setValue(PropertyResolver.java:582) at org.apache.wicket.util.lang.PropertyResolver.setValue(PropertyResolver.java:136) at org.apache.wicket.model.AbstractPropertyModel.setObject(AbstractPropertyModel.java:169) at org.apache.wicket.Component.setDefaultModelObject(Component.java:3021) at org.apache.wicket.markup.html.form.ListMultipleChoice.updateModel(ListMultipleChoice.java:344) at org.apache.wicket.markup.html.form.Form$FormModelUpdateVisitor.component(Form.java:223) at org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:488) at org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:467) at org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrder(FormComponent.java:439) at org.apache.wicket.markup.html.form.Form.internalUpdateFormComponentModels(Form.java:1970) at org.apache.wicket.markup.html.form.Form.updateFormComponentModels(Form.java:1938) at org.apache.wicket.markup.html.form.Form.process(Form.java:960) at org.apache.wicket.markup.html.form.Form.process(Form.java:908) at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:876) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:182) at org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1192) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1271) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1370) at org.apache.wicket.RequestCycle.request(RequestCycle.java:501) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:455) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:288) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.apache.geronimo.jetty6.handler.TwistyWebAppContext.access$101(TwistyWebAppContext.java:40) at org.apache.geronimo.jetty6.handler.TwistyWebAppContext$TwistyHandler.handle(TwistyWebAppContext.java:65) at org.apache.geronimo.jetty6.handler.ThreadClassloaderHandler.handle
Re: Ajax and LoadableDetachableModel
Did you explicitly detach the model? Regards, Linda Luther Baker wrote: Quick question regarding a blog engine I'm working on: my user is editing a blog Post and gets to the Category section. Category is implemented with a DropDownChoice and LoadableDetachableModel. For convenience - I also have a simple TextField that, when filled out, implicitly creates a new Category and attaches it to the current Post. For now, I only allow 1 Category per Post. The Category TextField takes precedence over the DropDown. IE: if the user types anything in the Category TextField, that (String) will be looked up, inserted if missing and attached to the Post as a Category. Question: after submitting this entire form (ala AjaxFallbackButton) - I intentionally stay on this page. The Category is added and the Post has been saved ... but I need the Category DropDown to refresh. Since all of this happens ala AjaxFallbackButtons - the process works except, the LoadableDetachableModel attached to the DropDownChoice (obviously) doesn't fire the load method when I add the DropDown to the target (in the submit handler). To clarify, in my submission, I just added a Category and saved the Post and ostensibly, redrawn the DropDownChoice (ie: I've set the OutputMarkupID on the DropDownChoice and attached it to the target in the ajax submit handler) ... but the underlying model isn't actually reloading. Is there something like a 'refresh' method on the LoadableDetachableModel ... or, should I attach it to the target as well? Thanks in advance for any suggestions, -Luther No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.339 / Virus Database: 270.12.59/2165 - Release Date: 06/09/09 05:53:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ListMultipleChoice and HashSet
Well it's unlikely to be a bug in Wicket (not that I was expecting one). When I tried to make a quickstart, the quickstart didn't show the error. It worked as I expected in the first place. So now I'm off to hunt for the bug in my original code. Thanks for all the help! Linda. Igor Vaynberg wrote: you can create a quickstart and attach it to a jira issue. its hard to tell without having all the code. -igor On Thu, Jun 4, 2009 at 11:49 PM, Linda van der Pallvd...@heritageagenturen.nl wrote: That is very strange, as this is the code in the domain model: public SetUser getFriends() { return friends; } public void setFriends(final SetUser friends) { this.friends = friends; } So I don't see why it would recognize the getter, but not the setter. Linda Igor Vaynberg wrote: so looks like you are using a set as the model object but dont have a setter that takes a set as an argument in your domain model. -igor On Wed, Jun 3, 2009 at 11:57 PM, Linda van der Pal lvd...@heritageagenturen.nl wrote: Igor Vaynberg wrote: need to see more of the stacktrace -igor This is the entire stacktrace that is shown: WicketMessage: Error calling method: public void nl.lunaris.bookdb.model.database.User.setFriends(java.util.Set) on object: User: Test Root cause: java.lang.IllegalArgumentException: argument type mismatch at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.wicket.util.lang.PropertyResolver$MethodGetAndSet.setValue(PropertyResolver.java:1100) at org.apache.wicket.util.lang.PropertyResolver$ObjectAndGetSetter.setValue(PropertyResolver.java:582) at org.apache.wicket.util.lang.PropertyResolver.setValue(PropertyResolver.java:136) at org.apache.wicket.model.AbstractPropertyModel.setObject(AbstractPropertyModel.java:169) at org.apache.wicket.Component.setDefaultModelObject(Component.java:3021) at org.apache.wicket.markup.html.form.ListMultipleChoice.updateModel(ListMultipleChoice.java:344) at org.apache.wicket.markup.html.form.Form$FormModelUpdateVisitor.component(Form.java:223) at org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:488) at org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:467) at org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrder(FormComponent.java:439) at org.apache.wicket.markup.html.form.Form.internalUpdateFormComponentModels(Form.java:1970) at org.apache.wicket.markup.html.form.Form.updateFormComponentModels(Form.java:1938) at org.apache.wicket.markup.html.form.Form.process(Form.java:960) at org.apache.wicket.markup.html.form.Form.process(Form.java:908) at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:876) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:182) at org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1192) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1271) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1370) at org.apache.wicket.RequestCycle.request(RequestCycle.java:501) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:455) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:288) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.apache.geronimo.jetty6.handler.TwistyWebAppContext.access$101(TwistyWebAppContext.java:40) at org.apache.geronimo.jetty6.handler.TwistyWebAppContext$TwistyHandler.handle(TwistyWebAppContext.java:65) at org.apache.geronimo.jetty6.handler.ThreadClassloaderHandler.handle(ThreadClassloaderHandler.java:46) at org.apache.geronimo.jetty6.handler.InstanceContextHandler.handle(InstanceContextHandler.java:58) at org.apache.geronimo.jetty6.handler.UserTransactionHandler.handle(UserTransactionHandler.java:48) at org.apache.geronimo.jetty6.handler.ComponentContextHandler.handle(ComponentContextHandler.java:47) at org.apache.geronimo.jetty6.handler.TwistyWebAppContext.handle(TwistyWebAppContext.java:59
Re: ListMultipleChoice and HashSet
That is very strange, as this is the code in the domain model: public SetUser getFriends() { return friends; } public void setFriends(final SetUser friends) { this.friends = friends; } So I don't see why it would recognize the getter, but not the setter. Linda Igor Vaynberg wrote: so looks like you are using a set as the model object but dont have a setter that takes a set as an argument in your domain model. -igor On Wed, Jun 3, 2009 at 11:57 PM, Linda van der Pal lvd...@heritageagenturen.nl wrote: Igor Vaynberg wrote: need to see more of the stacktrace -igor This is the entire stacktrace that is shown: WicketMessage: Error calling method: public void nl.lunaris.bookdb.model.database.User.setFriends(java.util.Set) on object: User: Test Root cause: java.lang.IllegalArgumentException: argument type mismatch at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.wicket.util.lang.PropertyResolver$MethodGetAndSet.setValue(PropertyResolver.java:1100) at org.apache.wicket.util.lang.PropertyResolver$ObjectAndGetSetter.setValue(PropertyResolver.java:582) at org.apache.wicket.util.lang.PropertyResolver.setValue(PropertyResolver.java:136) at org.apache.wicket.model.AbstractPropertyModel.setObject(AbstractPropertyModel.java:169) at org.apache.wicket.Component.setDefaultModelObject(Component.java:3021) at org.apache.wicket.markup.html.form.ListMultipleChoice.updateModel(ListMultipleChoice.java:344) at org.apache.wicket.markup.html.form.Form$FormModelUpdateVisitor.component(Form.java:223) at org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:488) at org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:467) at org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrder(FormComponent.java:439) at org.apache.wicket.markup.html.form.Form.internalUpdateFormComponentModels(Form.java:1970) at org.apache.wicket.markup.html.form.Form.updateFormComponentModels(Form.java:1938) at org.apache.wicket.markup.html.form.Form.process(Form.java:960) at org.apache.wicket.markup.html.form.Form.process(Form.java:908) at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:876) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:182) at org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1192) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1271) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1370) at org.apache.wicket.RequestCycle.request(RequestCycle.java:501) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:455) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:288) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.apache.geronimo.jetty6.handler.TwistyWebAppContext.access$101(TwistyWebAppContext.java:40) at org.apache.geronimo.jetty6.handler.TwistyWebAppContext$TwistyHandler.handle(TwistyWebAppContext.java:65) at org.apache.geronimo.jetty6.handler.ThreadClassloaderHandler.handle(ThreadClassloaderHandler.java:46) at org.apache.geronimo.jetty6.handler.InstanceContextHandler.handle(InstanceContextHandler.java:58) at org.apache.geronimo.jetty6.handler.UserTransactionHandler.handle(UserTransactionHandler.java:48) at org.apache.geronimo.jetty6.handler.ComponentContextHandler.handle(ComponentContextHandler.java:47) at org.apache.geronimo.jetty6.handler.TwistyWebAppContext.handle(TwistyWebAppContext.java:59) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648) at org.mortbay.jetty.HttpParser.parseAvailable
Re: ListMultipleChoice and HashSet
Igor Vaynberg wrote: need to see more of the stacktrace -igor This is the entire stacktrace that is shown: WicketMessage: Error calling method: public void nl.lunaris.bookdb.model.database.User.setFriends(java.util.Set) on object: User: Test Root cause: java.lang.IllegalArgumentException: argument type mismatch at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.wicket.util.lang.PropertyResolver$MethodGetAndSet.setValue(PropertyResolver.java:1100) at org.apache.wicket.util.lang.PropertyResolver$ObjectAndGetSetter.setValue(PropertyResolver.java:582) at org.apache.wicket.util.lang.PropertyResolver.setValue(PropertyResolver.java:136) at org.apache.wicket.model.AbstractPropertyModel.setObject(AbstractPropertyModel.java:169) at org.apache.wicket.Component.setDefaultModelObject(Component.java:3021) at org.apache.wicket.markup.html.form.ListMultipleChoice.updateModel(ListMultipleChoice.java:344) at org.apache.wicket.markup.html.form.Form$FormModelUpdateVisitor.component(Form.java:223) at org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:488) at org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:467) at org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrder(FormComponent.java:439) at org.apache.wicket.markup.html.form.Form.internalUpdateFormComponentModels(Form.java:1970) at org.apache.wicket.markup.html.form.Form.updateFormComponentModels(Form.java:1938) at org.apache.wicket.markup.html.form.Form.process(Form.java:960) at org.apache.wicket.markup.html.form.Form.process(Form.java:908) at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:876) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:182) at org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1192) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1271) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1370) at org.apache.wicket.RequestCycle.request(RequestCycle.java:501) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:455) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:288) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.apache.geronimo.jetty6.handler.TwistyWebAppContext.access$101(TwistyWebAppContext.java:40) at org.apache.geronimo.jetty6.handler.TwistyWebAppContext$TwistyHandler.handle(TwistyWebAppContext.java:65) at org.apache.geronimo.jetty6.handler.ThreadClassloaderHandler.handle(ThreadClassloaderHandler.java:46) at org.apache.geronimo.jetty6.handler.InstanceContextHandler.handle(InstanceContextHandler.java:58) at org.apache.geronimo.jetty6.handler.UserTransactionHandler.handle(UserTransactionHandler.java:48) at org.apache.geronimo.jetty6.handler.ComponentContextHandler.handle(ComponentContextHandler.java:47) at org.apache.geronimo.jetty6.handler.TwistyWebAppContext.handle(TwistyWebAppContext.java:59) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395) at org.apache.geronimo.pool.ThreadPool$1.run(ThreadPool.java:214) at org.apache.geronimo.pool.ThreadPool$ContextClassLoaderRunnable.run(ThreadPool.java:344) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at
ListMultipleChoice and HashSet
I tried setting the model of a ListMultipleChoice to a HashSet (by using a CompoundPropertyModel and the id of the HashSet). The list of possible choices was an ArrayList. It shows my selected choices nicely. But I'm getting an error when I want to save the data. So I'm guessing the LMC doens't like cooperating with a HashSet, but then why does it allow the HashSet to determine which values in the list to select? Or am I doing something else wrong? Here's the top of the stacktrace: WicketMessage: Error calling method: public void nl.lunaris.bookdb.model.database.User.setFriends(java.util.Set) on object: User: Test Root cause: java.lang.IllegalArgumentException: argument type mismatch Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Data getting lost upon form submission
I just thought of something, might this be a serialization problem? And if so, any clue on how I can solve it? Linda. Linda van der Pal wrote: Forgot to copy this line (which came just before the start of the form): setDefaultModel(new CompoundPropertyModelUser(user)); Linda van der Pal wrote: I am once again making some error in my thinking. I'm trying to edit a user in a form, but for some reason not all the values are passed on upon submitting. Can anybody have a look and point me in the right direction? When I save the data I can see the name and the password, but not the roles. I have debugged it and I see that it actually puts the roles in an instance of User, but when I get to the code that actually saves it all, the roles are empty again. (So they have been put in a different instance, but why and how?) Here's the form: // The form FormUser form = new FormUser(userdetailform); add(form); // The name-field form.add(new TextFieldString(name).setRequired(true)); // The roles-field CheckGroup rolesGroup = new CheckGroup(roles); CheckBox ownerRole = new CheckBox(owner); rolesGroup.add(ownerRole); form.add(rolesGroup); And here's the User class (name is a variable in DomainObject): public class User extends DomainObject { private String password; private ListRole roles; public User(final Integer id) { super(id); roles = new ArrayListRole(); } public void setPassword(final String password) { this.password = password; } public String getPassword() { return password; } public void setRoles(final ListRole roles) { this.roles = roles; } public ListRole getRoles() { return roles; } public void addRole(final Role role) { this.roles.add(role); } private boolean hasRole(final RoleName roleName) { for (Role role: roles) { if (role.getName().equals(roleName)) { return true; } } return false; } public boolean isOwner() { return hasRole(RoleName.OWNER); } private void setRole(final RoleName roleName, final Integer friendId, final boolean addRole) { Role role = new Role(roleName, friendId); if (addRole) { addRole(role); } else { this.roles.remove(role); } } public void setOwner(final boolean addRole) { setRole(RoleName.OWNER, null, addRole); } } Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.339 / Virus Database: 270.12.44/2140 - Release Date: 05/28/09 18:09:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.339 / Virus Database: 270.12.44/2140 - Release Date: 05/28/09 18:09:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Data getting lost upon form submission
No error messages that I can find. It's just that when I fill in the form, the value gets entered (the role is added to the list). And when I try to save those values, the values in question (the roles) are gone. (i.e. the list is empty) Linda James Carman wrote: Do you see any error messages in the output? On Tue, Jun 2, 2009 at 6:13 AM, Linda van der Pal lvd...@heritageagenturen.nl wrote: I just thought of something, might this be a serialization problem? And if so, any clue on how I can solve it? Linda. Linda van der Pal wrote: Forgot to copy this line (which came just before the start of the form): setDefaultModel(new CompoundPropertyModelUser(user)); Linda van der Pal wrote: I am once again making some error in my thinking. I'm trying to edit a user in a form, but for some reason not all the values are passed on upon submitting. Can anybody have a look and point me in the right direction? When I save the data I can see the name and the password, but not the roles. I have debugged it and I see that it actually puts the roles in an instance of User, but when I get to the code that actually saves it all, the roles are empty again. (So they have been put in a different instance, but why and how?) Here's the form: // The form FormUser form = new FormUser(userdetailform); add(form); // The name-field form.add(new TextFieldString(name).setRequired(true)); // The roles-field CheckGroup rolesGroup = new CheckGroup(roles); CheckBox ownerRole = new CheckBox(owner); rolesGroup.add(ownerRole); form.add(rolesGroup); And here's the User class (name is a variable in DomainObject): public class User extends DomainObject { private String password; private ListRole roles; public User(final Integer id) { super(id); roles = new ArrayListRole(); } public void setPassword(final String password) { this.password = password; } public String getPassword() { return password; } public void setRoles(final ListRole roles) { this.roles = roles; } public ListRole getRoles() { return roles; } public void addRole(final Role role) { this.roles.add(role); } private boolean hasRole(final RoleName roleName) { for (Role role: roles) { if (role.getName().equals(roleName)) { return true; } } return false; } public boolean isOwner() { return hasRole(RoleName.OWNER); } private void setRole(final RoleName roleName, final Integer friendId, final boolean addRole) { Role role = new Role(roleName, friendId); if (addRole) { addRole(role); } else { this.roles.remove(role); } } public void setOwner(final boolean addRole) { setRole(RoleName.OWNER, null, addRole); } } Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.339 / Virus Database: 270.12.44/2140 - Release Date: 05/28/09 18:09:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.339 / Virus Database: 270.12.44/2140 - Release Date: 05/28/09 18:09:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.339 / Virus Database: 270.12.49/2149 - Release Date: 06/01/09 17:55:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Data getting lost upon form submission
That seems to be even worse than CheckBox, as now it doesn't even show the roles that are saved in the database anymore. (Which it did do before with the CheckBox.) Linda James Carman wrote: Have you tried using a Check, rather than a CheckBox? Take a look at the form input example here (view the source code): http://www.wicketstuff.org/wicket13/forminput/ On Fri, May 29, 2009 at 5:39 AM, Linda van der Pal lvd...@heritageagenturen.nl wrote: I am once again making some error in my thinking. I'm trying to edit a user in a form, but for some reason not all the values are passed on upon submitting. Can anybody have a look and point me in the right direction? When I save the data I can see the name and the password, but not the roles. I have debugged it and I see that it actually puts the roles in an instance of User, but when I get to the code that actually saves it all, the roles are empty again. (So they have been put in a different instance, but why and how?) Here's the form: // The form FormUser form = new FormUser(userdetailform); add(form); // The name-field form.add(new TextFieldString(name).setRequired(true)); // The roles-field CheckGroup rolesGroup = new CheckGroup(roles); CheckBox ownerRole = new CheckBox(owner); rolesGroup.add(ownerRole); form.add(rolesGroup); And here's the User class (name is a variable in DomainObject): public class User extends DomainObject { private String password; private ListRole roles; public User(final Integer id) { super(id); roles = new ArrayListRole(); } public void setPassword(final String password) { this.password = password; } public String getPassword() { return password; } public void setRoles(final ListRole roles) { this.roles = roles; } public ListRole getRoles() { return roles; } public void addRole(final Role role) { this.roles.add(role); } private boolean hasRole(final RoleName roleName) { for (Role role: roles) { if (role.getName().equals(roleName)) { return true; } } return false; } public boolean isOwner() { return hasRole(RoleName.OWNER); } private void setRole(final RoleName roleName, final Integer friendId, final boolean addRole) { Role role = new Role(roleName, friendId); if (addRole) { addRole(role); } else { this.roles.remove(role); } } public void setOwner(final boolean addRole) { setRole(RoleName.OWNER, null, addRole); } } Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.339 / Virus Database: 270.12.50/2150 - Release Date: 06/02/09 06:47:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Data getting lost upon form submission
Thanks for pointing me in that direction. I haven't quite got it working yet, but at least it is now showing me the role the user has. Linda James Carman wrote: Well, that seems to be the way you're supposed to do this stuff. I'd tinker with it, starting with the example code, to see if you can get it working. On Tue, Jun 2, 2009 at 7:14 AM, Linda van der Pal lvd...@heritageagenturen.nl wrote: That seems to be even worse than CheckBox, as now it doesn't even show the roles that are saved in the database anymore. (Which it did do before with the CheckBox.) Linda James Carman wrote: Have you tried using a Check, rather than a CheckBox? Take a look at the form input example here (view the source code): http://www.wicketstuff.org/wicket13/forminput/ On Fri, May 29, 2009 at 5:39 AM, Linda van der Pal lvd...@heritageagenturen.nl wrote: I am once again making some error in my thinking. I'm trying to edit a user in a form, but for some reason not all the values are passed on upon submitting. Can anybody have a look and point me in the right direction? When I save the data I can see the name and the password, but not the roles. I have debugged it and I see that it actually puts the roles in an instance of User, but when I get to the code that actually saves it all, the roles are empty again. (So they have been put in a different instance, but why and how?) Here's the form: // The form FormUser form = new FormUser(userdetailform); add(form); // The name-field form.add(new TextFieldString(name).setRequired(true)); // The roles-field CheckGroup rolesGroup = new CheckGroup(roles); CheckBox ownerRole = new CheckBox(owner); rolesGroup.add(ownerRole); form.add(rolesGroup); And here's the User class (name is a variable in DomainObject): public class User extends DomainObject { private String password; private ListRole roles; public User(final Integer id) { super(id); roles = new ArrayListRole(); } public void setPassword(final String password) { this.password = password; } public String getPassword() { return password; } public void setRoles(final ListRole roles) { this.roles = roles; } public ListRole getRoles() { return roles; } public void addRole(final Role role) { this.roles.add(role); } private boolean hasRole(final RoleName roleName) { for (Role role: roles) { if (role.getName().equals(roleName)) { return true; } } return false; } public boolean isOwner() { return hasRole(RoleName.OWNER); } private void setRole(final RoleName roleName, final Integer friendId, final boolean addRole) { Role role = new Role(roleName, friendId); if (addRole) { addRole(role); } else { this.roles.remove(role); } } public void setOwner(final boolean addRole) { setRole(RoleName.OWNER, null, addRole); } } Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.339 / Virus Database: 270.12.50/2150 - Release Date: 06/02/09 06:47:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.339 / Virus Database: 270.12.50/2150 - Release Date: 06/02/09 06:47:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Data getting lost upon form submission
I am once again making some error in my thinking. I'm trying to edit a user in a form, but for some reason not all the values are passed on upon submitting. Can anybody have a look and point me in the right direction? When I save the data I can see the name and the password, but not the roles. I have debugged it and I see that it actually puts the roles in an instance of User, but when I get to the code that actually saves it all, the roles are empty again. (So they have been put in a different instance, but why and how?) Here's the form: // The form FormUser form = new FormUser(userdetailform); add(form); // The name-field form.add(new TextFieldString(name).setRequired(true)); // The roles-field CheckGroup rolesGroup = new CheckGroup(roles); CheckBox ownerRole = new CheckBox(owner); rolesGroup.add(ownerRole); form.add(rolesGroup); And here's the User class (name is a variable in DomainObject): public class User extends DomainObject { private String password; private ListRole roles; public User(final Integer id) { super(id); roles = new ArrayListRole(); } public void setPassword(final String password) { this.password = password; } public String getPassword() { return password; } public void setRoles(final ListRole roles) { this.roles = roles; } public ListRole getRoles() { return roles; } public void addRole(final Role role) { this.roles.add(role); } private boolean hasRole(final RoleName roleName) { for (Role role: roles) { if (role.getName().equals(roleName)) { return true; } } return false; } public boolean isOwner() { return hasRole(RoleName.OWNER); } private void setRole(final RoleName roleName, final Integer friendId, final boolean addRole) { Role role = new Role(roleName, friendId); if (addRole) { addRole(role); } else { this.roles.remove(role); } } public void setOwner(final boolean addRole) { setRole(RoleName.OWNER, null, addRole); } } Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Data getting lost upon form submission
Forgot to copy this line (which came just before the start of the form): setDefaultModel(new CompoundPropertyModelUser(user)); Linda van der Pal wrote: I am once again making some error in my thinking. I'm trying to edit a user in a form, but for some reason not all the values are passed on upon submitting. Can anybody have a look and point me in the right direction? When I save the data I can see the name and the password, but not the roles. I have debugged it and I see that it actually puts the roles in an instance of User, but when I get to the code that actually saves it all, the roles are empty again. (So they have been put in a different instance, but why and how?) Here's the form: // The form FormUser form = new FormUser(userdetailform); add(form); // The name-field form.add(new TextFieldString(name).setRequired(true)); // The roles-field CheckGroup rolesGroup = new CheckGroup(roles); CheckBox ownerRole = new CheckBox(owner); rolesGroup.add(ownerRole); form.add(rolesGroup); And here's the User class (name is a variable in DomainObject): public class User extends DomainObject { private String password; private ListRole roles; public User(final Integer id) { super(id); roles = new ArrayListRole(); } public void setPassword(final String password) { this.password = password; } public String getPassword() { return password; } public void setRoles(final ListRole roles) { this.roles = roles; } public ListRole getRoles() { return roles; } public void addRole(final Role role) { this.roles.add(role); } private boolean hasRole(final RoleName roleName) { for (Role role: roles) { if (role.getName().equals(roleName)) { return true; } } return false; } public boolean isOwner() { return hasRole(RoleName.OWNER); } private void setRole(final RoleName roleName, final Integer friendId, final boolean addRole) { Role role = new Role(roleName, friendId); if (addRole) { addRole(role); } else { this.roles.remove(role); } } public void setOwner(final boolean addRole) { setRole(RoleName.OWNER, null, addRole); } } Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.339 / Virus Database: 270.12.44/2140 - Release Date: 05/28/09 18:09:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket meeting in Amsterdam?
I've heard of it, but I'm not planning to go there. So for now there's just two of us in Amsterdam. Guess we'll have to convert a few more people over here to Wicket. :) Linda francisco treacy wrote: Well, would be great Nino if you came over :) But I was talking about a regular meetup... If not, there's Kings of Code in Amsterdam soon, seems interesting - not very Java-ish though. Anyone here going to that conference? Francisco 2009/5/20 nino martinez wael nino.martinez.w...@gmail.com: Although not an amsterdammer, I might be interested (if I get a budget approval from my boss).. 2009/5/20 francisco treacy francisco.tre...@gmail.com: Hi Linda, I am interested, whatever the nature of the event is (sessions, code reviews, social, etc). There's an existing wiki page but apparently this was lined up only for the meeting during the ApacheCon: http://cwiki.apache.org/WICKET/wicket-community-meetups-amsterdam.html Any other Amsterdamers interested in such a meetup? Francisco 2009/4/29 Linda van der Pal lvd...@heritageagenturen.nl: Who would be interested in a meeting in Amsterdam? We talked about it before in several discussions, but I thought it might attract more notice in it's own thread. And also what kind of meeting would you like it to be? (Social, unconference, sessions, code reviews, something else entirely?) Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to manipulate values in a data table?
Turn it into an object with that status as an integer and a name as String? Then the toString should return the name. You could possibly even use an enum. Linda HHB wrote: Hey, I have a message class that has a status (which it is an integer) to indicate whether the message has been sent successfully. Inside a data table, how to handle this integer values so instead of displaying 0 or 1, it displays Sent or Not Sent? Thanks. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.325 / Virus Database: 270.12.18/2096 - Release Date: 05/04/09 17:51:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Maven setup
For more information about Maven, check out this online book: http://www.sonatype.com/books/maven-book/pdf/maven-definitive-guide.pdf Regards, Linda Frank Tegtmeyer wrote: Hi, does anybody have a Wicket quickstart project updated to the latest versions? I am new to Java, to Maven and to Wicket of course too. I have a background in web developing with Zope and Django (all implemented in Python) but am forced to use Java now. I know that the learning curve will be steep and I got some showstoppers already :) After reading much about many Java frameworks and some frustrating tests with JSF I've chosen Wicket because it fits my requirements best. I've done some tests with databinder which promoted Maven heavily, so I want to use Maven too. I'm still struggling with the whole setup - the following issues are still not clear to me: - Maven setup - Wicket dependency doesn't work for 1.3.5 nor for 1.3.6 although the website says so (data at the end of this message) Possibly another repository required? - integration with Eclipse - Maven goal or Eclipse plugin or both? - I want to use embedded Jetty also for production (running the application behind lighttpd). How to do deployment in an elegant way? There is only SSH access to my server. - Hibernate integration - does databinder help much or is it better to learn Hibernate directly? I saw that databinder always is somewhat behind the current versions, so that may be an issue. I hope these are not too stupid questions and someone will find the time to answer them. With kind regards, Frank The Maven dependency for wicket: dependency groupIdwicket/groupId artifactIdwicket/artifactId version1.3.5/version /dependency The error: [INFO]task-segment: [compile] [INFO] [INFO] [resources:resources] [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 1 resource Downloading: http://mirrors.sunsite.dk/maven2/wicket/wicket/1.3.5/wicket-1.3.5.pom [INFO] Unable to find resource 'wicket:wicket:pom:1.3.5' in repository central (http://repo1.maven.org/maven2) [INFO] artifact wicket:wicket-extensions: checking for updates from central [INFO] artifact mysql:mysql-connector-java: checking for updates from central [INFO] artifact org.mortbay.jetty:jetty: checking for updates from central Downloading: http://mirrors.sunsite.dk/maven2/wicket/wicket/1.3.5/wicket-1.3.5.jar [INFO] Unable to find resource 'wicket:wicket:jar:1.3.5' in repository central (http://repo1.maven.org/maven2) [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to resolve artifact. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.325 / Virus Database: 270.12.20/2100 - Release Date: 05/06/09 06:04:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Add a ui lock page over the page while waiting for response
Back when I was programming in jsp I solved this by disabling the button after clicking it (because it would redirect after processing the data). Not sure how I'd do such a thing with Wicket. Linda. Matthias Keller wrote: Hi We have a web form which does some very extensive backend communication requiring a lot of time. So usually after pressing 'submit', the UI is locked for 10-30 seconds. To avoid re-submission, we'd like to put some kind of ui-lock-page over the current page, stating 'Please wait' or something. So I'd need something to add to the onclick of the submit button (which is NOT an ajax button but a normal input type=submit button) which blocks the UI until the response is ready. I've tried the wicket-stuff veil thingy, but it doesn't work. Here's what I tried: WebMarkupContainer submit = new WebMarkupContainer(submit); submit.add(new Veil()); add(submit); But even though I see some JS files added to the page, nothing happens when I click my button? Is there something else that I can just add to a button? Thanks a lot Matt - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to append JavaScript to a link?
deleteButton.add(new SimpleAttributeModifier(onclick, return confirm('Are you sure?');)); HHB wrote: Hey, The last cell in a data table is a link (that is contained in a form) that will delete the row. How to append JavaScript code that will display a confirmation dialog? Thanks for help and time. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.325 / Virus Database: 270.12.18/2096 - Release Date: 05/04/09 17:51:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ChoiceFilteredPropertyColumn and FilterToolbar examples
I found what I did wrong. I tried to let the filter-state be a Publisher as well. That should have been a BookListData object. The filterstate object should be the same type of object as the table contains, so you can filter on all variables. I hadn't understood that yet. Thanks for the help anyway! Regards, Linda Jeremy Thomerson wrote: Shouldn't the line below have name rather than publisher? I haven't used this filtered thing in a while, but from your error, that's what it sounds like the problem is. You're passing it a Publisher, and it's saying that it doesn't have a publisher field on it - because you told it to use the publisher field. -- Jeremy Thomerson http://www.wickettraining.com On Fri, May 1, 2009 at 2:31 AM, Linda van der Pal lvd...@heritageagenturen.nl wrote: columns[3] = new ChoiceFilteredPropertyColumn(new ModelString(Publisher), name, publisher, createPublisherModel()); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.325 / Virus Database: 270.12.16/2094 - Release Date: 05/03/09 16:51:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Tools for Managing a Wicket Project
Sonar is a tool that measures code quality, based on a lot of other tools like PMD, CheckStyle, Cobertura, and others. I've just started using it and it's very good. You should be able to get Effective Java at all the better bookstores and otherwise online at places like Amazon.com. Regards, Linda Carlo Camerino wrote: What does sonar do? Where can I get effective java? That's one of our problems actually. When we go on site in clients we have a hard time going to our centralized tools. I have been looking for an offline bugzilla or trac of some sort. Similar to offline gmail. I'm looking to also setup a distributed maven repository. Per our experience, all our tools become useless when there is no internet connection available, and sadly, most of our clients don't provide on. On Thu, Apr 30, 2009 at 7:02 AM, Martijn Dashorst martijn.dasho...@gmail.com wrote: Our current stack: - maven - Java 6 - hibernate - spring - Wicket - svn - hudson - artifactory (though we might switch to another one) [ - sonar (icing on the cake) ] Wendy Smoak taught me an valuable lesson: use a company repository manager for maven, and a local one on your machine. This way you can run maven offline as well (after downloading the internet first). Martijn On Wed, Apr 29, 2009 at 5:13 PM, Dane Laverty danelave...@gmail.com wrote: My boss has asked me to manage development for a Java project. I'm going to be working with two other programmers and one designer. This is the first time that our organization has tried to formally coordinate several programmers on a project together, and it is also the first Java project we've done here (I'm the only programmer with extensive Java experience). I chose to use Wicket for this project because it seemed to be the most intuitive framework, and because I hope it will make it easy for the designer and programmers to work together without stepping on each others toes. At my previous job, we used CVS for managing code contribution and Ant for deployment. Is that still a good solution, or should I be looking at other tools? Also, how do you coordinate the designer's work with the programmers' work? My goal is to find a few tools that - work well with Wicket - make it easy for programmers to check code in and out - manage project dependencies - are easy to set up - are easy to use - are free I appreciate any and all suggestions. Thanks for your help! -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.5 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.287 / Virus Database: 270.12.11/2089 - Release Date: 04/30/09 17:53:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ChoiceFilteredPropertyColumn and FilterToolbar examples
Could anybody tell me what I'm doing wrong? My code compiles just fine, but I get a runtime exception saying that the Publisher class doesn't have a publisher attribute. (Which is correct, it has a name and an id attribute.) What should I change to make it get name from Publisher instead? (Or get publisher from BookListData?) Here's the HTML: html xmlns:wicket wicket:panel form wicket:id=filterform table wicket:id=datatable /table /form /wicket:panel /html And here's the Java code: BookListProvider booklistProvider = new BookListProvider(); AjaxFallbackDefaultDataTable? table = new AjaxFallbackDefaultDataTable(datatable, createColumns(), booklistProvider, 10); FilterForm form = new FilterForm(filterform, booklistProvider); table.addBottomToolbar(new FilterToolbar(table, form, booklistProvider)); add(form); form.add(table); private IColumn?[] createColumns() { IColumn?[] columns = new IColumn[6]; columns[0] = new PropertyColumnString(new ModelString(ISBN), isbn, isbn); columns[1] = new PropertyColumnString(new ModelString(Title), title, title); columns[2] = new PropertyColumnArrayListAuthor(new ModelString(Author), authors); columns[3] = new ChoiceFilteredPropertyColumn(new ModelString(Publisher), name, publisher, createPublisherModel()); columns[4] = new PropertyColumnSubgenre(new ModelString(Subgenre), subgenre, subgenre); columns[5] = new PropertyColumnLanguage(new ModelString(Language), language, language); return columns; } private IModelListPublisher createPublisherModel() { IModelListPublisher publisherModel = new LoadableDetachableModelListPublisher() { private static final long serialVersionUID = 1L; @Override protected ListPublisher load() { ListPublisher publishers = null; DataRetriever dataRetriever = null; try { dataRetriever = new DataRetriever(); publishers = dataRetriever.fetchPublishers(); } catch (Exception e) { error(abbreviated error handling); } return publishers; } }; return publisherModel; } public class BookListProvider extends SortableDataProviderBookListData implements IFilterStateLocator { private final transient ListBookListData list; private Publisher publisherFilter = new Publisher(); ... } Linda van der Pal wrote: Are there any good examples out there that show how to use ChoiceFilteredPropertyColumn and FilterToolbar? I've already looked at wicket-phonebook, ut for some reason the FilterToolbar they use doesn't require the FilterForm as an argument, whereas that is required. They probably use an older version of Wicket, as I'm using 1.4-rc2. Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ChoiceFilteredPropertyColumn and FilterToolbar examples
Hmm, maybe I can phrase that question simpler. If I have a table that shows BookListItems, which have a Publisher as one of their attributes and I want to be able to filter on the publisher, what should be passed on to the ChoiceFilteredPropertyColumn as the fourth parameter? (IModelList? extends Y filterChoices) Regards, Linda Linda van der Pal wrote: Could anybody tell me what I'm doing wrong? My code compiles just fine, but I get a runtime exception saying that the Publisher class doesn't have a publisher attribute. (Which is correct, it has a name and an id attribute.) What should I change to make it get name from Publisher instead? (Or get publisher from BookListData?) Here's the HTML: html xmlns:wicket wicket:panel form wicket:id=filterform table wicket:id=datatable /table /form /wicket:panel /html And here's the Java code: BookListProvider booklistProvider = new BookListProvider(); AjaxFallbackDefaultDataTable? table = new AjaxFallbackDefaultDataTable(datatable, createColumns(), booklistProvider, 10); FilterForm form = new FilterForm(filterform, booklistProvider); table.addBottomToolbar(new FilterToolbar(table, form, booklistProvider)); add(form); form.add(table); private IColumn?[] createColumns() { IColumn?[] columns = new IColumn[6]; columns[0] = new PropertyColumnString(new ModelString(ISBN), isbn, isbn); columns[1] = new PropertyColumnString(new ModelString(Title), title, title); columns[2] = new PropertyColumnArrayListAuthor(new ModelString(Author), authors); columns[3] = new ChoiceFilteredPropertyColumn(new ModelString(Publisher), name, publisher, createPublisherModel()); columns[4] = new PropertyColumnSubgenre(new ModelString(Subgenre), subgenre, subgenre); columns[5] = new PropertyColumnLanguage(new ModelString(Language), language, language); return columns; } private IModelListPublisher createPublisherModel() { IModelListPublisher publisherModel = new LoadableDetachableModelListPublisher() { private static final long serialVersionUID = 1L; @Override protected ListPublisher load() { ListPublisher publishers = null; DataRetriever dataRetriever = null; try { dataRetriever = new DataRetriever(); publishers = dataRetriever.fetchPublishers(); } catch (Exception e) { error(abbreviated error handling); } return publishers; } }; return publisherModel; } public class BookListProvider extends SortableDataProviderBookListData implements IFilterStateLocator { private final transient ListBookListData list; private Publisher publisherFilter = new Publisher(); ... } Linda van der Pal wrote: Are there any good examples out there that show how to use ChoiceFilteredPropertyColumn and FilterToolbar? I've already looked at wicket-phonebook, ut for some reason the FilterToolbar they use doesn't require the FilterForm as an argument, whereas that is required. They probably use an older version of Wicket, as I'm using 1.4-rc2. Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket meeting in Amsterdam?
Who would be interested in a meeting in Amsterdam? We talked about it before in several discussions, but I thought it might attract more notice in it's own thread. And also what kind of meeting would you like it to be? (Social, unconference, sessions, code reviews, something else entirely?) Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
ChoiceFilteredPropertyColumn and FilterToolbar examples
Are there any good examples out there that show how to use ChoiceFilteredPropertyColumn and FilterToolbar? I've already looked at wicket-phonebook, ut for some reason the FilterToolbar they use doesn't require the FilterForm as an argument, whereas that is required. They probably use an older version of Wicket, as I'm using 1.4-rc2. Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Which repeater to use for my case?
I don't see why you should change from PageableListView (unless it is for entirely different reasons, like the size of your list). I have in fact just programmed such functionality with a PageableListView. (Although I didn't use a modal window, but a tabbedpanel to show the details.) Regards, Linda HHB wrote: Hey, I'm using a PageableListView with Ajax-enabled paginator. My team leader asked me to add two buttons in front of each row: Edit and Delete button. Edit will bring a ModalWindow to edit the contact. Delete will delete the record from the backend. For this functionality, which repeater do you suggest to use? Thanks. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.287 / Virus Database: 270.12.8/2086 - Release Date: 04/29/09 06:37:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to get an i18n message?
Here's an example from my own code: private static final String SQLERROR_GET = new ResourceModel(error.sqlException.select).getObject(); My properties.xml file contains a key that is called error.sqlException.select. This string is an error message that I later on add to my feedbackpanel: error(SQLERROR_GET); Hope that helps. Regards, Linda Hey, How to get a message (that will be displayed in FeedbackPanel) from properties file in order to use it for info() method of Component class? Thanks. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.287 / Virus Database: 270.12.4/2082 - Release Date: 04/27/09 06:19:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Basic help please
I think you should detach the model of the contacts and then add the contacts to the target. Linda. HHB wrote: Hey, I have a panel that consists of two parts: the first lists groups names. the second lists the contacts of a group, which gets populated upon clicking on the group name (via Ajax). wicket:panel div div wicket:id=groups span wicket:id=nameGroup Name/span /div /div div div table wicket:id=contactsTable tr wicket:id=contacts tdspan wicket:id=gsmnumber/span/td /tr /table /div /div /wicket:panel I created this model: public class ContactsModel extends LoadableDetachableModel { private Long groupId; @SpringBean private Service service; public ContactsModel(Long groupId) { InjectorHolder.getInjector().inject(this); this.groupId = groupId; } @Override protected Object load() { return service.findContactsByGroupId(groupId); } } And here is a snippet from the panel class: ListView entry = new ListView(groups, new GroupsModel()) { @Override protected void populateItem(ListItem item) { Group group = (Group) item.getModelObject(); item.setModel(new CompoundPropertyModel(group)); item.add(new AjaxFallbackLink() { @Override public void onClick(AjaxRequestTarget target) { //what to do? } }); } }; Yes, inside onClick I can get the group ID, but what to do? I have to do something like this inside onClick: ContactsModel cm = new ContactsModel(groupId); What to put inside onClick() ? I'm new to Wicket so I appreciate your time. Thanks. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.287 / Virus Database: 270.12.2/2072 - Release Date: 04/21/09 16:48:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [poll] Interest in regular Deventer Wicket meetup?
Well I was discussing having a meeting in Amsterdam, though not quite yet on a regular basis. And I see no reason not to have them in both locations. I'd probably be able to attend in Deventer once, but certainly not on a regular basis. Regards, Linda jeroen dijkmeijer wrote: +1 First of all thanks for the effort and the initiative. Although the location is -1 for me, I find this a wicked initiative. I just finished reading some chapters of the book, but nothing beats a live session. And the location is actually not that bad, considering the fact that its close to the station (sorry for all the lease drivers). I'll take some cheese from my hometown (old amsterdam) with me, (goes nice along with the pizza) regards, Jeroen. I'm definitively interested and if my calendar allows me I'll attend. On Apr 17, 2009, at 3:30 PM, Martijn Dashorst wrote: I want to poll if there is an interest in a regular Wicket meetup in Deventer, the Netherlands. We can only host at most ~20 people, so I expect this to be much lower key than the Amsterdam meetups. If there is an interest, I'll prod my employer to see if they are willing to help with space, beamer and possibly pizza. The venue would be one of the Topicus buildings, which are conveniently located in the historical center of Deventer, very close to the train station. The types of presentations/discussions/etc. I'm looking for are rather simple: - show us your product and discuss where/how/why you used and extended wicket - show us how you integrated with hibernate/db4o/ibatis/cayenne/rome/spring/guice/jquery/gmap/opensocial/... - ask us a question for a problem (with code... ;-) - ... These events would start at ~18:30 with pizza, doors open at 18:00 and presentations starting at 19:00. I'd also like to keep the meetups short, about 90 minutes, or maybe 2 hours (max). This will give people the opportunity to return to home at an appropriate time. Afterwards we could visit one of the bars that serve Topicus Gifkikker. Is this an event you would like to visit? Martijn - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.287 / Virus Database: 270.12.0/2068 - Release Date: 04/19/09 20:04:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [OT] Wicket spirited conference?
Well we could just set a date somewhere in the future and just organize something. I have no idea how large the Wicket community in the Netherlands is (I'm guessing the numbers were a bit skewed at the one meeting I was at, due to international guests who attended ApacheCon). But if the group who can attend isn't too large, we can just arrange a table at a bar or restaurant. So how many people would be interested in an informal meeting (i.e. without sessions) in Amsterdam? Regards, Linda Nino Martinez wrote: ... since meetups in netherlands seems to be rather spontaneous (and therefore hard to plan)... - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [OT] Wicket spirited conference?
If you want sessions, a sponsor will have to be found for a room (and a beamer). nino martinez wael wrote: For me it had to have some sessions etc, I'll be happy to on something. But otherwise it's hard to justify.. regadrs Nino 2009/4/17 Linda van der Pal lvd...@heritageagenturen.nl: Well we could just set a date somewhere in the future and just organize something. I have no idea how large the Wicket community in the Netherlands is (I'm guessing the numbers were a bit skewed at the one meeting I was at, due to international guests who attended ApacheCon). But if the group who can attend isn't too large, we can just arrange a table at a bar or restaurant. So how many people would be interested in an informal meeting (i.e. without sessions) in Amsterdam? Regards, Linda Nino Martinez wrote: ... since meetups in netherlands seems to be rather spontaneous (and therefore hard to plan)... - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.287 / Virus Database: 270.11.59/2063 - Release Date: 04/16/09 16:38:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [poll] Interest in regular Deventer Wicket meetup?
-1 I'd love to come, but I live near Amsterdam, so it would be two hours by train for me. Not quite feasible. Linda. Martijn Dashorst wrote: I want to poll if there is an interest in a regular Wicket meetup in Deventer, the Netherlands. We can only host at most ~20 people, so I expect this to be much lower key than the Amsterdam meetups. If there is an interest, I'll prod my employer to see if they are willing to help with space, beamer and possibly pizza. The venue would be one of the Topicus buildings, which are conveniently located in the historical center of Deventer, very close to the train station. The types of presentations/discussions/etc. I'm looking for are rather simple: - show us your product and discuss where/how/why you used and extended wicket - show us how you integrated with hibernate/db4o/ibatis/cayenne/rome/spring/guice/jquery/gmap/opensocial/... - ask us a question for a problem (with code... ;-) - ... These events would start at ~18:30 with pizza, doors open at 18:00 and presentations starting at 19:00. I'd also like to keep the meetups short, about 90 minutes, or maybe 2 hours (max). This will give people the opportunity to return to home at an appropriate time. Afterwards we could visit one of the bars that serve Topicus Gifkikker. Is this an event you would like to visit? Martijn - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.287 / Virus Database: 270.11.59/2064 - Release Date: 04/17/09 07:08:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [OT] Wicket spirited conference?
JAOO is a very good conference too. Regards, Linda. Martijn Dashorst wrote: devoxx, øredev and javazone are the primary conferences that come to mind. Martijn On Wed, Apr 15, 2009 at 5:57 PM, nino martinez wael nino.martinez.w...@gmail.com wrote: Hi I know this is off topic, but I were wondering if any of you could recommend any conferences (java related), preferably located in EU and with the same easy going spirit that wicket has? It's the time of year where I have to report expected budget for education.. regards Nino - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.287 / Virus Database: 270.11.58/2061 - Release Date: 04/15/09 19:52:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Just showing rating results
It shouldn't be too hard to write one. It would just be a component that shows an image then. The html would be something like this: html body wicket:panel img wicket:id=rating/ /wicket:panel /body /html And the java file would be something like this: public class RatingPanel extends Panel { public RatingPanel (final String id) { super(id); String imageName; // get rating int rating = ...; imageName = rating+rating+.png; add(new Image(rating, imageName)); } } Mind you, I didn't test this or anything and it could be done a whole lot prettier. Regards, Linda Altuğ B. Altıntaş wrote: Hi; How can i just show rating results of my ratings in the page. I know RatingPanel component but i need just to show rating in stars (ex : as an image), i don't want Ajax or clickable component. When you visit youtube homepage, you see the stars about ratings but they are not clickable, just image, i want that feature. Do you know any components in wicket that statfiy this feature. Thanks. No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.287 / Virus Database: 270.11.51/2052 - Release Date: 04/10/09 06:39:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Adding a confirmation popup
I've put it on a button, might that be why it doesn't work? Generated line of source code: button type=submit wicket:id=delete class=greenButton onclick=return confirm('Are you sure?');img wicket:id=deleteIcon src=resources/nl.lunaris.bookdb.webui.pages.BookListPanel/null/icons/list-remove.png//button Jeremy Thomerson wrote: What's the generated JS? Have you debugged with Firebug, etc, to see what's happening in the JS? Are you attaching that link to a regular anchor tag in the HTML? If you're putting it on a span, Wicket will generate an onclick to make it a link - which may iinterfere with your onclick JS. -- Jeremy Thomerson http://www.wickettraining.com On Fri, Apr 10, 2009 at 3:38 AM, Linda van der Pal lvd...@heritageagenturen.nl wrote: In the book Wicket in Action I found this example: public class MyPage extends WebPage { public MyPage() { Link link = new Link(link) { @Override protected void onClick() { System.out.println(Link clicked); } }; add(link); link.add(new SimpleAttributeModifier(onclick, return confirm('Are you sure?');); } } I tried to copy this behavior in my own code, but for some reason, it does show the popup, but then doesn't go on to actually going through with the action (deleting an item) after confirmation. So here's my code: private Link? createDeleteButton(final ListItemBookListData item) { Link? deleteButton = new DeleteLink(delete, item.getModel()); deleteButton.add(new Image(deleteIcon, new ResourceReference(BookListPanel.class, ../icons/list-remove.png))); deleteButton.add(new SimpleAttributeModifier(onclick, return confirm('Are you sure?');)); return deleteButton; } // This is an inner class in the same class as the method above @AuthorizeAction(action = Action.ENABLE, roles = { OWNER }) private class DeleteLink extends LinkBookListData { private static final long serialVersionUID = 1L; public DeleteLink(final String id, final IModelBookListData model) { super(id, model); } @Override public void onClick() { // delete the book try { BookSaver bs = new BookSaver(); BookListData deletedbook = (BookListData) getModelObject(); bs.deleteBook(deletedbook.getIsbn()); booklistmodel.getObject().remove(deletedbook); } catch (SQLException se) { error(SQLERROR_GET+ '\n' + se.getMessage()); } catch (IOException ie) { error(IOERROR+ '\n' + ie.getMessage()); } } } Any clue what I might be doing wrong? Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.287 / Virus Database: 270.11.51/2052 - Release Date: 04/10/09 06:39:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Adding a confirmation popup
Thanks to you both, now at least I know what to experiment with. Regards, Linda Serkan Camurcuoglu wrote: I think it should be input type=submit instead of button, or you should add form submit javascript code into the onclick handler.. Linda van der Pal wrote: I've put it on a button, might that be why it doesn't work? Generated line of source code: button type=submit wicket:id=delete class=greenButton onclick=return confirm('Are you sure?');img wicket:id=deleteIcon src=resources/nl.lunaris.bookdb.webui.pages.BookListPanel/null/icons/list-remove.png//button Jeremy Thomerson wrote: What's the generated JS? Have you debugged with Firebug, etc, to see what's happening in the JS? Are you attaching that link to a regular anchor tag in the HTML? If you're putting it on a span, Wicket will generate an onclick to make it a link - which may iinterfere with your onclick JS. -- Jeremy Thomerson http://www.wickettraining.com On Fri, Apr 10, 2009 at 3:38 AM, Linda van der Pal lvd...@heritageagenturen.nl wrote: In the book Wicket in Action I found this example: public class MyPage extends WebPage { public MyPage() { Link link = new Link(link) { @Override protected void onClick() { System.out.println(Link clicked); } }; add(link); link.add(new SimpleAttributeModifier(onclick, return confirm('Are you sure?');); } } I tried to copy this behavior in my own code, but for some reason, it does show the popup, but then doesn't go on to actually going through with the action (deleting an item) after confirmation. So here's my code: private Link? createDeleteButton(final ListItemBookListData item) { Link? deleteButton = new DeleteLink(delete, item.getModel()); deleteButton.add(new Image(deleteIcon, new ResourceReference(BookListPanel.class, ../icons/list-remove.png))); deleteButton.add(new SimpleAttributeModifier(onclick, return confirm('Are you sure?');)); return deleteButton; } // This is an inner class in the same class as the method above @AuthorizeAction(action = Action.ENABLE, roles = { OWNER }) private class DeleteLink extends LinkBookListData { private static final long serialVersionUID = 1L; public DeleteLink(final String id, final IModelBookListData model) { super(id, model); } @Override public void onClick() { // delete the book try { BookSaver bs = new BookSaver(); BookListData deletedbook = (BookListData) getModelObject(); bs.deleteBook(deletedbook.getIsbn()); booklistmodel.getObject().remove(deletedbook); } catch (SQLException se) { error(SQLERROR_GET+ '\n' + se.getMessage()); } catch (IOException ie) { error(IOERROR+ '\n' + ie.getMessage()); } } } Any clue what I might be doing wrong? Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.287 / Virus Database: 270.11.51/2052 - Release Date: 04/10/09 06:39:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.287 / Virus Database: 270.11.51/2052 - Release Date: 04/10/09 06:39:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
authorizing a tab
I'm trying to disable a tab in a TabbedPanel based on authorization. I'm using wicket-auth-roles, and it works in other places, for example for buttons. Could anybody tell me what I'm doing wrong? The tab just keeps on showing, and if you click on it you go to a page that states that you don't have authorization for that page. (As I have added an annotation to that page as well.) public class BookDetailsPanel extends Panel { ... public BookDetailsPanel(String id, final String isbn, boolean showEditPanel) { ... List tabs = new ArrayList(); ... tabs.add(new OwnerEditTab(new Model(edit), isbn)); ... } @AuthorizeAction(action = Action.RENDER, roles = { OWNER }) private class OwnerEditTab extends AbstractTab { private static final long serialVersionUID = 1L; private String isbn; public OwnerEditTab(IModel model, String isbn) { super(model); this.isbn = isbn; } @Override public Panel getPanel(String panelId) { return new BookDetailsEditPanel(panelId, isbn); } } } - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Image localization
Hi, I've got an image called bookshelf.png with some text in it. I've localized my application and so I created a second image with the same text in Dutch, called bookshelf_nl.png. I'm adding the image to the page with add(new Image(bookshelf, new ResourceReference(HomePage.class, bookshelf.png))); But despite the fact that the locale is Dutch (the localized text IS showing up in Dutch), it is showing me the default English image. Any idea what I might be doing wrong? Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Image localization
Thanks, that does indeed work. :) Linda. nino martinez wael wrote: im just doing this : add(new Image(weigth, WeigthIndex.png)); 2009/4/2 Linda van der Pal lvd...@heritageagenturen.nl: Hi, I've got an image called bookshelf.png with some text in it. I've localized my application and so I created a second image with the same text in Dutch, called bookshelf_nl.png. I'm adding the image to the page with add(new Image(bookshelf, new ResourceReference(HomePage.class, bookshelf.png))); But despite the fact that the locale is Dutch (the localized text IS showing up in Dutch), it is showing me the default English image. Any idea what I might be doing wrong? Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.285 / Virus Database: 270.11.38/2037 - Release Date: 04/02/09 06:09:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
PagingNavigator with buttons instead of links
Not sure if anybody would be interested, but I built a new kind of PagingNavigator with buttons instead of links. (As I wanted to put images on buttons, without having to create the entire buttons and all the look and feel that goes with it.) If people are interested I could clean up the code and add it to Wicket. Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How To Download Excel File?
Not related to Wicket, but this might be a start: http://api.openoffice.org/ Regards, Linda Wadi Jalil Maluf wrote: Hi All, I would like to know how can I put a link into a page so when the user clicks I fetch some data from database , export it to Excel so the user directly downloads an xls file with the content. Any help is appreciated, Thanks in advance, Wadi No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.285 / Virus Database: 270.11.34/2032 - Release Date: 03/31/09 06:02:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to secure a Wicket 1.4 application?
I'm still working on this problem myself. I'm still trying to combine wicket-auth-roles with JAAS and Glassfish. I'll let you know when I succeed. :) Regards, Linda Christian Helmbold wrote: Hello, what would be your prefered way to secure a Wicket 1.4 application? Spring Security and Wicket-auth-roles seems to be outdated. This project suggests to use Wicket-Security. So it is presumably not the best idea to use it. http://cwiki.apache.org/WICKET/spring-security-and-wicket-auth-roles.html Wicket-Security seems also to be not up to date and supports only Wicket 1.3. http://wicketstuff.org/confluence/display/STUFFWIKI/Wicket-Security Somewhere I've read that a version of Wicket-Security for Wicket 1.4 exists in a SVN repository. Maybe that makes Wicket-Security a candidate. But this framework looks quite complicated to me - WiComSec, WASP, Hive, SWARM sounds confusing. Is Wicket-Security limited to use JAAS permissions? http://wicketstuff.org/confluence/display/STUFFWIKI/Getting+started+with+Swarm I don't like JAAS very much ... My first impression is, that it is easier to write custom authentication and authorization, than to use Wicket-Security. How are your experiences? Regards Christian - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.278 / Virus Database: 270.11.29/2023 - Release Date: 03/25/09 18:54:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: FormComponentPanel woes
Hi Did you override onBeforeRender and convertInput? Regards, Linda triswork wrote: Hi I am getting really frustrated here because I can't figure out what I am doing wrong. I am creating a new TextArea form component that is limited to a particular number of characters. The trouble is, that my text area is always rendered containing its own HTML. Basically, I have: public class LimitedTextArea extends FormComponentPanel implements IHeaderContributor { public LimitedTextArea(String id, IModel model, int limit) { super(id, model); TextArea textField = new TextArea(content, model); add(textField); ... } } And it is being called like this: form.add(new LimitedTextArea(content, new PropertyModel(message, content), 160)); And the TextArea always contains this text: textarea id=content name=tabs:panel:form:content:text This is driving me absolutely mad! Anyone have any ideas? No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.278 / Virus Database: 270.11.29/2023 - Release Date: 03/25/09 18:54:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: FormComponentPanel woes
I found it in the book Wicket in Action. triswork wrote: Hi Linda, No, I haven't :( I didn't realise I had to... Do you know where I can find some documentation explaining this? Thanks T Linda van der Pal wrote: Hi Did you override onBeforeRender and convertInput? Regards, Linda No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.278 / Virus Database: 270.11.29/2023 - Release Date: 03/25/09 18:54:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: FormComponentPanel woes
quote: To keep the models of the nested components and the top component synchronized, we need to override two methods: onBeforeRender, which prepares for rendering, and convertInput, which handles receiving input. So your code would become something like this: public class LimitedTextArea extends FormComponentPanel implements IHeaderContributor { *private String text; private TextArea textField; *public LimitedTextArea(String id, IModel model, int limit) { super(id, model); * PropertyModel textModel = new PropertyModel(this, text);* *textField *= new TextArea(content, *textModel*); add(textField); ... } *...@override public void onBeforeRender() { text = (String) getModelObject(); super.onBeforeRender(); } @Override public void convertInput() { String text = (String) textField.getConvertedInput(); setConvertedInput(text); } *} Mind you, I'm a newbie too, so this is what I got from the book. (And for your example I haven't checked if it works.) Linda triswork wrote: Hi Stefan You have completely lost me on this one. All I want to do is have my TextArea (contained within my FormComponentPanel) to render properly without sticking arbitrary bits of markup inside itself. That markup you have quoted is being generated by Wicket - not by me :( Stefan Lindner wrote: textarea id=content name=tabs:panel:form:content:text /textarea Should do it Linda, I don't have that book unfortunately. The javadocs do mention those two methods, but it seems targeted at compound components. Mine is pretty simple. I just want to decorate my textarea with some text and some Javascript... Linda van der Pal wrote: I found it in the book Wicket in Action. No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.278 / Virus Database: 270.11.29/2023 - Release Date: 03/25/09 18:54:00
Re: FormComponentPanel woes
Arg, I wanted to make my changes bold. But now I see stars. Not sure if you get those too, but if you do: leave out the stars :) Linda van der Pal wrote: quote: To keep the models of the nested components and the top component synchronized, we need to override two methods: onBeforeRender, which prepares for rendering, and convertInput, which handles receiving input. So your code would become something like this: public class LimitedTextArea extends FormComponentPanel implements IHeaderContributor { *private String text; private TextArea textField; *public LimitedTextArea(String id, IModel model, int limit) { super(id, model); *PropertyModel textModel = new PropertyModel(this, text);* *textField *= new TextArea(content, *textModel*); add(textField); ... } *...@override public void onBeforeRender() { text = (String) getModelObject(); super.onBeforeRender(); } @Override public void convertInput() { String text = (String) textField.getConvertedInput(); setConvertedInput(text); } *} - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Thanks everybody for attending the meetup
I had a really good evening yesterday. Very good presentations! I'm really sorry I had to leave before the end (in order to be home at a halfway decent hour). Maybe next time we can have a few less presentations so there will be some time left for socializing? (Although I realise that it would be hard to choose from the presentations offered.) So thank you to the organizers and the speakers! Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
wicket-auth-roles documentation
Quick question, where can I find the documentation for wicket-auth-roles? So far all I've been able to find is where I could download it. Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket-auth-roles documentation
Thanks! Martijn Dashorst wrote: There are examples in the Wicket-examples project. And Wicket in Action has a short chapter on wicket security, together with a section on wicket-auth-roles. Martijn On Tue, Mar 24, 2009 at 9:53 AM, Linda van der Pal lvd...@heritageagenturen.nl wrote: Quick question, where can I find the documentation for wicket-auth-roles? So far all I've been able to find is where I could download it. Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.278 / Virus Database: 270.11.25/2019 - Release Date: 03/23/09 18:51:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket Meetup Tonight in Amsterdam!
You'll just have to wait for them to surprise you! ;) Daan van Etten wrote: What's the surprise?! I'm very curious now, can't wait! See you all tonight... Regards, Daan van Etten Op 24 mrt 2009, om 10:22 heeft Martijn Dashorst het volgende geschreven: The Apache Wicket Meetup in Amsterdam tonight (24 March) has grown considerably: over 70 people have already registered! Our program is still growing and just this morning we got an additional presentation! The Meetup is free thanks to our generous sponsors: - Hippo (http://onehippo.com) - Func (http://func.nl) - Topicus (http://topicus.nl) You can still join us between 19:00 and 22:00 in the Moevenpick hotel in Amsterdam. Register for free here: https://spreadsheets.google.com/viewform?formkey=cDFlMTdSV3dKT1lkYUlVa2lWUFdkQXc6MA Route to the venue: http://maps.google.com/maps?client=safarirls=en-usoe=UTF-8um=1ie=UTF-8cid=0,0,16474381925794425644fb=1split=1dq=moevenpick+hotel+amsterdam+piet+heinkadedaddr=Piet+Heinkade+11,+1019+BR+Amsterdam,+Netherlandsgeocode=10995011565374881002,52.378048,4.914107ei=e5fISb-PIsS4-Qb1_tGZAwsa=Xoi=local_resultresnum=1ct=directions-to Program: - Introduction to Wicket - Wicket Scala - Surprise - Wicket JDave - Automated integration testing for Wicket apps - Wicket DB4O - Getting your app production ready and in production Of course there is room for questions to the core team (Timo, Johan and Martijn are present), getting your book signed or just have a beer. See you tonight! -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.5 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.278 / Virus Database: 270.11.25/2019 - Release Date: 03/23/09 18:51:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
HTML tags case sensitive in Wicket?
Is it true that HTML tags have become case sensitive in Wicket? I just tried to link to a page that I knew existed TestPage.html with a wicket link. It gave me a resource not found message when I had the following link: wicket:link A HREF=TestPage.htmlTest/A /wicket:link If this is true, is it deliberate? Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
wicket-security SVN?
Does anybody know why I can't connect to the wicket-security SVN repository? When I try to connect to it I get the message: Error validating location: org.tigris.subversion.javahl.ClientException: Bad URL passed to RA layer svn: URL 'https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-security-examples' non-existent in revision 4621 '' Keep location anyway? Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket-security SVN?
A typo in the wicket-security website then. It should have been wicket-security/examples instead of wicket-security-examples. Thanks! Martijn Dashorst wrote: You can just paste the url in your browser and see if it exists. http://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-security is the location for wicket-security afaik. Martijn On Fri, Mar 20, 2009 at 4:07 PM, Linda van der Pal lvd...@heritageagenturen.nl wrote: Does anybody know why I can't connect to the wicket-security SVN repository? When I try to connect to it I get the message: Error validating location: org.tigris.subversion.javahl.ClientException: Bad URL passed to RA layer svn: URL 'https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-security-examples' non-existent in revision 4621 '' Keep location anyway? Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.278 / Virus Database: 270.11.21/2014 - Release Date: 03/20/09 06:59:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [NEWBIE] How to do if... else... switch... in wicket html ?
You don't do it in the HTML, but in the java code. So you create a component that takes care of the if-else for you. Linda Ista Pouss wrote: Hi, What is the best technique to do some if else and so on with wicket ? I need a html with something like that (stupid and naïve approch) : wicket:if (something = toto) div do this thing/div wicket:else if (something = foo) pa href=error.htmlIt's not good/a/p wicket:else if (something = other) divrender other/div How to do that with wicket ? Thanks. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.278 / Virus Database: 270.11.16/2005 - Release Date: 03/16/09 19:01:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [NEWBIE] How to do if... else... switch... in wicket html ?
It sounds like you want something like this: File.html: div wicket:id=labeldadada/div File.java: boolean again = false; // put your logic here if (again) { add(new Label(label, Very well!); } else { add(new Label(label, Very good!); } Ista Pouss wrote: Thanks all. Yes, I see there is planty solutions, but I am a little losted. I understand very well the WebMarkupContainer and the setVisible mecanism. But I don't undestand very well where is the markup in WebMarkupContainer... for instance, I have : div wicket:id=my_first_optiondadada/div div wicket:id=my_second_optiondududu/div and I should want in my_first_option : p Very Good ! /p and for second : div span wicket:id=again?/span Very Well ! /div NOT in java prose, but in a HTML file. Where do I put that ? In some wicket fragment ? Other ? Thanks again, I'm going to try all that. 2009/3/17 Martin Makundi martin.maku...@koodaripalvelut.com: wicket:if (something = toto) ... - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.278 / Virus Database: 270.11.16/2005 - Release Date: 03/16/09 19:01:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [NEWBIE] How to do if... else... switch... in wicket html ?
Then you do indeed have to work with the visibility. Ista Pouss wrote: 2009/3/17 Linda van der Pal lvd...@heritageagenturen.nl: It sounds like you want something like this: File.html: div wicket:id=labeldadada/div File.java: boolean again = false; // put your logic here if (again) { add(new Label(label, Very well!); } else { add(new Label(label, Very good!); } I should prefer than Very well and Very good are in a html file, or part of html file with some wicket mark inside. For instance, something like : add(new Panel(label, a reference in a wicket html file); Thanks in advance. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.278 / Virus Database: 270.11.16/2006 - Release Date: 03/17/09 07:23:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: setRowsPerPage with AjaxFallbackDefaultDataTable
When you hide the top bar, do you also set setOutputMarkupPlaceholderTag to true? (If not, the Ajax-code can't find the component anymore.) Linda Anton Veretennikov wrote: Good day! My impression about AjaxFallbackDefaultDataTable is - fantastic! Thank you, Igor! I'm implementing small Ajax panel that changes amount of rows shown. It looks like standart 20 40 60 80 ... Everything is working but: Once top bar with navigation 1 2 3 4 hides (when amount of rows is less then rowsPerPage) it never shows itself again. What I do in a AjaxLink onClick is: if (dataTable != null) { dataTable.setRowsPerPage(getCurrentCount()); target.addComponent(dataTable); } What I need to do to inform topbar about changes in rows? -- Tony - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.278 / Virus Database: 270.11.15/2003 - Release Date: 03/15/09 14:07:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: setRowsPerPage with AjaxFallbackDefaultDataTable
Hmm, is the topbar a separate component? If so you'll simply have to add it to the target as well. Anton Veretennikov wrote: Thank you, Linda. I don't hide it. It hides itself. I suppose it must show itself again if rowsCount rowsPerPage. -- Tony. On Mon, Mar 16, 2009 at 3:51 PM, Linda van der Pal lvd...@heritageagenturen.nl wrote: When you hide the top bar, do you also set setOutputMarkupPlaceholderTag to true? (If not, the Ajax-code can't find the component anymore.) Linda Anton Veretennikov wrote: Good day! My impression about AjaxFallbackDefaultDataTable is - fantastic! Thank you, Igor! I'm implementing small Ajax panel that changes amount of rows shown. It looks like standart 20 40 60 80 ... Everything is working but: Once top bar with navigation 1 2 3 4 hides (when amount of rows is less then rowsPerPage) it never shows itself again. What I do in a AjaxLink onClick is: if (dataTable != null) { dataTable.setRowsPerPage(getCurrentCount()); target.addComponent(dataTable); } What I need to do to inform topbar about changes in rows? -- Tony - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.278 / Virus Database: 270.11.15/2003 - Release Date: 03/15/09 14:07:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.278 / Virus Database: 270.11.15/2003 - Release Date: 03/15/09 14:07:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: building a wicket app with maven 1
Maven2 handles transitive dependencies, meaning that if a project you are dependent on is dependent on other projects, Maven will add them to the classpath. So that's why you didn't have to add that jar manually, Maven did it for you. I don't think Maven1 had this functionality. Linda Stephen Swinsburg wrote: Thanks Adriano. I don't seem to need that for my Maven2 build though, is there a reason for that? I'll try that though. cheers, Steve On 12/03/2009, at 8:02 PM, Adriano dos Santos Fernandes wrote: Steve Swinsburg escreveu: Hi all, I have a need to backport my wicket app that builds perfectly in Maven2 to Maven1. I think I've adjusted all the pom.xml to project.xml correctly as all the classes and dependent jars looks like they are where they need to be, but on startup I get this: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory Although in my WEB-INF/lib I have (amongst the others) the required jars: slf4j-log4j12-1.4.2.jar log4j-1.2.14.jar Any idea what's missing? Does anyone else build under Maven1? You also need slf4j-api-*.jar. Adriano - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.278 / Virus Database: 270.11.10/1996 - Release Date: 03/11/09 20:42:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Generics question
This is not really Wicket related, but I don't quite know where else to ask this. The question is: why won't this compile? // I define a model IModelListSubgenre subgenreModel = new AbstractReadOnlyModelListSubgenre() { ... } // Here I try to use the model FieldSwitchPanel subgenrefield = *new SubgenreFieldSwitchPanel(subgenre, subgenreModel);* // This is the constructor for the class SubgenreFieldSwithcPanel public SubgenreFieldSwitchPanel(String id, IModelList? extends DomainObject choices) { ... } // Subgenre extends DomainObject public class Subgenre extends DomainObject{ ... } The complaint is: The constructor SubgenreFieldSwitchPanel(String, IModelListSubgenre) is undefined. Thanks, Linda