Re: Future of Wicket Security (WASP/SWARM)

2010-01-25 Thread Erik van Oosten

Martijn Dashorst wrote:

[ ] adopt Wicket security into Apache Wicket
[X] keep Wicket security at Wicket Stuff
  

With all due respect to the library, I mostly just code it out myself.

Regards,
   Erik.


--
Erik van Oosten
http://day-to-day-stuff.blogspot.com/




Wicket tab panels detaching too early

2010-01-25 Thread Neil Curzon
Hi all,

Our Wicket 1.4 project (currently 1.4.3) uses tabs on some pages to display
linked information. For example, an Account may have a User. On the Account
page, there would be a User tab in this case.  The User is a PropertyModel
on a LoadableDetachableModel for the Account (which grabs from the DB).

We notice that whenever one tab accesses any part of the model in its
constructor, we get two queries to the database to display the page. Some
digging revealed the cause:

Tabbed panel does the following (simplified).

1. Instantiate the new Panel being switched to (which causes the
LoadableDetachableModel to load() as the constructor uses it)
2. call addOrReplace with this new Panel. This causes the old Panel to be
removed and detach() to be called on it. Unfortunately, the other tab also
had a PropertyModel on the same Account object. This means that the
LoadableDetachableModel that's already queried the db within this request
will detach()

Later, the rendering causes the LoadableDetachableModel to load() again.

It could be argued that we shouldn't be accessing the model directly in the
constructor but instead setting PropertyModels on its attributes to be
displayed at render time. I have managed to fix almost all of our pages to
do this*, but the problem is how fragile this is. It's difficult to write a
test case that verifies that no page needlessly causes two loads() in any
LodableDetachableModel, and the consequence of such a mistake would be no
less than doubling the load on the database.

I suggest that TabbedPanel should instead remove any old tab before
instantiating the new tab so models won't be unexpectedly detached before
rendering even happens.  I would be willing to supply a JIRA and patch
unless somebody out there a knows better way to do all of this :)

Thanks,
Neil

* My main obstacle has been PageParameters links which don't seem to be able
to take a Model as an argument. Is there a way to work around this?


[vote] release wicket 1.4.6

2010-01-25 Thread Igor Vaynberg
this vote is to release wicket  1.4.6

this maintenance release brings over 40 bug fixes and improvements.

branch: https://svn.apache.org/repos/asf/wicket/branches/wicket-1.4.6/

artifacts: http://people.apache.org/~ivaynberg/wicket-1.4.6/
(currently uploading...)

changelog: 
https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=truemode=hidesorter/order=DESCsorter/field=prioritypid=12310561fixfor=12314470
(and below)

vote ends Friday 12am gmt-8

thank you.

-igor



Release Notes - Wicket - Version 1.4.6

** Sub-task
* [WICKET-2678] -  isEnabled called in AjaxRequestTarget for
Behaviors even if component is not Visible in hierarchy

** Bug
* [WICKET-1825] - url-escaping is not undone for requestcodingstrategy
* [WICKET-2312] - RequestUtils.toAbsolutePath() not output
hostname and url-pattern in AJAX
* [WICKET-2567] - Images and stylesheets leave open file handles
* [WICKET-2616] - BaseWicketTester chooses a disabled component as
the source of an AjaxFormSubmit event
* [WICKET-2619] - wicket should handle Enums like other primitives
when injecting them.
* [WICKET-2620] - DataTable generates two thead wicket:id=topToolbars
* [WICKET-2624] - MethodGetAndSet.setValue uses wrong source to
determine which type to convert to when there's no setter
* [WICKET-2629] - HttpsRequestCycleProcessor causes HttpSession to
be created
* [WICKET-2630] - MockHttpServletResponse doesn't delete cookies
* [WICKET-2633] - AjaxEditableLabel fails to focus editor upon
validation errors
* [WICKET-2635] - Sucessfull login on SignInPanel causes HomePage
to become stateful
* [WICKET-2638] - Form.isMultipart() doesn't check
FormComponent.isMultipart() on nested components
* [WICKET-2639] - More pages missing xml prolog
* [WICKET-2641] - EnumLabel misbehaves with anonymous enum
* [WICKET-2645] - Resources aren't gziped by default
* [WICKET-2647] - InspectorPage (from devutils) is stateful for no
valid reason
* [WICKET-2650] - Consistently create body for short tags.
* [WICKET-2655] - WicketTester javadocs are referring in many
places to a component's path but it's not documented anywhere
* [WICKET-2666] - ConvererLocator.convertToString discards
original cause of conversion failure
* [WICKET-2667] - When multipart on form is set to true,
setResponsePage() doesnt work
* [WICKET-2668] - UploadProgressBar component can't be removed or
replaced easily
* [WICKET-2669] - DataTable mutiple bottom toolbars are misplaced
because of bad html
* [WICKET-2671] - Enclosure causes Nullpointer exception
* [WICKET-2672] - FormComponent doesn't properly handle array model types
* [WICKET-2675] - CryptedUrlWebRequestCodingStrategy fails in form
with method=get
* [WICKET-2679] - checkRendering() throws Exception if
TransparentResolver is invisible
* [WICKET-2685] - MixedParamsUrlCodingStrategy ,classcastexception
from Long to String
* [WICKET-2686] - CryptedUrlWebRequestCodingStrategy fails in form
with method=get - 1.5
* [WICKET-2692] - DropDownChoice value may be lost after ajax submit call

** Improvement
* [WICKET-2591] - Allow subclasses of AuthenticatedWebSession to
set signedIn field
* [WICKET-2626] - Make DatePicker on DateTimeField overrideable
* [WICKET-2628] - SerializingObjectSizeOfStrategy should warn when
unable to serialize the object
* [WICKET-2637] - Lithuanian translation for the Application.properties
* [WICKET-2642] - Russian translation of SignInPage/SignInPanel
* [WICKET-2644] - Hungarian translation for wizard
* [WICKET-2646] - Better error reporting from StatelessChecker
* [WICKET-2649] - Make SignInPage stateless
* [WICKET-2653] - Make GoAndClearFilter.defaultClearModel and
GoFilter.defaultGoModel internationalizable
* [WICKET-2656] - Ability to add CSS style to table body in DataTable
* [WICKET-2664] - CheckBoxMultipleChoice should use isEnabledInHierarchy()
* [WICKET-2673] - TabbedPanel not generic
* [WICKET-2682] - Maven 3 produces various warnings

** Task
* [WICKET-2670] - Remove deprecated API calls from wicket-extensions