We had lots of working 

<wicket:enclosure>'S

in our app under 1.4 but when we switched to 1.5 we had to change pretty much 
all of them to explicitly create an EnclosureContainer object in the Java code 
to make them work.

It wasn't too much effort once we worked out what the problem was but 1.5 
certainly didn't seem to handle enclosures as effortlessly as 1.4.

 
>-----Original Message-----
>From: Martin Grigorov [mailto:[email protected]]
>Sent: Wednesday, 11 April 2012 1:14 AM
>To: [email protected]
>Subject: Re: 1.5 Wicket Enclosure
>
>Douglas didn't mention EnclosureContainer at all.
>He said that <wicket:enclosure> worked fine for this scenario in
>1.4.x. And I cannot imagine this ...
>
>But I personally try to avoid using any kind of auto components in my
>apps because I'm aware of the number of open tickets about them in our
>Jira for which I don't have solutions.
>
>For this scenario I'd use EnclosureContainer with setRenderBodyOnly(false).
>
>On Tue, Apr 10, 2012 at 6:00 PM, Bertrand Guay-Paquet
><[email protected]> wrote:
>> Hmm I thought EnclosureContainer was actually created _after_
>> InlineEnclosure! Looking at the git file history I see I was wrong...
>>
>> All the warnings in EnclosureContainer's javadoc led me to believe it was
>> always safer (and preferable) to use it instead of InlineEnclosure. What
>> about when you need ajax and are also in one of the situations described
>in
>> the javadoc?
>>
>>
>> On 10/04/2012 3:21 AM, Martin Grigorov wrote:
>>>
>>> Enclosure was never able to work in Ajax. That's why InlineEnclosure
>>> has been introduced.
>>>
>>> On Sat, Apr 7, 2012 at 6:04 PM, Bertrand Guay-Paquet
>>> <[email protected]>  wrote:
>>>>
>>>> Hi,
>>>>
>>>> After creating the EnclosureContainer, add the following call :
>>>> container.setRenderBodyOnly(false);
>>>>
>>>> In the EnclosureContainer's constructor, this is actually set to true
>>>> which
>>>> means that the HTML tag is not part of the rendered markup if the
>>>> Enclosure
>>>> is not visible on first render. When made visible afterwards via Ajax,
>>>> Wicket js cannot find the tag to replace with the enclosure's content.
>>>>
>>>> In my opinion, this is a bug and a JIRA issue should be created.
>>>>
>>>>
>>>> On 07/04/2012 1:46 AM, Douglas Ferguson wrote:
>>>>>
>>>>> Is this expected behavior? Is there a workaround?
>>>>>
>>>>> On Apr 5, 2012, at 6:58 PM, Douglas Ferguson wrote:
>>>>>
>>>>>> I just found a different between 1.4 and 1.5 with regards to wicket
>>>>>> enclosure.
>>>>>>
>>>>>> If you have a component in a wicket enclosure (say a feedback panel)
>>>>>> and
>>>>>> you set it visible false.
>>>>>> Then subsequently try to set it visible true, wicket 1.5 will not be
>>>>>> able
>>>>>> to make it reappear.
>>>>>>
>>>>>> 1.4 had no problem with this.
>>>>>>
>>>>>> I get this in the debugger console:
>>>>>>
>>>>>> ERROR: Wicket.Ajax.Call.processComponent: Component with id [[id3]]
>was
>>>>>> not found while trying to perform markup update. Make sure you called
>>>>>> component.setOutputMarkupId(true) on the component whose markup you
>are
>>>>>> trying to update.
>>>>>>
>>>>>> Douglas
>>>>>
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [email protected]
>>>> For additional commands, e-mail: [email protected]
>>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>
>
>
>--
>Martin Grigorov
>jWeekend
>Training, Consulting, Development
>http://jWeekend.com
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [email protected]
>For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to