[izpack-devel] yet another patch - user panel layout when switching packs

Joachim Hofer joachim.hofer at imbus.de
Fri Jul 21 14:39:32 CEST 2006


Hi,

this has haunted IzPack for far too long now...

Scenario: When I select a pack and forward to some UserInputPanel (which
has elements that depend on the pack), then go back and switch to
another pack and forward again to the UserInputPanel, then I get ugly
stuff (butchered layout, exceptions).

I noticed some beginnings of a workaround in the source, but disabling
the back button isn't really a viable solution, imho.

The source of all evil really is the empty "removeLayoutComponent()" in
the TwoColumnLayout. So I implemented it so that it allows a clean
"removeAll()".

I adapted the UserInputPanel accordingly - buildUI() now does a
"removeAll()" and adds all components back afterwards each time it's
activated.

(Unfortunately, I didn't get the layout to work cleanly with individual
"remove()"s. I'm no expert with custom LayoutManagers.)

I also removed a NullPointerException I happened upon (I think it was in
the case of empty SearchField choices) - this is a small modification in
the RuleInputField code.

These three changes are attached.

The patch is generated by subversion and based on rev 1493 (I did branch
this time as I don't know yet if you're going to take over my previous
patch(es)).

I hope you like it. :-)

Joachim Hofer
imbus AG
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.1493.diff
Url: https://lists.berlios.de/pipermail/izpack-devel/attachments/20060721/dcfe8524/attachment.ksh 


More information about the izpack-devel mailing list