Hi all
I need to use the enablemnt featuer for an action in the project i am
working on.
the problem is i cannot make it work.
I have a login and logout actions, and I want to programaticly configure the
logout to become enabled in the menu when the loggin has succeeded.

i assume that in class Login.java I should have a IActionFilter interface
implemented and i have done that.
but when i run the program i never get there (I return true all the time and
still the action is not enabled, and i do a print too).

Another question I have is after my plug in is working, how do I access the
actions I setup in the XML file, whether it is to set the visibility and
enablement or to run the action programmatically.

I need to do this because I don't want my Action to have listeners on them
to my other classes, I want to keep it nice and simple.

ILAN
"ilan" <iklein@il.ibm.com> wrote in message
news:b111jt$u19$1@rogue.oti.com...
> Hi all
> I need to use the enablemnt featuer for an action in the project i am
> working on.
> the problem is i cannot make it work.
> I have a login and logout actions, and I want to programaticly configure
the
> logout to become enabled in the menu when the loggin has succeeded.
>
> <action
> label="Log&amp;out"
> icon="icons/sample.gif"
> description="Logout action"
> tooltip="Login toolbar action"
> class="LogoutAction"
> menubarPath="programMenu/LoginGroup"
> id="LogoutAction">
> <enablement>
> <and>
> <objectClass
> name="Login">
> </objectClass>
> <objectState
> name="loginState"
> value="Login">
> </objectState>
> </and>
> </enablement>
>
> i assume that in class Login.java I should have a IActionFilter interface
> implemented and i have done that.
> but when i run the program i never get there (I return true all the time
and
> still the action is not enabled, and i do a print too).
>
> please help me understand this mechanizem
>
> ILAN
>
>

Another question I have is after my plug in is working, how do I access the
actions I setup in the XML file, whether it is to set the visibility and
enablement or to run the action programmatically.

I need to do this because I don't want my Action to have listeners on them
to my other classes, I want to keep it nice and simple.

ILAN
"ilan" <iklein@il.ibm.com> wrote in message
news:b111jt$u19$1@rogue.oti.com...
> Hi all
> I need to use the enablemnt featuer for an action in the project i am
> working on.
> the problem is i cannot make it work.
> I have a login and logout actions, and I want to programaticly configure
the
> logout to become enabled in the menu when the loggin has succeeded.
>
> <action
> label="Log&amp;out"
> icon="icons/sample.gif"
> description="Logout action"
> tooltip="Login toolbar action"
> class="LogoutAction"
> menubarPath="programMenu/LoginGroup"
> id="LogoutAction">
> <enablement>
> <and>
> <objectClass
> name="Login">
> </objectClass>
> <objectState
> name="loginState"
> value="Login">
> </objectState>
> </and>
> </enablement>
>
> i assume that in class Login.java I should have a IActionFilter interface
> implemented and i have done that.
> but when i run the program i never get there (I return true all the time
and
> still the action is not enabled, and i do a print too).
>
> please help me understand this mechanizem
>
> ILAN
>
>