Of IColumns, Builders and Lambdas

2017-09-18 Thread ChambreNoire
Hi, Just wondering if anyone had already thought of instantiating IColumns using the builder pattern in conjunction with Lambdas for things like cell/header styling and column visibility (and more depending on the type of column) ? My extended columns usually involve a fair bit of method

Re: Wicket Wizard Query

2017-08-09 Thread ChambreNoire
Hello, Yeah I get the general gist it's just the 'return this' in WizardStep#getView(final String id, final Component parent, final IWizard wizard) that I find a tad odd... CN -- View this message in context:

Wicket Wizard Query

2017-08-07 Thread ChambreNoire
Hello, Would someone with a working knowledge of the Wicket extensions Wizard component care to explain the overall design of this component specifically the relationship between IWizard, IWizardModel and IWizardStep ? I'm looking over the sources and whilst I can use it fine, I don't really

Re: patterns for web ui apps. mvc models

2017-03-25 Thread ChambreNoire
Hello, What do you make of the following ? A "view model" associated with each view (mostly for edit forms). This model (separate from LDMs encapsulating entities) would handle all FormComponent values and updates (select lists, etc..). At creation it would extract required entity properties and

Required DateTimeField not showing 'is required' feedback...

2016-09-12 Thread ChambreNoire
Hello, Quick question: When I attach a FeedbackPanel to a DateTimeField with setRequired(true), the required message never shows in the feedback whereas validators like DateValidator.maximum work fine… Any ideas? Thanks CN -- View this message in context:

Re: Bug in TreeTable example (with SelectableFolderContent)

2016-08-31 Thread ChambreNoire
Great, that's exactly what I did! Thanks! CN -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Bug-in-TreeTable-example-with-SelectableFolderContent-tp4675396p4675404.html Sent from the Users forum mailing list archive at Nabble.com.

Bug in TreeTable example (with SelectableFolderContent)

2016-08-31 Thread ChambreNoire
Hi, I'm using Trees for the first time and I've discovered a bug with one of the examples. When using SelectableFolderContent, if one does the following : 1) select a tree node/leaf 2) collapse the selected node/leaf parent (effectively making the previous selection invisible) 3) select

Re: Dynamic localisation

2016-07-01 Thread ChambreNoire
I think I'll try rolling my own Localizer to do on the fly substitutions although that NestedStringResourceLoader looks pretty useful! My thanks to you both, CN -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Dynamic-localisation-tp4674990p4675001.html Sent from the

Re: Dynamic localisation

2016-07-01 Thread ChambreNoire
The thing is, I don't know in advance which words need to be dynamically changed. So for instance : "The user is not currently associated with a service" I could want to replace 'user', 'service' or even 'associated' depending on the context. I could always add context-specific property files

Dynamic localisation

2016-06-30 Thread ChambreNoire
Hello, I wonder if any of you have encountered a similar problem. I'd like to be able to replace specific localised terms depending on the context (according to a session variable with can change during the session life). So for instance, in certain contexts all occurrences of the word 'user'

Re: Issue with the FileUploadField

2016-06-14 Thread ChambreNoire
Ha! I've never encountered this in recent versions of Wicket (6 & 7) as I've never needed to upload files on those projects. My question concerned an old legacy app I need to extend running in 1.3.7 (!). So my options are migrate to 7 (no time and not worth it), figure out the iframes trick

Re: Issue with the FileUploadField

2016-06-13 Thread ChambreNoire
Hey there, Little late in the day, but I'm trying to find a working example of a simple ajax fileuploadfield to be used within a modal window. A lot of post refer to http://www.dooriented.com/blog/2008/04/23/wicket-ajax-like-file-upload-on-a-modal-window/ however this link is dead and I couldn't

Trouble updating ListEditor with a detachable model

2016-04-11 Thread ChambreNoire
Hi, I'm trying to use the ListEditor component from the Wicket in Action blog (). I'm giving it a PropertyModel that points to "parent.children" where parent is a LDM that loads a 'parent' from the database. It displays properly however when I update the TextFields added to the ListItems and try

Re: ResourceModel usage within ModalWindow content Panel

2016-03-19 Thread ChambreNoire
Nevermind, using a PackageStringResourceLoader works fine! CN -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ResourceModel-usage-within-ModalWindow-content-Panel-tp4674067p4674077.html Sent from the Users forum mailing list archive at Nabble.com.

Re: ResourceModel usage within ModalWindow content Panel

2016-03-19 Thread ChambreNoire
No that won't work anyway because the ModalWindow instance is added at the page level and reused throughout. So basically I need to pass the panel where the content panel is instantiated to this content panel so that it can resolve the resources. Bit ugly.. -- View this message in context:

Re: ResourceModel usage within ModalWindow content Panel

2016-03-19 Thread ChambreNoire
Hey there, Indeed I'm using a Panel rather than a separate page. I could just use StringResourceModel("key", modalwindow.getParent(), null) but I was hoping for something less verbose that would cover all resourcemodel use in the modal content panel... Thanks, CN -- View this message in

ResourceModel usage within ModalWindow content Panel

2016-03-19 Thread ChambreNoire
Hi, I'd like to be able to use localised string resources declared within the ModalWindow's parent panel from within the ModalWindow content Panel. Any ideas? Many Thanks, CN -- View this message in context:

Difficulty with related, mutually updating fields

2015-11-23 Thread ChambreNoire
Hello, I have a form with the following fields : start date, duration (in days) & end date. I want the user to be able to enter EITHER a duration OR an end date and the other field will be automatically calculated according to this and the start date. Each field has an associated feedback label.

Validating Forms before page load

2015-10-16 Thread ChambreNoire
Hello, Is there any way to programmatically validate a wicket form on page/panel load? I have a panel who's visibility is determined by its sibling form's validity. That works fine except on initially loading the parent panel as the new form is considered valid regardless of content... Many

Re: Validating Forms before page load

2015-10-16 Thread ChambreNoire
Yeah I'd have prefered to just call form.hasError rather than checking 10 fields on the modelobject but hey it works! Thanks, CN -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Validating-Forms-before-page-load-tp4672260p4672262.html Sent from the Users forum mailing

Re: Upgrading Wicket 1.2 site

2015-09-08 Thread ChambreNoire
I did a migration from 1.3.7 to 6.18 quite recently (main project plus shared sub-module). I found the process quite simple really and it was an opportunity to revisit some very poorly constructed code. My main problem wasn't so much with the migration itself but with my colleagues' code. Clearly

Re: Download serves empty files with correct number of pages !?!

2015-03-31 Thread ChambreNoire
OK so the empty PDFs where due to some strangeness with the build config which is fixed. The filename and extensions are added by item.getModelObject().getFile(). So it works fine now however using DownloadLink the file still downloads rather than is opened in a new tab. Any ideas? -- View this

Re: Download serves empty files with correct number of pages !?!

2015-03-31 Thread ChambreNoire
Is there an easy way of overloading the ContentDisposition.ATTACHMENT already used in DownloadLink? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Download-serves-empty-files-with-correct-number-of-pages-tp4670117p4670127.html Sent from the Users forum mailing list

Re: Download serves empty files with correct number of pages !?!

2015-03-30 Thread ChambreNoire
Francois Meillet wrote path = new ClassPathResource(descriptors/hc).getFile(); the path isn't null ? Nope. By the time we get to the line : return new FileResourceStream(new File(path, getModelObject().getFile())); the path isn't null and this ends up instantiating a FileResourceStream with

Re: Download serves empty files with correct number of pages !?!

2015-03-30 Thread ChambreNoire
Sure but no exception is thrown! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Download-serves-empty-files-with-correct-number-of-pages-tp4670117p4670119.html Sent from the Users forum mailing list archive at Nabble.com.

Re: Large forms

2015-02-24 Thread ChambreNoire
Many thanks for all the options! Since I'm on the subject of large forms, I was wondering what you opinion of appropriate class / db design is for such cases (300+ fields)? I was thinking of splitting the form into a number of sub-forms each with its own entity / table. The main issue with this

Large forms

2015-02-23 Thread ChambreNoire
Hey there, In the case of large forms with 20+ fields, how should one go about coding the wicket components? I have a large form of over 300 fields divided into 20 pages to code. Instantiating and wiring up each of these one by one would take an age. Any ideas? Many thanks, CN -- View this

Re: Large forms

2015-02-23 Thread ChambreNoire
Yes I'm aware of WicketRAD and WicketBeans but both projects appear to have been abandonned. I take it there's nothing more recent? I'll have to implement something myself (and these two projects will certainly be useful for inspiration). Thanks CN -- View this message in context:

Re: ListenerInvocationNotAllowedException woes

2015-02-19 Thread ChambreNoire
OK, it seems that this is now a regular occurrence on our production platform so any assistance you can provide would be greatly appreciated... -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ListenerInvocationNotAllowedException-woes-tp4669616p4669645.html Sent from

Re: ListenerInvocationNotAllowedException woes

2015-02-19 Thread ChambreNoire
Yes I confirm that isEnabledInHierarchy == false Here you go : org.apache.wicket.core.request.handler.ListenerInvocationNotAllowedException: Behavior rejected interface invocation. Component: [AjaxLink [Component id = search]] Behavior: org.apache.wicket.ajax.markup.html.AjaxLink$1@73829fd3

Re: ListenerInvocationNotAllowedException woes

2015-02-19 Thread ChambreNoire
Hi, The search AjaxLink is disabled. It's a service link and when it is clicked, it changes a content panel and sets a current view session variable. Its onConfigure method sets enabled based on whether the link refers to the current view. So effectively, click it once and it gets disabled until

Re: ListenerInvocationNotAllowedException woes

2015-02-19 Thread ChambreNoire
Hmm that's what I thought. It's just that this has never been an issue before. Maybe this has something to do with our recent migration to tomcat7 vs an embedded Jetty previously... I'll implement the suggeted changes. Thanks! -- View this message in context:

ListenerInvocationNotAllowedException woes

2015-02-18 Thread ChambreNoire
Hi there, Since our recent migration to 6.18 we've been getting a fair number of ListenerInvocationNotAllowedExceptions when users click on links. This redirects them to page which states that the access is denied. Here's a typical trace :

When should one use fragments?

2015-01-21 Thread ChambreNoire
Hello, I'm going over some old code and I have noticed that some devs are using fragments to slice up views. For instance, one Panel only has a single 'content' div and then the 3 different views are displayed by switching between 3 Fragments with replaceWith(). This seems to me to break the

Re: DebugBar reports strange sizes

2015-01-05 Thread ChambreNoire
I'm having trouble fully understanding Wicket's serialization. I understand that if I declare a final object outside of an anonymous inner class and then use it from within that anonymous inner class, the compiler will ass a member variable to the anonymous inner class which gets serialized.

DebugBar reports strange sizes

2015-01-04 Thread ChambreNoire
Hello, I’m playing around, trying to make sense of the DebugBar Inspector, in particular the sizes reported. I have a page with two Labels. I have artificially boosted their sizes with a large instance variable. One is 1M the other 0,5M. In the inspector each is reported as 1,5M. Any ideas why

Select overlaping inside autosized ModalWindow

2014-12-17 Thread ChambreNoire
Hi, I have just noticed that if one places a select within the content panel assigned to a ModalWindow, if the select is wider than any other component in the content, it overlaps. ex: modal = new ModalWindow(modal) .setInitialHeight(0) .setInitialWidth(0) .setMinimalHeight(0)

Re: Using 6.X snapshots

2014-12-10 Thread ChambreNoire
Nevermind. It was a combination of the update not going through due to problems with my VPN setup and the small fact that the version should have been 6.19.0-SNAPSHOT and not 6.19-SNAPSHOT. CN -- View this message in context:

Stateless login page with auth-roles

2014-12-10 Thread ChambreNoire
Hi, I've followed the Wicket guide's chapter on security in order to implement authorization. Amongst other bits it advises using the following code in the AuthenticatedPage : @Override protected void onConfigure() { super.onConfigure(); AuthenticatedWebApplication app =

Re: Stateless login page with auth-roles

2014-12-10 Thread ChambreNoire
No, not directly, but it leads to the set() method of RestartResponseAtInterceptPageException's inner InterceptData class which calls bind(); https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java#L141 CN -- View

Re: Stateless login page with auth-roles

2014-12-10 Thread ChambreNoire
Yes I thought of that but it doesn't redirect to the loginpage (and results in WicketRuntimeExceptions - Error attaching this container for rendering - possibly because of a resulting page missmatch). I'm obviously missing something... -- View this message in context:

Using 6.X snapshots

2014-12-09 Thread ChambreNoire
Hi, How can one work with the latest snapshot of a specific wicket module. I'm trying to use wicket-auth-roles 6.19.0-SNAPSHOT but Maven won't retrieve it... dependency groupIdorg.apache.wicket/groupId artifactIdwicket-auth-roles/artifactId version6.19-SNAPSHOT/version /dependency

Re: turning off page versioning

2014-12-08 Thread ChambreNoire
Hmm it's no really working for me. Occassionally ajax links within the single page cause a StalePageException which results in a refresh but without the expected panel change normally caused by the link which is jarring.. Any ideas? CN -- View this message in context:

Re: turning off page versioning

2014-12-08 Thread ChambreNoire
ok but it has only started happening since I added the single-page-instance code... -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/turning-off-page-versioning-tp4667631p4668679.html Sent from the Users forum mailing list archive at Nabble.com.

Re: Force AjaxLink to be enabled

2014-12-05 Thread ChambreNoire
Hmm. I managed to get this working for AjaxLinks but now I have a similar situation for simple 'Link's used to download files via ResourceStreamRequestHandler. I override isLinkEnabled() but I still get a ListenerInvocationNotAllowedException. Any ideas? CN -- View this message in context:

Re: Force AjaxLink to be enabled

2014-12-05 Thread ChambreNoire
gah! Always finish debugging before posting. Just needed to override canCallListenerInterface(). Easy peasy! CN -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Force-AjaxLink-to-be-enabled-tp4668631p4668662.html Sent from the Users forum mailing list archive at

Force AjaxLink to be enabled

2014-12-04 Thread ChambreNoire
Hi, Having recently migrated an old app all the way from 1.3 to 6, one of the issues I encountered was that links and other component take their parents into consideration when determining their enabled state (introduced in 1.4?). This is a real pain for me in a few specific cases. I can't

Re: Force AjaxLink to be enabled

2014-12-04 Thread ChambreNoire
Ha! Yes I was going to do that tonight but fine. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Force-AjaxLink-to-be-enabled-tp4668631p4668633.html Sent from the Users forum mailing list archive at Nabble.com.

Re: FIXED: TextField cursor reset mid-editing

2014-12-04 Thread ChambreNoire
OK so this is what I have. Disclaimer: I'm no javascript/jQuery expert so this is mostly cobbled together from things I have found online and tested in my particular situation. Any optimisations are more than welcome! So first the script (function($) { $.fn.getCaretPosition = function() {

Re: Force AjaxLink to be enabled

2014-12-04 Thread ChambreNoire
Haha I had already overridden AbstractLink#isLinkEnabled() and yes now Wicket renders a link rather than a span but clicking doesn't work. OnClick() isn't called at all. CN -- View this message in context:

FIXED: TextField cursor reset mid-editing

2014-12-03 Thread ChambreNoire
Nevermind. I figured it out. I just needed to perform the check on the prepend rather than the append. Thanks for the help! CN -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/TextField-cursor-reset-mid-editing-tp4668582p4668606.html Sent from the Users forum mailing

Re: TextField cursor reset mid-editing

2014-12-02 Thread ChambreNoire
Hi, I've got this working now but there's a catch: Given two textfields with both this enhanced onKeyup behavior and an onBlur behavior, if I quickly type something into the first field, press tab and start typing into the second field there is some strangeness with the field focusing.

Re: TextField cursor reset mid-editing

2014-12-02 Thread ChambreNoire
I'm afraid that doesn't work . When the keyup behavior updates a field that the user is editing, the refresh of its parent must cause the field to loose focus and therefore the caret is never repositioned. Without the '$('#id')[0] === document.activeElement' it works but, as previously described,

TextField cursor reset mid-editing

2014-11-28 Thread ChambreNoire
Hi, I was wondering if there's a way around the following problem - at least a slightly more elegant one than I came up with! When one adds an AjaxFormUpdatingBehavior(onkeyup) to a TextField, if during the update the source TextField is added to the AjaxRequestTarget the resulting behaviour is

Re: TextField cursor reset mid-editing

2014-11-28 Thread ChambreNoire
Many Thanks. That works fine as far as the cursor is concerned but it seems that on the ajax call, if the textfield is smaller than the content it contains, the content is scrolled back to the start (while the cursor stays where it should be). I'm currently trawling the web for solutions to

Migrating SecondLevelCacheSessionStore

2014-11-03 Thread ChambreNoire
Hello Wicketeers, I am posting this question in the hope that some if the more knowledgeable members of the wicket community can help me understand Wicket's serialisation process and use of SessionStores, etc.. I have been tasked with overhauling a fairly old Wicket project and this includes

Re: Migrating SecondLevelCacheSessionStore

2014-11-03 Thread ChambreNoire
I should add that this web application uses a Single Page approach. Everything is achieved via ajax panel replacement (which would make page versioning redundant wouldn't it?)... C -- View this message in context:

IModel-based multiple-selection DataTable

2014-05-27 Thread ChambreNoire
Hello, I'm trying to roll my own paginated multiple-selection datatable and I'm not sure how to store the selected entities. Many of the solutions I have found online simply add/remove selected entities to/from a SetMyEntity located in the parent component however my DataProviders use

Re: Tooltips/Contextual menu with interactive content

2014-02-22 Thread ChambreNoire
Yup, I found it shortly after my original post. I'm a bit apprehensive about overriding jQuery styles but other than that it certainly looks promising. Only problem, I'm running 1.4 on this project (old project no mandate to upgrade to 6 unfortunately). Chambre -- View this message in context:

Tooltips/Contextual menu with interactive content

2014-02-21 Thread ChambreNoire
Hello folks, Here's what I'd like to achieve : A user clicks on an image - although this could be any type of component (I suppose this makes it more of a contextual menu). A floating panel appears over/below the component. In this panel I can put anything but in my specific use case I'd like a

Re: Hybrid palette with DropDownChoice and ListView

2014-02-19 Thread ChambreNoire
Great, I'm still getting NonUniqueObjectExceptions when I save. Back to the drawing board. *sigh* -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Hybrid-palette-with-DropDownChoice-and-ListView-tp4664445p4664562.html Sent from the Users forum mailing list archive at

Re: Hybrid palette with DropDownChoice and ListView

2014-02-14 Thread ChambreNoire
OK so this is what I have so far. Seems to work OK. public class DropDownPaletteT extends FormComponentPanel { private static final String UNSELECTED_ID = unselected; private static final String SELECT_ACTION_ID = select; private static final String SELECTED_ID = selected;

Hybrid palette with DropDownChoice and ListView

2014-02-13 Thread ChambreNoire
Hello, I'd like to create a hybrid 'palette'. First there's a DropDownChoice with an 'Add' link and next to this a vertical list of selected items, each with a 'remove' link. Of course, adding an item removes it from the DropDownChoice and adds it to the list and vice-versa for item 'removal'.

Re: Hybrid palette with DropDownChoice and ListView

2014-02-13 Thread ChambreNoire
Thanks for the suggestions. Regrettably the spec requires a vertical list of labels and specifically not a multi choice list as used in the extensions Palette component otherwise yes it would be trivial to make the right hand side a one row drop down as you mention... -- View this message in

Submitting values for null associations

2014-02-11 Thread ChambreNoire
Hi, I have a form which can flip between edit and view modes. Its fields share a common CompoundPropertyModel which in turn points to an AbstractEntityModel similar to that described in the 'Wicket in Action' blog. My problem is with associations that happen to be null. If I have a User entity

Re: Submitting values for null associations

2014-02-11 Thread ChambreNoire
Yes I'm aware of this but the problem is I'm reusing the same AbstractEntityModel (effectively a LoadableDetachableModel that loads from the db) for the edit mode and the User instance in the db has no Job instance (yet). I could always re-build a Model using the unproxied User instance when I

Re: Submitting values for null associations

2014-02-11 Thread ChambreNoire
I forgot to mention, the reason I don't systematically make a new Job instance is that when saving the form hibernate creates a new Job instance which is effectively empty if no Job details have been input. Chambre -- View this message in context:

Re: Submitting values for null associations

2014-02-11 Thread ChambreNoire
Why would that make any difference? A null Job is still a null Job. Unless I'm missing something... -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Submitting-values-for-null-associations-tp4664365p4664371.html Sent from the Users forum mailing list archive at

Re: Submitting values for null associations

2014-02-11 Thread ChambreNoire
I'm afraid I still don't see it. I think I'm just going to have to use a nested model at the form level and rebuild it whenever I toggle viewing/editing mode. So I'd build a new Model() from the unproxied User when switching to edit mode and build a new AbstractEntityModelUser(user.id, User.class)

Accessing WebApplication from the service layer

2014-02-03 Thread ChambreNoire
Hey, I've just been sketching out an entity locking mechanism (below) to prevent users from editing entities which another user is already in the process of editing. It works fine but the problem is that placing this in my WebApplication class means that I need to make MyApplication.get() call

Re: Accessing WebApplication from the service layer

2014-02-03 Thread ChambreNoire
Hello, OK so no storing my MapString, EntityLock in the Application MetaData then? Many thanks, Chambre -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Accessing-WebApplication-from-the-service-layer-tp4664145p4664147.html Sent from the Users forum mailing list

Re: Accessing WebApplication from the service layer

2014-02-03 Thread ChambreNoire
Yes however I also store the id of the session that owns the lock in a map so that I can easily flush locks when a user session expires. This would mean that EntityLockService would need access to the current WebSession which also seems messy... Chambre -- View this message in context:

Re: Accessing WebApplication from the service layer

2014-02-03 Thread ChambreNoire
Yup that's exactly what I have done. My problem lies with the lock creation in newEntityLock(PersistentEntity entity) which needs the session Id... Chambre -- View this message in context:

Re: Session creation with stateless pages in Chrome

2013-05-29 Thread ChambreNoire
That's the problem. Session.bind() isn't called. I put a breakpoin in AbstractHttpSessionStore.bind() but still it's hard to tell what's causing this to be called... -- View this message in context:

Session creation with stateless pages in Chrome

2013-05-28 Thread ChambreNoire
Hello folks, I have rendered all of my pre-login wicket pages fully stateless. I have just noticed that while no wicket sessions are created until a valid login occurs using most browsers, when accessing the site via Google Chrome, the wicket session is bound after the initial rendering. As for

Re: Session creation with stateless pages in Chrome

2013-05-28 Thread ChambreNoire
How would I check this? I disabled Predict network actions to improve page load performance but that hasn't changed anything. Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Session-creation-with-stateless-pages-in-Chrome-tp4659106p4659111.html Sent from the

Separating a form

2012-09-25 Thread ChambreNoire
Hi, I have a simple ContactEditPanel which contains a form and a number of textfields. Up until now I included an AjaxSubmitLink in this panel which, if the form content is valid, saves/updates the Contact instance contained in the Panel model. So far so simple. However now I'd like to remove the

Re: Setting the value of a HiddenField from JavaScript

2011-12-09 Thread ChambreNoire
Hi there, I'm having the same problem. Any chance of a peek at your solution? Cheers Anthony -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Setting-the-value-of-a-HiddenField-from-JavaScript-tp3539234p4175796.html Sent from the Users forum mailing list archive at