Hello!

I noticed one error here:
<condition>#{validate.validateGroup}</condition> (1)
and
public boolean validateGroup() (2)

(1) is some kind of EL expression that accesses JavaBeans property
"validateGroup" on JavaBean with name "validate".
(2) is NOT JavaBean property, so you need to define such a property first,
and be sure that name "validate" is defined.

Good starting point on how to do this will be to read JavaBeans tutorial:
http://java.sun.com/docs/books/tutorial/javabeans/index.html
Then you can read more about EL (
http://java.sun.com/products/jsp/syntax/2.0/syntaxref207.html) so you can do
the job without using JavaBean.
And last - read "Nuxeo book" about how to contribute and modify actions to
Nuxeo, write filters and so on (
http://doc.nuxeo.org/5.3/books/nuxeo-book/html-single/#actions-views) - if
you only want to add filter you can omit other properties that are already
set (ID is required):
<action id="TAB_PUBLISH" >
<filter-id>no_archiviare</filter-id>
</action>

Good luck!

On Thu, Jan 21, 2010 at 11:56 AM, Federica Boffa <[email protected]> wrote:

>  I write this part of code for don't view tab publish for certain user, but
> it don't work. Where I made error? Thank you
>
> <filter id="no_archiviare" append="true">
> <rule grant="false">
> <condition>#{validate.validateGroup}</condition>
> </rule>
> </filter>
>
> <action id="TAB_PUBLISH" link="/incl/tabs/document_publish.xhtml"
> order="53"
> enabled="true" label="action.publish.content" icon="/icons/file.gif">
> <category>VIEW_ACTION_LIST</category>
> <filter-id>publish_document</filter-id>
> <filter-id>no_archiviare</filter-id>
> </action>
>
> public boolean validateGroup()
> {
> String user = currentUser.getName();
> System.out.println(user);
> System.out.println(user.equals("pippo"));
> return user.equals("pippo");
>
> }
>
> ------------------------------
> Windows Live Today: Resta aggiornato sulle attività dei tuoi amici su
> Flickr, Dada e 
> MySpace<http://www.microsoft.com/italy/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:it-it:SI_SB_3:092009>
>
> _______________________________________________
> ECM mailing list
> [email protected]
> http://lists.nuxeo.com/mailman/listinfo/ecm
> To unsubscribe, go to http://lists.nuxeo.com/mailman/options/ecm
>
>
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm
To unsubscribe, go to http://lists.nuxeo.com/mailman/options/ecm

Reply via email to