You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by btakacs <ta...@gmail.com> on 2008/08/27 11:53:41 UTC

Error while adding css for a Panel

Hi

I get the following error in that line
add(HeaderContributor.forCss(MenuPanel.class, "MenuPanel.css"));

Caused by: java.lang.NoSuchMethodError:
com.myapp.wicket.MenuPanel.add([Lorg/apache/wicket/behavior/IBehavior;)Lorg/apache/wicket/Component;
        at com.myapp.wicket.MenuPanel.<init>(MenuPanel.java:34)
        at com.myapp.wicket.HeaderPanel.<init>(HeaderPanel.java:40)
        at com.myapp.wicket.BasePage.<init>(BasePage.java:32)
        at com.myapp.wicket.BasePage.<init>(BasePage.java:26)
        at com.myapp.wicket.HomePage.<init>(HomePage.java:19)
        at com.myapp.wicket.HomePage.<init>(HomePage.java:16)
        ... 47 more
registered listener interface [RequestListenerInterface
name=IActivePageBehaviorListener, method=public abstract void
org.apache.wicket.behavior.IBehaviorListener.onRequest()]

Any tips?

Thanks:
   Bence
-- 
View this message in context: http://www.nabble.com/Error-while-adding-css-for-a-Panel-tp19177849p19177849.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Error while adding css for a Panel

Posted by btakacs <ta...@gmail.com>.
Well, I fould a link about 
http://cwiki.apache.org/WICKET/working-with-wicket-models.html#WorkingwithWicketmodels-CompoundPropertyModels
CompoundPropertyModel .

But I don't know how can I add it to a Page. 



btakacs wrote:
> 
> It seems that this happens only in 1.4. 
> 
> Maybe because I haven't added CompoundPropertyModel.
> 
> Does anybody know what is it for?
>  * A simple compound model which uses the component's name as the property
> expression to retrieve
>  * properties on the nested model object.
>  * 
>  * CompoundPropertyModel is a chaining model so it will call get/setobject
> on the given object if
>  * the object is an instanceof IModel itself.
> It does not make too much sense for me. Maybe I should investigate the
> architecture of wicket. Are there any good article about that?
> 
> And what can I do in 1.4 instead setModel(new
> CompoundPropertyModel(this)); since there is no setModel method in WebPage
> there.
> 
> Thanks:
>    Bence 
> 
> 
> 
> btakacs wrote:
>> 
>> Hi
>> 
>> I get the following error in that line
>> add(HeaderContributor.forCss(MenuPanel.class, "MenuPanel.css"));
>> 
>> Caused by: java.lang.NoSuchMethodError:
>> com.myapp.wicket.MenuPanel.add([Lorg/apache/wicket/behavior/IBehavior;)Lorg/apache/wicket/Component;
>>         at com.myapp.wicket.MenuPanel.<init>(MenuPanel.java:34)
>>         at com.myapp.wicket.HeaderPanel.<init>(HeaderPanel.java:40)
>>         at com.myapp.wicket.BasePage.<init>(BasePage.java:32)
>>         at com.myapp.wicket.BasePage.<init>(BasePage.java:26)
>>         at com.myapp.wicket.HomePage.<init>(HomePage.java:19)
>>         at com.myapp.wicket.HomePage.<init>(HomePage.java:16)
>>         ... 47 more
>> registered listener interface [RequestListenerInterface
>> name=IActivePageBehaviorListener, method=public abstract void
>> org.apache.wicket.behavior.IBehaviorListener.onRequest()]
>> 
>> Any tips?
>> 
>> Thanks:
>>    Bence
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Error-while-adding-css-for-a-Panel-tp19177849p19180275.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Error while adding css for a Panel

Posted by btakacs <ta...@gmail.com>.
It seems that this happens only in 1.4. 

Maybe because I haven't added CompoundPropertyModel.

Does anybody know what is it for?
 * A simple compound model which uses the component's name as the property
expression to retrieve
 * properties on the nested model object.
 * 
 * CompoundPropertyModel is a chaining model so it will call get/setobject
on the given object if
 * the object is an instanceof IModel itself.
It does not make too much sense for me. Maybe I should investigate the
architecture of wicket. Are there any good article about that?

And what can I do in 1.4 instead setModel(new CompoundPropertyModel(this));
since there is no setModel method in WebPage there.

Thanks:
   Bence 



btakacs wrote:
> 
> Hi
> 
> I get the following error in that line
> add(HeaderContributor.forCss(MenuPanel.class, "MenuPanel.css"));
> 
> Caused by: java.lang.NoSuchMethodError:
> com.myapp.wicket.MenuPanel.add([Lorg/apache/wicket/behavior/IBehavior;)Lorg/apache/wicket/Component;
>         at com.myapp.wicket.MenuPanel.<init>(MenuPanel.java:34)
>         at com.myapp.wicket.HeaderPanel.<init>(HeaderPanel.java:40)
>         at com.myapp.wicket.BasePage.<init>(BasePage.java:32)
>         at com.myapp.wicket.BasePage.<init>(BasePage.java:26)
>         at com.myapp.wicket.HomePage.<init>(HomePage.java:19)
>         at com.myapp.wicket.HomePage.<init>(HomePage.java:16)
>         ... 47 more
> registered listener interface [RequestListenerInterface
> name=IActivePageBehaviorListener, method=public abstract void
> org.apache.wicket.behavior.IBehaviorListener.onRequest()]
> 
> Any tips?
> 
> Thanks:
>    Bence
> 

-- 
View this message in context: http://www.nabble.com/Error-while-adding-css-for-a-Panel-tp19177849p19179396.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org