On Thu, Dec 6, 2012 at 11:53 AM, Karsten Gaul <karsten.g...@exedio.com>wrote:

> Trying to:
>
> /// StatelessAbstractDefaultAjaxBe**havior ///
>
> @Override
>     public CharSequence getCallbackUrl(final boolean onlyTargetActivePage)
>     {
>         final CharSequence url = super.getCallbackUrl(**
> onlyTargetActivePage);
>         final PageParameters params = getPageParameters();
>         // NOTE: quick hack to remove old and obsolete "random" parameter
> from request (see wicket-ajax.js)
>         if (params!=null && params.containsKey("random"))
>             params.remove("random");
>         return StatelessEncoder.**appendParameters(url, params);
>     }
> >> StatelessEncoder appends params to WebRequestEncoder
>
> stateless hint -> true
>
> In the StatelessAjaxLazyLoadPanel I'm using this Behavior instead of the
> usual AbstractDefaultAjaxBehavior
>
> /// My Page ///
>
> onInitialize()
> {
>     add( new StatelessAjaxLazyLoadPanel("**myContent")
>

Here we see "myContent" id.


>         {
>             private static final long serialVersionUID = 1L;
>
>             @Override
>             public Component getLazyLoadComponent( String markupId )
>             {
>                 return new MyContentPanel( markupId );
>             }
>
>             @Override
>             public PageParameters getPageParameters()
>             {
>                 return pageParameters;
>             }
>         } );
> }
>
> /// MyContentPanel ///
>
> Form form = new Form("myForm");
> form.add( new DropDownChoice<Enum>("**enumChoice"));
> add(form);
>
> java.lang.**IllegalArgumentException: Component is not a container and so
> does not contain the path myForm:enumChoice:
>
> [Component id = content]
>

Here it complains about "content". What is the relation between 'myContent'
and 'content'  component ?

Which component adds the StatelessAjaxLazyLoadPanel ?


>      at org.apache.wicket.Component.**get(Component.java:4500)
>

Put a breakpoint here and see what is in the context. What is 'this', what
in its 'children' member field.
'myForm' has children with 'enumChoice' inside, then 'enumChoce' becomes
'this and you need to see how to get to the lazy load panel and its lazy
load component.


>      at org.apache.wicket.**MarkupContainer.get(**
> MarkupContainer.java:354)
>     at org.apache.wicket.**MarkupContainer.get(**MarkupContainer.java:354)
>     at org.apache.wicket.**MarkupContainer.get(**MarkupContainer.java:354)
>     at org.apache.wicket.**MarkupContainer.get(**MarkupContainer.java:354)
>     at org.apache.wicket.**MarkupContainer.get(**MarkupContainer.java:354)
>     at org.apache.wicket.**MarkupContainer.get(**MarkupContainer.java:354)
>
> Would that be sufficient?
>
> Thanks,
> Karsten
>
>
> Am 06.12.2012 11:30, schrieb Martin Grigorov:
>
>> Show us some code and the real exception.
>>
>>
>> On Thu, Dec 6, 2012 at 11:26 AM, Karsten Gaul <karsten.g...@exedio.com>**
>> wrote:
>>
>>  Hi guys,
>>>
>>> I still have no clue. Any suggestions? A work-around would also be much
>>> appreciated. I need to stay stateless but I definetely need this lazy
>>> loading as I have to wait for a soap response every 10 mins and for user
>>> experience issues need to display some loading component/icon as provided
>>> by AjaxLazyLoadPanel.
>>>
>>> Thanks,
>>> Karsten
>>>
>>> Am 05.12.2012 09:38, schrieb Karsten Gaul:
>>>
>>>   Hi,
>>>
>>>> I'm trying to use the functionality of an AjaxLazyLoadPanel in a
>>>> stateless page but this doesn't seem to work as the injected content is
>>>> not
>>>> a container and the following exception is thrown:
>>>>
>>>> java.lang.****IllegalArgumentException: Component is not a container
>>>> and
>>>> so does not contain the path componentid:****containedcomponentid:
>>>>
>>>> [Component id = content]
>>>>
>>>>       at org.apache.wicket.Component.****get(Component.java:4500)
>>>>       at org.apache.wicket.****MarkupContainer.get(**
>>>> MarkupContainer.java:354)
>>>>
>>>>
>>>> I wrote a StatelessAbstractDefaultAjaxBe****havior overriding
>>>>
>>>> geCallbackUrl which I use in my StatelessAjaxLazyLoadPanel.
>>>>
>>>> This doesn't seem to be the way. Anyone have any hints?
>>>>
>>>> Thanks,
>>>> Karsten
>>>>
>>>>
>>>> ------------------------------****----------------------------**
>>>> --**---------
>>>> To unsubscribe, e-mail: 
>>>> users-unsubscribe@wicket.**apa**che.org<http://apache.org>
>>>> <users-unsubscribe@**wicket.apache.org<users-unsubscr...@wicket.apache.org>
>>>> >
>>>>
>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>>
>>>>
>>>>  ------------------------------****----------------------------**
>>> --**---------
>>> To unsubscribe, e-mail: 
>>> users-unsubscribe@wicket.**apa**che.org<http://apache.org>
>>> <users-unsubscribe@**wicket.apache.org<users-unsubscr...@wicket.apache.org>
>>> >
>>>
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>>
>>
>
> --
> Karsten Gaul
> Dipl. Medieninf.
> Softwareentwickler
>
> Telefon +49 (351) 4108-135
> Fax +49 (351) 4108-5135
> karsten.g...@exedio.com
> www.exedio.com
>
> exedio GmbH
> Buchenstr. 16 B
> 01097 Dresden
> Deutschland
>
> Handelsregister: HRB 22109
> Amtsgericht Dresden
> Sitz der Gesellschaft: Dresden
> Geschäftsführer: Sven-Erik Bornscheuer, Lutz Kirchner, Falk Krause
>
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: 
> users-unsubscribe@wicket.**apache.org<users-unsubscr...@wicket.apache.org>
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>

Reply via email to