Hi Thorsten,

Thorsten Scherler schrieb:
I noticed in a module I am currently developing that the getView() from
AbstractUsecase are called multiple times. I am not sure why but it
feels like a bug that it is called more then once.
I tried to debug and counted that the method is invoked 6 times. If you
start lenya in debug mode and set a breakpoint at line 666 (no kidding
the 'evil' line) in AbstractUsecase then you will note requesting
lenya.usecase=admin.usecases exactly this phenomenon.

I just placed a breakpoint in this line and tried it with a different usecase, it was invoked 2 times:

  * directly by the usecases.js
  * when the UsecaseProxy is initialized

Do you use the trunk or 2.0.2?

-- Andreas



The whole problem about it is that the first time all parameter are in
the request but after that not anymore.
My class is very simple:

public class ShowReports extends AbstractUsecase {
...
 protected void prepareView() throws Exception {
 ...
 }
}

Meaning I just want to override the prepareView() method.
My xconf looks like:
<xconf xpath="/cocoon/usecases"
unless="/cocoon/usecases/component-instan...@name =
'reporter.showReports']">
  <component-instance name="reporter.showReports"
logger="lenya.reporter"
    class="org.apache.lenya.modules.reporter.ShowReports">
    <view uri="modules/reporter/usecases/showReports.jx" menu="true"
createContinuation="false">
      <tab group="admin" name="reporter"/>
    </view>
  </component-instance>
</xconf>

Does anybody see the same problem?
Any ideas?

salu2


--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


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

Reply via email to