[Building Sakai] how to extend the Steve's Wicket example?

David F. Torres Sola david7torres at gmail.com
Thu Jan 10 02:01:25 PST 2013


Hello,

I started to modify the Steve's Wicket Archetype recently.

I have the next problem:
>From the pages, methods of ProjectLogic interface (ProjectLogicImpl
implementation) are called.
I created a new method "void doNothing(){}" in the interface and in the
implementation, and I called it from the pages (Eclipse finds the methods,
and it can be compiled)

The ProjectLogic object it is not created traditionally, it is created
using a Wicket annotation.


APage.java
-----------------

...

@SpringBean(name="renuda.logic.ProjectLogic")
protected ProjectLogic projectLogic;

...

list = projectLogic.getThings(); /*It is working, because already existed
in the ProjectLogic and ProjectLogic Impl */
projectLogic.doNothing(); /* throws the exception java.lang.NoSuchMethodError:
renuda.logic.ProjectLogic.doNothing()V */
-----------------------------



I guess it has something to do with spring, but I don't have a clue...

The bean mentioned before is in

components.xml
-----------------------

...
<!-- ProjectLogic -->
<bean id="renuda.logic.ProjectLogic"
    class="renuda.logic.ProjectLogicImpl"
    init-method="init">

    <property name="dao" ref="renuda.dao.ProjectDao" />
    <property name="cache" ref="renuda.cache" />

    </bean>

    <!-- DAO. This uses the DataSource that has already been setup by Sakai
 -->
<bean id="renuda.dao.ProjectDao"
class="renuda.dao.impl.ProjectDaoImpl"
init-method="init">
<property name="jdbcTemplate">
<bean class="org.springframework.jdbc.core.JdbcTemplate">
<constructor-arg type="javax.sql.DataSource">
<ref bean="javax.sql.DataSource" />
</constructor-arg>
</bean>
</property>
</bean>

...




Thank you for your help,
David Torres
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20130110/c9133ea5/attachment.html 


More information about the sakai-dev mailing list