Paloma Gomez wrote:
Hi everyone,
I did a fresh checkout yesterday and I have noticed that the way of
creating modules has changed. So I'm trying to adapt the module I'm
working on to fit with the new implementation.
I've added a new module.xml file to my module and I've changed my
menu.xsp file like this:
[code]
[...]
<menu i18n:attr="name" name="Edit">
<xsp:logic>
try {
Object doc = <input:get-attribute
module="page-envelope" as="object" name="document"/>;
if (doc instanceof Document && ((Document)
doc).exists()) {
String doctype = <input:get-attribute
module="page-envelope" as="string" name="document-type"/>;
if ("eventcalendar".equals(doctype)) {
<block info="false">
<item wf:event="edit"
uc:usecase="edit.eventcalendar" href="?"><i18n:text>With
Eventcalendar</i18n:text></item>
</block>
}
}
}
catch (Exception e) {
throw new ProcessingException("Error during menu
generation: ", e);
}
</xsp:logic>
</menu>
[/code]
The menu entry "With eventcalendar" keeps displaying greyed. I know
that there's a file called usecase-policies in the default publication
which lists all the available usecases and I think that my usecase
should also be listed there. I would like how to configure it so that
it is listed as the others. Thanks.
check the tooltip when you hover your mouse over the menu - if it says
"access denied", then it is indeed a usecase policy problem.
the default usecase policy has been changed to "deny" a few days, ago,
i.e. if you don't specify a policy for a usecase, you can't use it.
try adding
<usecase id="edit.eventcalendar">
<role id="admin"/>
<role id="editor"/>
</usecase>
to <yourpub>/config/ac/usecase-policies.xml, or (if you inherit this
file) to your template publication.
of course, the name of the usecase must be the name you chose in your
config/cocoon-xconf/*.xconf file.
best,
jörn
--
"Open source takes the bullshit out of software."
- Charles Ferguson on TechnologyReview.com
--
Jörn Nettingsmeier, EDV-Administrator
Institut für Politikwissenschaft
Universität Duisburg-Essen, Standort Duisburg
Mail: [EMAIL PROTECTED], Telefon: 0203/379-2736
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]