ajax links produce too long javascript

2010-09-01 Thread Vladimir Kovalyuk
Consider this javascript generated by AjaxFallbackLink: wicketShow('overlapping-div');var wcall=wicketAjaxGet('../../?x=Gusbl7hNSWOo5OPifLRHlQ',function() { ;wicketHide('overlapping-div');}.bind(this),function() { ;wicketHide('overlapping-div');}.bind(this), function() {return Wicket.$('link8f')

AjaxRequestTarget.addComponent does not work after RequestCycle.setResponsePage was called

2010-08-25 Thread Vladimir Kovalyuk
Once setResponsePage is called the AjaxRequestTarget is pushed down in the list of request targets and AjaxRequestTarget won't be called anymore because AbstractRequestCycleProcessor.respond invokes the current request target only. My page has some ajax links that delegates handling to different

possible bug?

2010-03-31 Thread Vladimir Kovalyuk
It seems the following trick does not work for nested forms: protected void onRender(final MarkupStream markupStream) { // clear multipart hint, it will be set if necessary by the visitor this.multiPart = ~MULTIPART_HINT; // Force multi-part on if any child form

Client side events in Wicket, what do you think about that?

2010-03-05 Thread Vladimir Kovalyuk
Some thought ... Last week I thought a bit about reacting on events without client-server round-trip and without having to write JS. I had an idea - to write event handlers as methods and annotate them with special annotation @ClientSideEvent. Then feeding the class to the Java-JS compiler we

Proposal: Fake implementation of AjaxRequestTarget instead of null

2009-10-23 Thread Vladimir Kovalyuk
I believe all those null-checks of request target can be omited in user code if fallback components would provide fake implementation of AjaxRequestTarget instead of passing null. Does it make sense?

[offtopic[ how to attach sources to wicket jars when debugging

2009-09-29 Thread Vladimir Kovalyuk
I believe it must be something extremely simple. I set up a project in Eclipse Galileo using m2eclipse from Sonatype. I'm trying to debug the wicket class. I set breakpoints and the execution stops exactly at those points. The wicket sources are actually attached. I can see the source code. But

how to control visibility of Border's markup?

2009-09-20 Thread Vladimir Kovalyuk
I would like to control programmatically the visibility of the border itself, meaning that components within the border are always visible. I can create two different borders and switch between them but it looks too complicated.

defaultFormProcessing is no longer considered when processing multipart form in ajax request

2009-09-09 Thread Vladimir Kovalyuk
I added AjaxFallbackButton(Cancel).setDefaultFormProcessing(false) to the multipart form and when it is pressed the form is handled as well as the button would have defaultFormProcessing=true. It happens because request parameters does not contain the name of the submitting button. The magic is

css filter that evaluates expressions

2009-09-09 Thread Vladimir Kovalyuk
Richfaces has one useful feature. It parses .xcss files, finds expressions, evaluates them and replaces expressions with evaluated values. for instance: td.odd { background-color: ${some.expression}; } Does anybody know something similar that could be employed in Wicket?

intercomponent communications

2009-07-28 Thread Vladimir Kovalyuk
I don't see much buzz about this topic here, just a request for the trick for the forthcoming Johnatan Locke book. So it seems for now that just a few poople are interested in. I experienced problems in different places with approaches where components are loosely coupled and they try on their

how do you implement OpenEntityManagerInView for JEE applications?

2009-07-25 Thread Vladimir Kovalyuk
I came to Wicket from JSF where I used Seam for managing persistence contexts. Actually the latest stable version of Seam is incompatible with Wicket 1.4, and I realized that the project uses just three things from Seam. One of the critical things is Seam-managed persistence context. When you

how to create a BookmarkablePageLink for the particular page instance

2009-07-25 Thread Vladimir Kovalyuk
I created a breadcrumbs panel that automatically creates a series of bookmarkable links from the home page to the page that displays a details of currently viewing entity instance. Usually it looks like for instance home|folders|folder1|folder1.1|document From the other hand when the user comes

How to determine which behavior corresponds to the currently handled request target

2009-07-23 Thread Vladimir Kovalyuk
I'm trying to design a joda time based DateTime field. There are two reasons - I use joda time only - I have to wire tree components - start date, finish date and duration, so I have to add I managed to get it working but I'm concerned about the approach I took. So please critics are welcome.

how to strip wicket tags for particular component

2009-07-20 Thread Vladimir Kovalyuk
I'm trying to convert main menu into components to control visibility of items depending on the user logged in and the context. I use borders to wrap menu item into li tags. The problem is that the rendered markup contains additional wicket:border and wicket:body tags. They breaks the menu and it

MixedHybridUrlCodingStrategy wanted

2009-07-12 Thread Vladimir Kovalyuk
Is there a worked combination of HybridUrlCodingStrategy and MixedParamUrlCodingStrategy? What is missed in the latter is ability to stay bookmarkable after reaction on actions.

How to turn ModalWindow form into multipart form?

2009-06-25 Thread Vladimir Kovalyuk
How to turn ModalWindow form into multipart form? The problem is that the markup code for that particular form is hard-coded into modal.js script (surprise!, surprise!). ModalWindow form submission problems han't been fixed yet, I mean rc5

how to split application properties file into several properties files

2009-06-19 Thread Vladimir Kovalyuk
I would like to split the application properties file into several properties files. I know that I can share resources of base component and page among their descendants and at that I can use package propeties files. I just don't want to go this way because most of messages are organized in

Is inversion of selection of tree item a reasonable default behavior?

2009-06-09 Thread Vladimir Kovalyuk
When in multiple selection mode it makes sense to inverse the selection state of tree item when user clicks on link of LinkIconPanel. But in single selection mode it is not an expected behavior. At least in MS Windows environment. Please consider the following implementation: LinkIconPanel { ...

Editable select

2009-05-07 Thread Vladimir Kovalyuk
Does anybody know any editable select wicket-component that supports attaching 'onchange' AjaxFormComponentUpdatingBehavior?

confirm leave page when a page contains unsaved data

2009-04-30 Thread Vladimir Kovalyuk
Do wicket has a generic approach to handling the following scenario? 1. user opens a page with details of some entity, for instance a user. 2. user starts to type in fields 3. user clicks some link, then she is informed that the form contains unsaved data and asked to press discard and proceed,

DefaultDataTable: How to add a DDChoice to change rows per page

2009-04-26 Thread Vladimir Kovalyuk
I would like to add some component, say DropDownChoice, to allow user to change default rows per page setting for data table. I've investigated two ways: 1) extend NavigationToolbar or PagingNavigator 2) extends NavigationToolbar to add extra panel right to PagingNavigator Althought it is