MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Action bars

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
misi01
Advanced


Joined: 02 Dec 2002
Posts: 629
Topics: 176
Location: Stockholm, Sweden

PostPosted: Wed Nov 05, 2014 4:26 am    Post subject: Action bars Reply with quote

My first experiment at creating/designing a panel with action bar choices.

I have created a panel, but what I can't seem to find anywhere is how to disable (programmatically) an action bar option.
Let's assume I have a menu option with 3 choices.
Depending on what the user selects (somewhere on the panel), I might want to disable options 2 & 3.
Another choice might result in options 1 & 3 being disabled and option 2 now being enabled.

Is this something I can do via my panel/via a call to Rexx or do I have to program/define it in a DTL for the panel.
_________________
Michael
Back to top
View user's profile Send private message Send e-mail
misi01
Advanced


Joined: 02 Dec 2002
Posts: 629
Topics: 176
Location: Stockholm, Sweden

PostPosted: Wed Nov 05, 2014 4:30 am    Post subject: Reply with quote

Forgot to give an example above. On our system, if I enter 3.4, one of the action bar options is RefMode.

If I select this, I see that one of the options (List execute/List retrieve) is enabled, the other disabled. If I select the (one) option I can, the enabled/disabled are reversed
_________________
Michael
Back to top
View user's profile Send private message Send e-mail
misi01
Advanced


Joined: 02 Dec 2002
Posts: 629
Topics: 176
Location: Stockholm, Sweden

PostPosted: Wed Nov 05, 2014 9:43 am    Post subject: Found the answer (in the end) Reply with quote

You need something like this in your panel definition (basically, it's the UNAVAIL parm connected to a variable and the setting of the variable to 0/1 that does the trick)
Code:

)ABC desc(Menu)                                                       
PDC DESC('Save') UNAVAIL(Save) ACTION RUN(SAVE)                       
PDC DESC('End')  UNAVAIL(End)  ACTION RUN(END)                         
PDC DESC('Cancel') ACTION RUN(CANCEL)                                 
PDC DESC('Select') ACTION RUN(CANCEL)                                 
)ABCINIT                                                               
.zvars = 'MENUX'                                                       
&menux = 3      /* By setting it to 3, we make option 3 the default */
&save = 0       /* Set to 1 to make the Save option unavailable */     
&end  = 0       /* Set to 1 to make the End option unavailable */     

_________________
Michael
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group