On Mon, Apr 21, 2008 at 07:18:57AM -0700, Doug Donohoe wrote: > > So I added an attribute modifier to the loginPanel: > > new AttributeModifier("style", true, new Model("display: none") > > This corrected the 'flash' problem. But introduced another problem. Now, > when the form is submitted with an error, when the page is redisplayed, the > form is hidden (because the attribute modifier is still in effect). >
One of the great things about models is that they facilitate lazy evaluation. Try this: new AttributeModifier("style", true, new AbstractReadOnlyModel() { public Object getObject() { return hidePanel ? "display: none" : ""; } }); You can then toggle whether "display:none" is rendered by toggling the hidePanel field of your class. jk --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]