Jasny FileUpload
Hi Has anyone tried using the Jasny FileUploadhttp://agile-coders.de/demo/extensions;jsessionid=87E53B5D5DDACC40526E7C7D5592F4E1?0-1.ILinkListener-infinite-pager-lastbmhplzvgefxkxm#issue130-1 from wicket bootstrap? My problem is that when i try to remove the remove and change buttons or try to add a submit button. The css screws up the look of the elements. Med venlig hilsen / Best regards Tommy Sadiq Hinrichsen Selvstændig IT-udvikler HD-ØP Humlebækgade 16, 1.tv. 2200 København N Tlf: 26 24 14 36 Mangler du en billig anlægsgartner, så prøv http://www.sl-haveanlaeg.dk
Re: DataTable + Categories
Good idea. I will give it a go. Med venlig hilsen / Best regards Tommy Sadiq Hinrichsen Selvstændig IT-udvikler HD-ØP Humlebækgade 16, 1.tv. 2200 København N Tlf: 26 24 14 36 Mangler du en billig anlægsgartner, så prøv http://www.sl-haveanlaeg.dk 2013/9/3 Gabriel Landon glan...@piti.pf Hi, Maybe you could use org.apache.wicket.extensions.markup.html.repeater.tree.TableTree Regards, Gabriel. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DataTable-Categories-tp4661178p4661181.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
DataTable + Categories
Hello I was wondering if anyone had experience with creating a datatable that consist of items with children. For my application i have a list of financeaccounts and they have financepostings. I would like to show them in a datatable because i want to use the export toolbar pattern. Currently im using nested listviews, see screenshot. Any ideas? Med venlig hilsen / Best regards Tommy Sadiq Hinrichsen Selvstændig IT-udvikler HD-ØP Humlebækgade 16, 1.tv. 2200 København N Tlf: 26 24 14 36 Mangler du en billig anlægsgartner, så prøv http://www.sl-haveanlaeg.dk - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket security and JavaMelody
I ended having to write a custom JDBC Realm since i have used a salt for users passwords. import org.apache.catalina.realm.JDBCRealm; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; import org.springframework.security.authentication.encoding.ShaPasswordEncoder; import java.security.Principal; /** * @author */ public class EazyregnskabRealm extends JDBCRealm { private static final Log log = LogFactory.getLog(EazyregnskabRealm.class); ShaPasswordEncoder encoder = new ShaPasswordEncoder(256); @Override protected String getName() { return this.getClass().getSimpleName(); } @Override public synchronized Principal authenticate(String username, String credentials) { String unDigestedPassword = credentials; String digestedPassword = encoder.encodePassword(unDigestedPassword, username); return super.authenticate(username, digestedPassword); } } web.xml login-config auth-methodBASIC /auth-method realm-nameMonitoring/realm-name /login-config security-role role-nameUSER/role-name /security-role security-role role-nameMONITOR/role-name /security-role security-constraint web-resource-collection web-resource-nameMonitoring/web-resource-name url-pattern/monitoring/url-pattern /web-resource-collection auth-constraint role-nameMONITOR/role-name /auth-constraint /security-constraint server.xml Realm className=dk.eazyit.eazyregnskab.system.EazyregnskabRealm driverName=com.mysql.jdbc.Driver connectionURL=jdbc:mysql://host:port/database?user=useramp;password=password userTable=users userNameCol=username userCredCol=password userRoleTable=user_roles roleNameCol=role/ The EazyregnskabRealm.class must be made into a jar, this and all other dependencies should be put in the tomcat lib folder. Hope someone else can use this. Med venlig hilsen / Best regards Tommy Sadiq Hinrichsen Selvstændig IT-udvikler HD-ØP Humlebækgade 16, 1.tv. 2200 København N Tlf: 26 24 14 36 Mangler du en billig anlægsgartner, så prøv http://www.sl-haveanlaeg.dk 2013/8/19 Tommy Sadiq Hinrichsen tommy.ly...@gmail.com I use for authorizing wicket pages, but javaMelody's monitoring page is not a wicket page. Med venlig hilsen / Best regards Tommy Sadiq Hinrichsen Selvstændig IT-udvikler HD-ØP Humlebækgade 16, 1.tv. 2200 København N Tlf: 26 24 14 36 Mangler du en billig anlægsgartner, så prøv http://www.sl-haveanlaeg.dk 2013/8/19 Martin Grigorov mgrigo...@apache.org Hi, On Mon, Aug 19, 2013 at 1:09 PM, Tommy Sadiq Hinrichsen tommy.ly...@gmail.com wrote: Hi I'm using Wicket security for authorization and authentication. Do you already use it for authorizing other pages ? I have included java melody to monitor the tomcat server where the web app is running and i would like to limit access to the monitoring page. Is there some way to do that with wicket security? Just like for authorizing any other page. Check http://wicketguide.comsysto.com/guide/chapter19.html for intro to security in Wicket. Med venlig hilsen / Best regards Tommy Sadiq Hinrichsen Selvstændig IT-udvikler HD-ØP Humlebækgade 16, 1.tv. 2200 København N Tlf: 26 24 14 36 Mangler du en billig anlægsgartner, så prøv http://www.sl-haveanlaeg.dk
Wicket security and JavaMelody
Hi I'm using Wicket security for authorization and authentication. I have included java melody to monitor the tomcat server where the web app is running and i would like to limit access to the monitoring page. Is there some way to do that with wicket security? Med venlig hilsen / Best regards Tommy Sadiq Hinrichsen Selvstændig IT-udvikler HD-ØP Humlebækgade 16, 1.tv. 2200 København N Tlf: 26 24 14 36 Mangler du en billig anlægsgartner, så prøv http://www.sl-haveanlaeg.dk
Re: Wicket security and JavaMelody
I use for authorizing wicket pages, but javaMelody's monitoring page is not a wicket page. Med venlig hilsen / Best regards Tommy Sadiq Hinrichsen Selvstændig IT-udvikler HD-ØP Humlebækgade 16, 1.tv. 2200 København N Tlf: 26 24 14 36 Mangler du en billig anlægsgartner, så prøv http://www.sl-haveanlaeg.dk 2013/8/19 Martin Grigorov mgrigo...@apache.org Hi, On Mon, Aug 19, 2013 at 1:09 PM, Tommy Sadiq Hinrichsen tommy.ly...@gmail.com wrote: Hi I'm using Wicket security for authorization and authentication. Do you already use it for authorizing other pages ? I have included java melody to monitor the tomcat server where the web app is running and i would like to limit access to the monitoring page. Is there some way to do that with wicket security? Just like for authorizing any other page. Check http://wicketguide.comsysto.com/guide/chapter19.html for intro to security in Wicket. Med venlig hilsen / Best regards Tommy Sadiq Hinrichsen Selvstændig IT-udvikler HD-ØP Humlebækgade 16, 1.tv. 2200 København N Tlf: 26 24 14 36 Mangler du en billig anlægsgartner, så prøv http://www.sl-haveanlaeg.dk
Re: Custom TopToolbar
Look at the html file for the datatable Med venlig hilsen / Best regards Tommy Sadiq Hinrichsen Selvstændig IT-udvikler HD-ØP Humlebækgade 16, 1.tv. 2200 København N Tlf: 26 24 14 36 Mangler du en billig anlægsgartner, så prøv http://www.sl-haveanlaeg.dk 2013/8/19 Martijn Dashorst martijn.dasho...@gmail.com On 19 aug. 2013, at 15:34, christoph.ma...@t-systems.com wrote: Hello, I want to add an own toolbar to my datatable. It works fine but I want another positioning of all toolbars. I use the DefaultDataTable which include a headers toolbar for sorting and the navigationtoolbar. When I add my showAllToobar it will be placed under the headers-toolbar. You can see this in the picture. But I want my toolbar between the navigation and the headers-toolbar. How can I do this? Picture (Device Independent Bitmap) 1.jpg Mit freundlichen Grüßen Christoph Manig Systems Engineer *T*-Systems International GmbH Systems Integration - SC Travel, Transport Logistics Hoyerswerdaer Str. 18 01099 Dresden tel.: +49 (0) 351 / 8152 - 188 fax:+49 (0) 351 / 8152 – 209 email: christoph.ma...@t-systems.com Picture (Device Independent Bitmap) 1.jpg
StringResourceModel object value = null
Hey I'm using a Stringresourcemodel to display a custom message label. Its constructed like this. new Label(maxAmount, new StringResourceModel(bookkeeping.amount.to.move,null, new Object[]{ new PropertyModel(this, valueReport.lastValuationDate), new PropertyModel(this, valueReport.totalValueLocal), new PropertyModel(getCurrentSelections().getSelectedLegalEntity(), bookkeepingCurrency) }))); With the following entry in a property file bookkeeping.amount.to.move=Booked value per {0,date} is {1,number,###.##} {2} My problem is that the valuereport object is not populated before the user makes a choice on the page. So my label is showing like this Booked value per null is null DKK When i try to use as default value in the constructor i get a conversion error. Caused by: java.lang.IllegalArgumentException: Cannot format given Object as a Date Anybody got any ideas? Med venlig hilsen / Best regards Tommy Sadiq Hinrichsen
Need to know which button is pressed in Modalwindow
Hej I have a modalwindow where in there is a save button and a cancel button. When i pres the cancel button i somehow need to know that this button has been pressed. I tried creating the modalpage as an inner class of the modal class, and in that class editing a variable in the modal class. But when i return to the modal class, all variables are unchanged. Got any ideas? package com.trifork.pengeplan.web.components.modal; import com.trifork.pengeplan.domain.MoneyCurrency; import com.trifork.pengeplan.web.components.CancelButton; import com.trifork.pengeplan.web.components.models.temporary.BankAccountModalObject; import org.apache.wicket.Page; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.ajax.markup.html.form.AjaxButton; import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow; import org.apache.wicket.markup.html.WebMarkupContainer; import org.apache.wicket.markup.html.form.DropDownChoice; import org.apache.wicket.markup.html.form.EnumChoiceRenderer; import org.apache.wicket.markup.html.form.Form; import org.apache.wicket.markup.html.form.TextField; import org.apache.wicket.markup.html.panel.FeedbackPanel; import org.apache.wicket.model.CompoundPropertyModel; import org.apache.wicket.model.IModel; import java.beans.PropertyChangeSupport; import java.util.Arrays; /** * @author */ public class AddBankAccountModal extends ModalWindow { AddBankAccountModal self; AddBankAccountModalPage modalPage; DropDownChoiceLong accountForCash; protected PropertyChangeSupport propertyChangeSupport; protected boolean saveButtonPressed; public AddBankAccountModal(String id, final IModelBankAccountModalObject model, final WebMarkupContainer updateOnWindowsClosed) { super(id); self = this; setPageCreator(new PageCreator() { @Override public Page createPage() { return modalPage = new AddBankAccountModalPage(self, model); } }); setWindowClosedCallback(new WindowClosedCallback() { public void onClose(AjaxRequestTarget target) { if (saveButtonPressed) { target.add(updateOnWindowsClosed); } saveButtonPressed = false; } }); setCloseButtonCallback(new CloseButtonCallback() { public boolean onCloseButtonClicked(AjaxRequestTarget target) { return true; } }); } public void setAccountForCash(DropDownChoiceLong accountForCash) { this.accountForCash = accountForCash; } class AddBankAccountModalPage extends BaseModalPage { public AddBankAccountModalPage(final AddBankAccountModal modalWindow, IModelBankAccountModalObject model) { super(); Form form = new Form(bankAccountForm, new CompoundPropertyModel(model)); form.add(new TextFieldString(name).setRequired(true)); form.add(new TextFieldString(financeAccount).setRequired(true)); form.add(new DropDownChoiceMoneyCurrency(moneyCurrency, Arrays.asList(MoneyCurrency.values()), new EnumChoiceRendererMoneyCurrency()).setRequired(true)); form.add(new AjaxButton(save, form) { @Override protected void onSubmit(AjaxRequestTarget target, Form? form) { saveButtonPressed = true; //TODO save new bank account with sub entities modalWindow.close(target); } @Override protected void onError(AjaxRequestTarget target, Form? form) { target.add(form.get(modalFeedback)); } }); CancelButton cancel = new CancelButton(cancel) { @Override protected void onSubmit(AjaxRequestTarget target, Form? form) { modalWindow.close(target); } }; form.add(cancel); form.add(new FeedbackPanel(modalFeedback).setOutputMarkupPlaceholderTag(true)); add(form); } } } Best regards Tommy Sadiq Hinrichsen
Updating forms model causes panel to lose model
Hey I have a form on a page. In that form a have a panel. When i change the forms model with setModel( A Compound PropertyModel) The panel loose the model due to MarkupContainer line 780. This is a problem because i want to get the model some time later in the panel, but because its a compoundpropertymodel in the form, i get the following error. Caused by: java.lang.RuntimeException: An error occurred while getting the model object for Component: [AccountInfoPanel [Component id = accountInfoPanel, page = com.trifork.pengeplan.web.app.secure.transactions.AddTransactionPage, path = 2:entityEdit:accountInfoPanel.AccountInfoPanel, isVisible = true, isVersioned = true], children = [Component id = ownedAccountType] [Component id = depositoryType] [RepeatingView [Component id = accountInfoView]]] at org.apache.wicket.Component.getDefaultModelObject(Component.java:1673) ~[wicket-core-1.5.6.jar:1.5.6] at org.apache.wicket.markup.html.panel.GenericPanel.getModelObject(GenericPanel.java:59) ~[wicket-core-1.5.6.jar:1.5.6] at com.trifork.pengeplan.web.app.secure.transactions.AddTransactionsPageComponents.panel.AccountInfoPanel.onConfigure(AccountInfoPanel.java:151) ~[classes/:na] at org.apache.wicket.Component.configure(Component.java:1093) ~[wicket-core-1.5.6.jar:1.5.6] at org.apache.wicket.Component.internalBeforeRender(Component.java:984) ~[wicket-core-1.5.6.jar:1.5.6] at org.apache.wicket.Component.beforeRender(Component.java:1027) ~[wicket-core-1.5.6.jar:1.5.6] at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1743) ~[wicket-core-1.5.6.jar:1.5.6] ... 49 common frames omitted Caused by: org.apache.wicket.WicketRuntimeException: No get method defined for class: class com.trifork.pengeplan.domain.CompleteAccountTransaction expression: accountInfoPanel at org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:499) ~[wicket-core-1.5.6.jar:1.5.6] at org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:341) ~[wicket-core-1.5.6.jar:1.5.6] at org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:244) ~[wicket-core-1.5.6.jar:1.5.6] at org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:97) ~[wicket-core-1.5.6.jar:1.5.6] at org.apache.wicket.model.AbstractPropertyModel.getObject(AbstractPropertyModel.java:134) ~[wicket-core-1.5.6.jar:1.5.6] at org.apache.wicket.Component.getDefaultModelObject(Component.java:1668) ~[wicket-core-1.5.6.jar:1.5.6] ... 55 common frames omitted Could someone please help me? Med venlig hilsen / Best regards Tommy Sadiq Hinrichsen
Wicket 6 ListItem add CSS
Hey I'm trying to add a css class to a tr field inside a ListView. Here is the code add(new ListViewFinanceAccount(financeAccounts, new FinanceAccountListModelWithSum()) { @Override protected void populateItem(ListItemFinanceAccount itemOuter) { FinanceAccount fa = itemOuter.getModelObject(); itemOuter.add(new Label(accountNumber, fa.getAccountNumber())); itemOuter.add(new Label(accountName, fa.getName())); switch (fa.getFinanceAccountType()) { case PROFIT: case EXPENSE: case ASSET: case LIABILITY: { itemOuter.add(new Label(sum, fa.getSum())); break; } case HEADLINE: { itemOuter.add(new AttributeAppender(class,test)); itemOuter.add(new Label(sum, )); break; } case SUMFROM: { //TODO calculate sum itemOuter.add(new Label(sum, )); break; } } } }); And the markup table class=table table-condensed tr th wicket:message key=account.number/wicket:message /th th wicket:message key=account.name/wicket:message /th th wicket:message key=account.sum/wicket:message /th /tr span wicket:id=financeAccounts tr td span wicket:id=accountNumber/span /td td span wicket:id=accountName/span /td td span wicket:id=sum/span /td /tr /span /table All that happens is that it creates a lot of span surrounding the tr elements. Is it not possible to add a class directly to the tr element? Med venlig hilsen / Best regards Tommy Sadiq Hinrichsen
Re: Wicket BootStrap Tour
Thanks I must have looked in the wrong place. Med venlig hilsen / Best regards Tommy Sadiq Hinrichsen Humlebækgade 16, 1.tv. 2200 København N Tlf: 26 24 14 36 Mangler du en billig anlægsgartner, så prøv http://www.sl-haveanlaeg.dk 2013/5/6 Martin Grigorov mgrigo...@apache.org Hi, Check https://github.com/l0rdn1kk0n/wicket-bootstrap/blob/master/bootstrap-samples/src/main/java/de/agilecoders/wicket/samples/pages/ExtensionsPage.java#L161 On Mon, May 6, 2013 at 12:31 PM, Tommy Sadiq Hinrichsen tommy.ly...@gmail.com wrote: Hey Is there anyone that has used the TourStep and TourBehavior from the Wicket bootstrap. I'm looking for some sample code, the github project does not have any. Med venlig hilsen / Best regards Tommy Sadiq Hinrichsen Humlebækgade 16, 1.tv. 2200 København N Tlf: 26 24 14 36 Mangler du en billig anlægsgartner, så prøv http://www.sl-haveanlaeg.dk -- Martin Grigorov Wicket Training Consulting http://jWeekend.com http://jweekend.com/