CS3 JS Running an JS within an Action?

I realize that I can create a script that will through an alert as shown below and can be created as an action. So the process would be to run the action and the script will display the alert. If the user clicks the Yes button the script would run the next action. If they click No than the process would stop to allow the user to fix the issue.
var myDialog = new Window('dialog', ' Details');
myDialog.fDetails = myDialog.add('panel',undefined,'Has this file been processed correctly?');
myDialog.fDetails.Btngroup = myDialog.fDetails.add('group');
myDialog.fDetails.Btngroup.orientation = 'row';
myDialog.fDetails.Btngroup.Ybtn = myDialog.fDetails.Btngroup.add('button', undefined, 'Yes');
myDialog.fDetails.Btngroup.Nbtn = myDialog.fDetails.Btngroup.add('button', undefined, 'No');
myDialog.fDetails.Btngroup.Ybtn.onClick = function() {
    //continue and run this action
myDialog.fDetails.Btngroup.Nbtn.onClick = function(){
   //does these changes
Would it be possible to add a script within an action and so if the result of the alert is Yes continue with the action is the result is No stop the action.
Cheers, John.

I do agree the logical process would be to have the entire process in a script.  What I'm doing is putting a workflow process in before an action the guys here use. Rather than take away the ability for them to adjust the action currently used, as they would not be able to edit the JS I thought having both could work. The work around has been to create an action from the JS that if they click on the Yes then the script will call the next action. I would of liked to have the users only click on one action and not risk then going to the second action first which checks the workflow.

Similar Messages

  • ER - Problem with ADF Faces filter when running ADF Faces within a portlet

    I am attempting to get ADF Faces to run within Oracle Portal, i.e. within a portlet using the JPDK.
    This, I am sure you are about to tell me, is not something that is fully supported, as yet.
    However, I have been successful in getting MyFaces to run within a portlet, by customizing the form tag.
    MyFaces, it seems, keeps track of the current viewid by storing it in the session, then uses this within the viewhandler and navigationhandler to determine the next view to load, based on the faces-config.xml navigation entries.
    By customizing the form tag it is then possible to retrieve this viewid from the faces context and outputting it in the form's action parameter.
    It is also possible, with a few more customizations, to run JSF RI within a portlet, i.e. by adding a custom viewhandler and loading a session variable with the current viewid from the faces context, then retrieving the viewid and outputting it as the action string in the customized form tag .
    Unfortunately there does not appear to be any way of getting ADF Faces (EA19 version) to run as a portlet, with either the RI or with MyFaces.
    I have configured a basic .jspx document in the <showPage> tags of the provider.xml file.
    This uses only the form tag and a few input tags and works when executed directly within my portlet project in JDeveloper (http://localhost:8988/TestJSFAppContext/faces/htdocs/facesportlet/index.jspx) using a redirectfilter (*.jspx htdocs -> /faces/htdocs).
    It is not possible to run ADF Faces with RI as a portlet since customization of the ADF Faces ViewHandler appears not to be supported.
    When attempting to run this with MyFaces as a portlet, however, I get the following message:
    oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl verifyFilterIsInstalled
    WARNING: The AdfFacesFilter has not been installed. ADF Faces requires this filter for proper execution.
    I am having difficulty in understanding as to why this is happening but am guessing it must be something to do with either redirect URLs or due to the .jspx files being under /htdocs, i.e. the ADF Faces renderkit is checking that the ADF Faces filter is configured but the check fails since the filter does not execute.
    I have configured the filter in web.xml, as detailed in the documentation:
      <filter>
        <filter-name>adfFaces</filter-name>
        <filter-class>oracle.adf.view.faces.webapp.AdfFacesFilter</filter-class>
      </filter>
      <filter-mapping>
        <filter-name>adfFaces</filter-name>
        <servlet-name>ADF Faces Servlet</servlet-name>
      </filter-mapping>
    <servlet>
        <servlet-name>ADF Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
      </servlet>
      <servlet-mapping>
        <servlet-name>ADF Faces Servlet</servlet-name>
        <url-pattern>/faces/*</url-pattern>
      </servlet-mapping>and have modified the provider.xml file as follows:-
          <renderer class="oracle.portal.provider.v2.render.RenderManager">
             <renderContainer>true</renderContainer>
             <renderCustomize>true</renderCustomize>
             <autoRedirect>true</autoRedirect>
             <contentType>text/html</contentType>
      <showPage>/faces/htdocs/facesportlet/index.jspx</showPage>        
             <editPage>/htdocs/facesportlet/FacesportletEditPage.jsp</editPage>
             <editDefaultsPage>/htdocs/facesportlet/FacesportletEditDefaultsPage.jsp</editDefaultsPage>
          </renderer>with the following tags also set:
       <session>true</session>
       <passAllUrlParams>true</passAllUrlParams>In order to ensure that the session stays alive so that the views are retrieved.
    As I say, the page loads OK when run directly within the JPDK project within JDeveloper, with a redirect filter (*.jspx -> /faces/*.jspx) but not when run from within Oracle Portal.
    In fact I have found that this filter is very sensitive, i.e. ADF Faces will not run in any project unless the configuration is exactly as above.
    It seems that the MyFaces team have got around the problem of maintaining session state with redirections but that ADF Faces needs the page URL that is passed in to the filter to be consistent.
    Is there some way around this, i.e. some kind of customization that I can implement to get the filter working?
    Thnks

    I have found a way to go round the problem.
    I use the servlet 2.4/jsp 2.0 route and then
    change the web.xml header to the servlet 2.3/jsp 1.2
    format. Everything then works fine after this!
    Please fix this for production.
    Behnam

  • Running a process within a java program

    Hi
    I have code that runs a process for performance monitoring on an installed system. When I run the code standalone as below, it runs fine. If I include the code below inside another java program, the process fails to execute and the status returned is non-zero (failed to execute).
    The process requires the PATH and LD_LIBRARY_PATH to be set which seem to be set correctly when i print them out. So, I am not sure why the process doesnot run when included within another running java program.
    Can someone please point out what I maybe missing?
    Thanks!!
    public class RunPerf
      private static final String CLASS_NAME = "RunPerf"; private static Process proc = null;
    public static void main(String[] args)
        String INSTALLPERF_SAW_UNIX_COMMAND = "sawexe" + " " + "-perf";
             StringBuffer path1 = new StringBuffer(30);StringBuffer ldlibpath1 = new StringBuffer(30);
        System.setProperty("user.home", "/home/user");
        StringBuilder commandToExecute = new StringBuilder();
       commandToExecute.append(System.getProperty("user.home"));
       commandToExecute.append(File.separator);
       commandToExecute.append("web");
       commandToExecute.append(File.separator);
       commandToExecute.append("bin");
       commandToExecute.append(File.separator);
         String path = System.getProperty("user.home")+"/server/bin/" + File.pathSeparator + System.getProperty("user.home")+ "/web/bin";
           path1.append( path );
           path1.append( File.separator );
           path1.append( System.getProperty("java.library.path") );
           path1.append( File.separator );
          String env_value = null;
         String[] ldargs = {"LD_LIBRARY_PATH"};
         for (String env: ldargs) {
                env_value = System.getenv(env);
             System.out.println("LD_LIBRARY_PATH value before setting property= " + env_value);
                if (env_value != null) {
               String newldlibpath = System.getProperty("user.home")+ "/server/bin/" + File.pathSeparator + System.getProperty("user.homee")+ "/web/bin" ;
                ldlibpath1.append(newldlibpath);
                ldlibpath1.append(File.separator);
                   ldlibpath1.append(env_value);
                   ldlibpath1.append( File.separator);
                    System.out.format("%s=%s%n", env,ldlibpath1.toString());
                } else {
                    System.out.format("%s is not assigned.%n", env);
                 commandToExecute.append(INSTALLPERF_SAW_UNIX_COMMAND);
                   String[] envp =   { "USER_HOME =" + "/home/user",          "PATH=" + path1.toString(), "LD_LIBRARY_PATH=" + ldlibpath1.toString() };
               int status = executeCommand1(commandToExecute.toString(), envp,null);
                   if(status != 0){
                          System.out.println("Unable to run perf Unix") ;
         public static int executeCommand1(String command,String[] envp, Logger logger) {
            String METHOD_NAME = "executeCommand1";
            if (logger == null) { logger = Logger.getAnonymousLogger();}
            logger.entering(CLASS_NAME, METHOD_NAME, new Object[] { command, envp});
            Runtime runtime = Runtime.getRuntime();
            runtime.addShutdownHook(new Thread() {
                        public void run() {
                            if (proc != null) {     try {  proc.destroy();  if (proc != null) { proc.destroy();  }
                                } catch (Exception e) {
                                    e.printStackTrace(); }      }      }     });               
                           int retVal = 0;
          File cwd = new File(System.getProperty("user.home")+ "/web/bin/");               
                           try {
                               if (envp != null) {   proc = runtime.exec(command, envp,cwd); }
                                       else {  proc = runtime.exec(command); }
                               Thread t_err =        new Thread(new StreamReader(proc.getErrorStream()));
                               t_err.start();
                               Thread t_in =     new Thread(new StreamReader(proc.getInputStream()));
                               t_in.start();
                               retVal = proc.waitFor(); } catch (IOException e) {        retVal = -1;   logger.severe("IOException");      }
                                     catch (Exception e) { retVal = -1;        logger.severe("Exception");                  }
                     logger.exiting(CLASS_NAME, METHOD_NAME, retVal);
                     return retVal;
    static class StreamReader implements Runnable {
            InputStream in;
            public StreamReader(InputStream genericStream) {   in = genericStream;   }
            public void run() {
                try {
                    String strTemp = null;
                    BufferedReader buffReader = new BufferedReader(new InputStreamReader(in));
                    while ((strTemp = buffReader.readLine()) != null) {
                        System.out.println(strTemp);                }
                } catch (Exception e) {               e.printStackTrace();            }        }    }}

    Either set up a script before the program runs or have the
    program write a script file which contains the statements
    that need to be executed. Then you will be able to
    execute the script with a call to
    Runtime.getRuntime().exec()Mark

  • How do I get my CS3 to run on my new Mac Book Pro? The License seems to be tied to my older mac.

    I have an old iMac, with my Adobe Suite on it. I am now using a MacBook Pro Retina as my primary computer and can not get my Photoshop CS3 to run on it.
    The license seems to be tied to my old iMac. How do I get this to work? ---without spending more $$ THANKS!

    Try Adobe's serial number chat first.
    http://helpx.adobe.com/x-productkb/global/service1.html
    Also if you can't find your old serial number and only have the CS3 upgrade serial, Adobe can bypass this using a "challenge code".
    Error "This serial number is not for a qualifying product" | CS6, CS5.5, CS5
    Good luck, let me know if that solved it.
    Gene

  • Using a method of a class within an action event

    Good day.
    A beginner question.
    It is possible to use within an action event (triggered by a view of the button)
    instantiate a class from another java project and use a method?
    If it is possible how to do?
    Thank you

    hi carlos,
    yes it is possible. as a reference please have a look at this document How to Reference External JAR Files in Web Dynpro DC in SAP NW Portal 7.3
    basically the steps are the same (adding dependency, public parts, etc.) for a ejb or java project.
    regards,
    christian

  • Error while running PB40 - initial data entry action

    Hi Friends,
    I am running PB40 initial data entry action. The values that I am giving in the Personnel Officer field are not getting accepted.
    Its giving me error : *Entry does not exist in T526 (check entry)*
    I have checked T526 table in SE16 and its showing me all the values that have been maintained for my administrator group APPL.
    "PINCH" feature is also maintained where the Tclas B- applicant data has value APPL.
    In SU3 also, I have maintained SGR - APPL.
    Please advise what else cab done to correct this error.

    reema
    have u activated switch between OM and Personal office
    PPVAC PREF just check it out and let me know

  • Can a plugin like NIK Dfine be used within an action?

    I am trying to automated some of my mundane tasks in PS CC and I am wondering can a plugin like Nik Dfine be launched within an action? If so will it pause at the right point and then pressing OK continue through the remainder of the action.
    Thanks
    John

    PS will record the invoking of the filter without isszes, but it may not be able to look inside specifics of some effects. This is entirely up to whether the publishers chose to include this functionality and allow recording values in actions. Simply try.
    MYlenium

  • Using a brush within an action

    I'm trying to find a way to incorporate a brush into my action without actually having to stop and using the brush and then continue. More specifically, I would like to apply the art history to the entire image as a step within an action, but I want it to automatically be applied without me having to actually brush it.
    Is there a way to do this?

    What about using snapshots, and copy/paste, instead of the history brush?
    Or, you could use a path that crosses the canvas and stroke it with a very large history brush. To apply a path to an action use the action flyout menu "insert path".
    I'd probably just copy/paste and arrange layers, avoiding the history panel altogether.

  • Cs3 stops running when opening a picture file

    HI, Ihave CS3 extended running on Vista.Program ran find for months until yesterday, Whenever I try to open a picture file CS3 stops working and shut down. It doesnt matter what type file. I removed program amd reinstalled, still got same probelem. Any suggestions on how to solve? thanks Craig

    Well, when stuff stops working it means that something happened that made it go haywire so what did you install/configure/do before this happened? have you installed some photoshop plugins? updated some drivers? installed some new software?
    Another (far fetched) possibility would be that your anti-virus program is up to no good after an auto update so try temporarily deactivating it, maybe that will solve it.
    Or if it's as Chris says, a problem with the printer driver, try uninstalling the driver completely, not just disable it or maybe go to Control Panel->Printers, right click on Adobe PDF(or some other "printer" from the list) and select "Set As Default Printer"

  • Is it possible to use a Script within an action? - it doesn't seem to work...

    Is it possible to use a Script within an action? - it doesn't seem to work...
    I'm using the 'round any corner' script from SATO Hiroyuki..., and  I'd like to apply it to only one anchor point (on multiple boxes)

    An Action can call a script from the File>Scripts menu by means of the Add Menu Item Action step. But it will only work for the duration of your Illustrator work session. If you quit AI and then restart it, the Add Menu Item step will be blank. This bug has been reported for FOUR FULL VERSIONS of this sloppy program.
    However, if I am correctly understanding your description of what you are trying to automate, an Action will not be able to automate the selection of a particular anchorpoint in multiple paths. You'd have to make the selections all at first. Whether the script would then apply as desired to each path depends on how the script is written.
    JET

  • Using static Delegates within Struts' Action classes

    HI,
    I have a struts app. I also have several delegate classes that connect to ejbs (session beans) used within my action classes. I was thinking about putting the delegates into a helper class as static properties. That way my action classes can just reference the same delegate. I don't want to have to create a new instance of a delegate with every request an action class handles.
    However, I'm wondering if this will cause synchronization issues with multiple requests being handle, as our site handles a heavy load of requests. Any suggestions would be appreciated?

    static will work - but IMO here's a better option
    1. Have multiple delegates (one per module - one for login, another for business process1, another for business process2)
    Advantages : Cleaner segregation, easier maintenance and readability.
    2. Maintain the business delegates as individual classes and access them through instance variables from action.
    Advantages : All the advantages of inheritance, one business process may be the child of another - for example you can have a BasePaymentDelegate and then a specific CreditCardPaymentDelegate extending it. Similarly a PaypalDelegate may also extend BasePaymentDelegate and then common functionality can be moved to the Base class.
    3. Cache the delegate instance variables in your action - so you dont have to create one per invocation. Having said that, all the business delegate methods should be stateless - all the data to a business method should be passed as local params.
    Advantages : Local variables are thread safe as long as the object itself are thread safe. So no synchronization issues.
    Hope that helps some
    Ram.

  • Prompt user to select multiple objects within an action

    Hi there,
    In illustrator, is it possible to select multiple objects within an action or prompt the user to do so when needed ?
    I know about the note trick but I am not quite happy with this one. I would like another solution if there is any.
    Thanks !!

    In order for a macro (Action) or script to select something, it has to have access to some criteria by which to target the object(s). Actions are much more limited in this regard than scripts, but there are some "hooks" you can employ.
    For example, Actions will record the assignment of a Note in the Attributes palette. So if your Action at least starts with the object(s) of interest selected, you can take that opportunity to record the entry of a string in the Note field. Thereafter, if the object(s) become deselected, the Action (or another Action) can re-select them by means of the Select Object(s)... step. When manipulation of the target object(s) is done, you can record changing its note to nothing, to prevet its being seleced by the same Select Object(s)... step later.
    JET

  • Custom run-time menus within dynamically called sub-VIs?

    How do you use custom run-time menus within sub-VIs that have been dynamically called? I'm using Labview 6.02.

    Since you say within subVIs, I am assuming that you have the subVIs open their front panels when called. Each subVI must have the RTM defined when the subVI is created. You can use the same RTM for each one (use the open function in the menu editor).
    If necessary, you can dynamically add and remove menu items using the Application Control->Menu functions. I have some subVIs that add items to the main RTM when they are loaded and remove the items when they finish.
    Rob

  • Running chown in a Folder Action

    When I drop a file into my Drop Box from another machine (Mac or Windows) on my network, the file's owner is set to 'nobody'. I would like the owner to be set to my user name 'steve'. I wrote the following script and assigned it as a Folder Action to my Drop Box:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #FFEE80;
    overflow: auto;" title="this text can be pasted into the Script Editor">on adding folder items to this_folder after receiving these_items
    try
    set the item_count to the number of items in these_items
    tell application "Finder"
    repeat with this_item in these_items
    set this_path to the quoted form of the POSIX path of this_item
    set this_script to ("/usr/sbin/chown steve " & this_path)
    --display dialog this_script buttons {"OK"}
    do shell script this_script user name "root" password "my root password" with administrator privileges
    end repeat
    end tell
    on error error_message number error_number
    if the error_number is not -128 then
    tell application "Finder"
    activate
    display dialog error_message buttons {"Cancel"} default button 1 giving up after 120
    end tell
    end if
    end try
    end adding folder items to</pre>
    When I drop a file into the folder, I get the error message "Finder got an error: A privilege violation occurred." (If I uncomment the "display dialog" line, the shell command looks correct.)
    Is there a way to run chown from a Folder Action?
    What I really want to know is if there's a way to make me the owner of any files dropped into my Drop Box but that's not an AppleScript question.

    Can you confirm that you have the root user enabled for login? For security reasons (as the PW is stored in the script), I would recommend replacing
    do shell script this_script user name "root" password "my root password" with administrator privileges
    with
    do shell script this_script user name "your Admin shortname" password the_password with administrator privileges
    at the beginning of the script, place this line:
    set the_password to text returned of (display dialog "Enter Administrator Password" default answer "" with hidden answer)
    as there is no reason to run the script with root as you are. A regular admin account will suffice. The "with administrator privileges" is equivalent to running a command with "sudo".

  • In Captivate 7, how can I call another action from within an action?

    I have a conditional action called FakeSuccessRewind. Now I need to call another function called ShowGrayBalloons02 from within its Else statement, but I couldn't find something like "Execute Advanced Action." Can anybody share some tips here? Thanks!
    Below are screenshots of my two actions:
    1) FakeSuccessRewind (if/else). Here I need to call the 2nd action from the Else statement, underneath the statement Go to the next slide.
    2) ShowGrayBalloons02. Note this function has five seperate runs when the variable is decrementing from 5-1.
    Thanks a lot!
    Melissa

    You can't, you need to add the other action into the first one.

Maybe you are looking for