Using wildcard in return activity in bounded taskflow

This is my situation:
I have a page to which the user may only navigate through a router activity, and I want the user to be authenticated too. So I thought I'd set the router activity (and a filter) and the page inside a bounded taskflow.
But now I have a problem exiting the bounded taskflow. I don't want to specify all the possible outcomes and create different return activities. I have tabs on each page and I want the user to be able to click a tab and go to that page. But when I set a wildcard the navigation doesn't work.
What does work is this:
    <control-flow-rule id="__22">
      <from-activity-id id="__23">rr_start</from-activity-id>
      <control-flow-case id="__25">
        <from-outcome id="__28">toAvIndex</from-outcome>
        <to-activity-id id="__24">returnFromStartFlow</to-activity-id>
      </control-flow-case>
    </control-flow-rule>
    <task-flow-return id="returnFromStartFlow">
      <outcome id="__21">
        <name>toAvIndex</name>
      </outcome>
    </task-flow-return>But this allows me only to navigate to AvIndex and I have 4 more pages I want to navigate to.
What I would like to have is this:
    <control-flow-rule id="__22">
      <from-activity-id id="__23">rr_start</from-activity-id>
      <control-flow-case id="__25">
        <from-outcome id="__28">*</from-outcome>
        <to-activity-id id="__24">returnFromStartFlow</to-activity-id>
      </control-flow-case>
    </control-flow-rule>
    <task-flow-return id="returnFromStartFlow">
      <outcome id="__21">
        <name>*</name>
      </outcome>
    </task-flow-return>and let the unbounded taskflow check the outcome and do the navigation. Could this be possible?

Wendy,
have you considered to use a taskflow template for the navigation and use this template for your taskflows?
Only other thing which come to mind is to set a parameter from inside your flow and check this parameter in a method in the parent flow to decide where to go.
Timo

Similar Messages

  • Bounded Taskflows with Fragments And Return Activity

    Hi,
    I have Bounded Taskflow that requires-transaction and based on fragments, which means I should commit or rollback at the end of the taskflow. Since the documentation clearly states that you shouldn't add return activities to Bounded taskflows with fragments, I could call this taskflow from another taskflow and add it to the page as a region. Is it a best practice?
    Best Regards,
    Salim

    Hi,
    in the usecase you describe - yes
    Frank

  • Popup ReturnListener, get taskflow return activity

    Hi OTN,
    On my ADF JSF page there is a button, calling a bounded taskflow in a popup.
    In button's popup ReturnListener I need to know which return activity ended the taskflow.
    How can I retrieve this information?
    I expected the ReturnEvent object to hold this information, seems but it doesn't.
        public void createInfPopupReturnListener(ReturnEvent e) {
            System.out.println("e = " + e);       
            System.out.println("e.getReturnValue() = " + e.getReturnValue());
            System.out.println("e.getReturnParameters() = " + e.getReturnParameters());
            if(e.getReturnParameters() != null) {
                System.out.println("e.getReturnParameters().size() = " + e.getReturnParameters().size());
    e = org.apache.myfaces.trinidad.event.ReturnEvent[component=RichCommandToolbarButton[UIXFacesBeanImpl, id=ctb1], returnValue=null]
    e.getReturnValue() = null
    e.getReturnParameters() = {}
    e.getReturnParameters().size() = 0JDeveloper 11.1.1.3
    Thanks.

    Hi Frank,
    I have defined a taskflow return value as a pageFlowScoped bean variable.
    <return-value-definition id="__98">
          <name id="__97">returnValue1</name>
          <value>#{pageFlowScope.CreateInfPageFlowBean.returnValue}</value>
          <class>java.lang.String</class>
        </return-value-definition>With a following taskflow bean code:
        private String returnValue;
        public void setOkReturnValue() {
            returnValue = "ok";
        public void setCancelReturnValue() {
            returnValue = "cancel";
        public String getReturnValue() {
            return this.returnValue;
        }And placed setOk and setCancel method-call activities before two task-flow-return activities.
    Is that the right way?

  • How to go back to parents taskflow without using taskflow return activity

    Hi all,
    How can i go back to parents taskflow without using taskflow return activity?
    With Regards,
    Wai Phyo

    Hi,
    when you enter a sub flow, the parent flow is put on a stack for later resume. You ecit a bounded task flow that you called using task flow call activity by exiting the task flow (return activity). There is no other option to return to the parent flow. If the bounded task flow executes as a region, then you use a parent activity to navigate the enclosing flow, or the root flow. However, regions seldom use return activities anyway.
    Hope this answers your question
    Frank

  • Usecase: Taskflow Return activity for redirect to third party sites and bac

    Hi all,
    I have 3 taskflows - TF1 --- calls --- TF2 -- calls --- TF3
    In TF3, I have a redirection to a third party site (say like a payment gateway). The third party site redirects user to TF3 back and I process the information and I need to continue with the activities in TF2. Because of the intermediate external call, the return activity is not being of much use to me in this case. Is there some way by which I can return back to TF2 and resume the activities post TF3?
    Thanks,
    Srini

    Hi,
    use a URL activity and then pass the following return URL as a parameter
    https://blogs.oracle.com/jdevotnharvest/entry/how_to_efficiently_redirect_an
    Frank

  • How to programmatically capture outcome for Taskflow Return Activity?

    Hi,
    Can we capture outcome of Taskflow return activity programmatically?
    After Taskflow is returned using one of the TaskFlow Return Activity .. I need to capture which return activity was processed.
    Could anyone let me know which API we could use.. and/or any sample.
    Thanks.
    Amit

    Hi,
    an option would be to define a task flow outcome parameter and have a method call activities on the control cases of each of the return activities. The method call activities would set the return parameter value accordingly so that from the calling application you can tell which return activity was used
    Frank

  • How can we use Bounded Taskflow in another project.

    Greetings!
    Suppose we have 2 projects: projectA and projectB.
    In projectB we have 4 bounded taskflows: T1, T2, T3, T4.
    In projectA we have a view with a dynamic region, text input for digits and a command button.
    How can we fill our dynamic region with taskflows from projectB, by typing a number of it and pressing a button.
    Thank you.

    Hi,
    Yes, I know.
    However, I'm under the impression that this is not the preferred method. All the documentation describe the ADF library method and I cannot find any description about putting them in a separate project.
    All said, it seems to kind of work, using the 'jar dependencies', except for taskflows with a nested taskflow from another project. An I still need to import them as adf library.
    We'd like to develop our taskflows separately using a short development lifecycle. Putting each of them in a separate application and publish and import them in the main application seems to be too complicated and takes to much time, everytime.
    Am I correct that the shortest development lifecycle is to have all the taskflows in our webapplication, and have full debug and hot-swap functionality?
    Ciao
    Aino

  • What does the return activity do in BTF executed within a region?

    All of us know that the return activity in the bounded task flow used to return from a called bounded task flow to the caller (i.e. to exit the task flow), this concept is clear when the bounded task is called from task flow call activity. But can we use the return activity in a bounded task flow that is intended to be executed in a region, but the question is how to use it, and what does it exactly mean to have a return activity in a bounded task flow that is executed within a region? Is there any use case for this scenario?

    Hi,
    regions don't handle task flow returns and the taskflow would just exit leaving the region area blank, One option to use returnvactivuties in egions is to configure a region navigation listener and - if the current view id value returns null - to refresh the region so the task flow starts all over again. To pass values back in such a use case you would use a managed bean instance you pass as an argument to the taskflow in a region.
    Frank

  • Exception Handling in bounded taskflows - expected behaviour

    Hi,
    I'm currently reviewing exception handling in bounded task flows and some things does not seems to be very clear for me.
    (q1) Does it make sense that a bounded task flow calls a method (via a method activity) defined on the page definition of another page (outside of the BTF) by using a #{data.xxxmyPageDef.myMethodName.execute} EL expression?
    (q2) Is is correct to expect the application to execute the method marked as ExceptionHandler in the taskflow, whenever an exception occurs?
    (q3) I created 5 different scenarios where I call a service method which throws an exception, from within a page fragment of the BTF.
    (q3 – sc1) Call a service method through the binding layer of the current page (by using #{bindings.xxx.execute})
    Result: A dialog containing the exception message appears.
    This is what I expected. Althought, the exception handler method does not seems to be invoked.(q3 – sc2) Call a service method through a task flow method activity using #{bindings.xxx.execute}
    Result: A dialog containing the exception message appears.
    This is what I expected. Althought, the exception handler method does not seems to be invoked.(q3 – sc3) Call a service method through a task flow method activity using #{data.myPageFragementPagedef.xxx.execute} (accessing the pageDef of the page fragment)
    Result: Nothing happens.
    This is not what I expected. Although, the exception handler method does nog seems to be invoked, I expect the ADF Error Handler to create a FacesMessage.(q3 – sc4) Call a service method through a task flow method activity using #{data.myPageContainingThePageFragmentPageDef.xxx.execute} (accessing the page containing the BTF region)
    Result: Nothing happens.
    This is not what I expected. Although, the exception handler method does nog seems to be invoked, I expect the ADF Error Handler to create a FacesMessage. (q3 – sc5) Call a service method through a task flow method activity using #{data.aPageOutsideTheBTFPageDef.xxx.execute} (accessing a page outside the BTW)
    Result: Nothing happens.
    This is not what I expected. Although, the exception handler method does nog seems to be invoked, I expect the ADF Error Handler to create a FacesMessage. (q4) How can it be possible that – without an exception handler – exceptions occur when calling method activities, without the exceptions being translated to FacesMessages?
    Thanks in advance,
    Koen Verhulst
    JDeveloper 11.1.1.4

    Koen,
    +(q1) Does it make sense that a bounded task flow calls a method (via a method activity) defined on the page definition of another page (outside of the BTF) by using a #{data.xxxmyPageDef.myMethodName.execute} EL expression?+
    No. Exceptions should be handled locally.
    +(q2) Is is correct to expect the application to execute the method marked as ExceptionHandler in the taskflow, whenever an exception occurs?+
    Only for exceptions that are before Render Response. The Render Response Phase is not handled in ADFc. So exceptions that occur in managed beans may fall through
    +(q3) I created 5 different scenarios where I call a service method which throws an exception, from within a page fragment of the BTF.+
    +(q3 – sc1) Call a service method through the binding layer of the current page (by using #{bindings.xxx.execute}) Result: A dialog containing the exception message appears.+
    This is what I expected. Althought, the exception handler method does not seems to be invoked.
    The binding layer has an error handler you can override in the DataBinings.cpx file
    +(q3 – sc2) Call a service method through a task flow method activity using #{bindings.xxx.execute}+
    Result: A dialog containing the exception message appears.
    This is what I expected. Althought, the exception handler method does not seems to be invoked.
    Again, you use the binding layer to invoke the service
    +(q3 – sc3) Call a service method through a task flow method activity using #{data.myPageFragementPagedef.xxx.execute} (accessing the pageDef of the page fragment)+
    Result: Nothing happens.
    This is not what I expected. Although, the exception handler method does nog seems to be invoked, I expect the ADF Error Handler to create a FacesMessage.
    Never use such a call. Its bad practice as there is no guarantee the container you reference is active. Always have the method call activity have its own binding defined when accessing a method call activity. I know there are lots of example floating aroundthat you #{data ...} and many are from 10.1.3. This should be avoided alltogether though
    +(q3 – sc4) Call a service method through a task flow method activity using #{data.myPageContainingThePageFragmentPageDef.xxx.execute} (accessing the page containing the BTF region)+
    Result: Nothing happens.
    This is not what I expected. Although, the exception handler method does not seems to be invoked, I expect the ADF Error Handler to create a FacesMessage.
    Again, this is not a proper use of the ADF framework.
    +(q3 – sc5) Call a service method through a task flow method activity using #{data.aPageOutsideTheBTFPageDef.xxx.execute} (accessing a page outside the BTW)+
    Result: Nothing happens. This is not what I expected. Although, the exception handler method does nog seems to be invoked, I expect the ADF Error Handler to create a FacesMessage.
    accessing a page outside the BTW (!!!) This should ring a worst practices alarm on your laptop (obviously doesn't do it either)
    +(q4) How can it be possible that – without an exception handler – exceptions occur when calling method activities, without the exceptions being translated to FacesMessages?+
    Exceptions are not handled in a single place but stacked. The business service raises an exception and passes it to the binding layer if not handled. The binding layer handles the exception and if it can't passes it to ADFc. ADFc can handle this exception if it is not during Render Response.
    Bottom line: There is no single point of exception handling. So as a recommendation for best practices
    - Catch and handle exceptions as close as possible to their origins
    - If things can go wrong, thy will - use try/catch blocks in managed beans
    - Use an exception handling activity in all bounded task flows. In the case of task flow call activities being used exceptions can bubble up to the caller. However, this would take users out of their current application context
    - Exceptions not handled in ADFc can be intercepted by overriding the application task flow exception handler (used by the exception handler activities). This would give you a chance e.g. to handle issues during Render Response
    - Never fight the framework, never bend the framework: Don't use out of scope access to page definitions and resources. Exception handling is not a replacement for bad code practices (sorry for saying this, its not meant to be rude) :-)
    Though I don't have a qualified numbers of bugs open for exception handling in ADF between 11.1.1.4 and now (and some that are open), but there are issues reported in this area. If there is something that really feels wrong, please go ahead and file a bug and provide a test case for development to have a look. The Render Response issue, for example is something we are aware of and that is in discussion (afaik knows, there is a change in exception handling in JSF 2 that may have an impact to what we can do in ADFc).
    thanks
    Frank

  • Bounded Taskflow Exception Handler not working with Page Fragements

    I have one bounded - taskflow task-flow-definition
    <?xml version="1.0" encoding="windows-1252" ?>
    <adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
      <task-flow-definition id="task-flow-definition">
        <default-activity>view1</default-activity>
        <managed-bean>
          <managed-bean-name>backing_main</managed-bean-name>
          <managed-bean-class>view.backing.Main</managed-bean-class>
          <managed-bean-scope>pageFlow</managed-bean-scope>
        </managed-bean>
        <managed-bean>
          <managed-bean-name>backing_view1</managed-bean-name>
          <managed-bean-class>view.backing.View1</managed-bean-class>
          <managed-bean-scope>pageFlow</managed-bean-scope>
        </managed-bean>
        <managed-bean>
          <managed-bean-name>backing_view2</managed-bean-name>
          <managed-bean-class>view.backing.View2</managed-bean-class>
          <managed-bean-scope>pageFlow</managed-bean-scope>
        </managed-bean>
        <exception-handler>view2</exception-handler>
        <view id="view1">
          <page>/view1.jsff</page>
        </view>
        <view id="view2">
          <page>/view2.jsff</page>
        </view>
        <use-page-fragments/>
      </task-flow-definition>
    </adfc-config>view1.jsff contains one command button, which calls one ActionListener
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <af:commandButton text="commandButton 1" actionListener="#{pageFlowScope.backing_view1.callMyFunction}"
                        binding="#{pageFlowScope.backing_view1.commandButton1}"
                        id="commandButton1"/>
      <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_view1-->
    </jsp:root>view1.java callMyFunction throws an Exception
        public void callMyFunction(ActionEvent event) throws Exception{
            throw new Exception();
        }view2.jsff is an exception handler
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <af:activeOutputText value="Exception Occured"
                           binding="#{pageFlowScope.backing_view2.activeOutputText1}"
                           id="activeOutputText1"
                           inlineStyle="font-size:xx-large; color:red;"/>
      <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_view2-->
    </jsp:root>above taskflow is dragged-drop as a Region in one file main.jspx
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <jsp:directive.page contentType="text/html;charset=windows-1252"/>
      <f:view>
        <af:document binding="#{pageFlowScope.backing_main.document1}"
                     id="document1">
          <af:form binding="#{pageFlowScope.backing_main.form1}" id="form1">
            <af:region value="#{bindings.taskflowdefinition1.regionModel}"
                       id="taskf1"
                       binding="#{pageFlowScope.backing_main.taskf1}"/>
          </af:form>
        </af:document>
      </f:view>
      <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_main-->
    </jsp:root>*pressing a commandButton on view1.jsff throws an Exception as expected but does not go to exceptionHandler [view2.jsff]*
    However, this does work with Bounded Task-Flow without page fragments , view1.jspx contains one button, calling one method which throws an Exception,
    view2.jspx is an Exception Handler, and in this case it redirects to the view2.jspx [error page]
    any ideas?
    thanks

    Hi,
    Pretty much. However, you got the event part wrong, which is mostly my fault here. First, let put down some general JSF facts about event handling.
    1. http://java.sun.com/javaee/5/docs/api/javax/faces/component/UIComponent.html#queueEvent(javax.faces.event.FacesEvent)
    2. So, basically, queuing an event on a component means queuing it on its parent until you reach the UIViewRoot that will really actually queue it. That strategy allows iterating components to intercept event queued on their children to record the row index as well so that the data model can be synchronized correctly during the broadcast phase (see http://java.sun.com/javaee/5/docs/api/javax/faces/component/UIData.html#queueEvent(javax.faces.event.FacesEvent) and http://java.sun.com/javaee/5/docs/api/javax/faces/component/UIData.html#broadcast(javax.faces.event.FacesEvent))
    3. Exceptions that aren't handled by the exception handler are thrown during broadcast or various process* methods.
    So, the catch component must leverage these facts to intercept events queued on its children (by overriding queueEvent method) wrapping the original event in a custom on that flag the catch component itself as the source of the event. The result will be that the broadcast method of the catch component will be called to handle the event. The broadcast method must then unwrap the event (to get the original event), gets the original source, then call originalSource.broadcast(originalEvent) within a try-catch block.
    Does it make any more sense put that way? Note that it's an obscure part of JSF so I cannot make it incredibly simple either.
    Regards,
    ~ Simon

  • Security problem? Bounded taskflow and sessionid in loopback url

    Hi,
    We just had a security evaluation of our public site. We use ADF in several places on the site (through iframes).
    The applications are made up of bounded taskflows. The request Url reads like:
    http://127.0.0.1:7101/test/faces/adf.task-flow?adf.tfId=task-flow-definition&adf.tfDoc=/WEB-INF/task-flow-definition.xml
    and it returns :
    http://127.0.0.1:7101/test/faces/adf.task-flow;jsessionid=R9YWRvkLJyD6lYC79DyTmTl6fxj177x1ZflDcJy4mrlcYmDVSmn0!-1545839156?adf.tfId=task-flow-definition&adf.tfDoc=/WEB-INF/task-flow-definition.xml&_afrLoop=97476727347664&_afrWindowMode=0&_afrWindowId=null
    According to the security evaluation the ;jsessionid=xxx in the header is a security problem, you could in principle copy the url and send it to a different computer and continue the session from there!
    The jsessionid is put there by the loop back script.
    Is there any way of making the loop back script not put the jsessionid in the url?
    Is it a security problem?
    regards
    Johnny

    Hi, thank you for the opinion. I am not talking about hijacking my own session id. But "malware" or a spy in som way could "sniff" the url and send it off to another computer!
    Look at this url, it explains it even better :
    http://fralef.org/tomcat-disable-jsessionid-in-url.html
    Again it is not my opinion but that of a security firm.
    Cookies are not disabled on my computer ( and our security firms), the case is real and how bounded taskflows work.
    Here is the code from the loop back:
    var sess = ";jsessionid=TdJhRvVGHnYZtTfzsMBpmDcSnLVHW0SzgBWl0gQm2tPQ45lwsq1W!-1545839156";
    if (sess.length > 0)
    href += sess;
    After the redirect the cookies "takes" over and the jsession id is not shown again.
    But it is still shown initially.
    And we do use https on our site, my code was just an illustration.
    Johnny
    Edited by: user11345344 on Feb 28, 2013 8:44 PM

  • Calling task flows return activity from Jspx page.

    Hi ,
    Using JDev11.1.1.6
    I have created template for home page, drag and dropped the task flow(Main Task flow) as region.
    Main task flow contains other 2 taskflows with control flows and other 2 taskflows contains Task flow return activity to navigate back to Main task flow.
    I need to call task flow return activity from jspx page.
    How it can be acheived? can you please suggest me.
    Thanks and Regards,
    Raj Gopal K

    Hi,
    My use case is to close the child task flow and navigate back to main task flow. This should be done through homePage.jspx(whch contains main task flow).
    What i have done:
    Having page template which has logout and home page links. Use this template to create homePage.jspx, Next drag the main task flow to create a region inside the homePage.jspx.
    Thanks,
    Rajgopal K

  • ADF UI Shell Pattern- How to pass parameter to the called bounded taskflow?

    The sample Launcher class of the ADF UI Shell template has the following code:
        private void _launchActivity(String title, String taskflowId, boolean newTab)
          try
            if (newTab)
              TabContext.getCurrentInstance().addTab(
                title,
                taskflowId);
            else
              TabContext.getCurrentInstance().addOrSelectTab(
                title,
                taskflowId);
          catch (TabContext.TabOverflowException toe)
            // causes a dialog to be displayed to the user saying that there are
            // too many tabs open - the new tab will not be opened...
            toe.handleDefault();
        }How do I pass a parameter to the bounded taskflow that will be launched?
    For example:
    1) I have a list of employees displayed on a tab.
    2) When I select a record and click an edit button inside the tab, A separate tab should open with the corresponding employee to be edited.
    How then could I pass the employee id to the edit-employee-task-flow?
    I can't think on how/what would a "calling taskflow" come into this picture?
    help!
    pino
    Edited by: pino on 16-Dec-2009 05:57
    Edited by: pino on 16-Dec-2009 09:59

    Hi Arunkumar,
    Thanks for the info. I was actually using EJB DataControls, and something similar to what you have suggested can also be done programmatically, but I wanted to follow the one promoted in the Fusion Developers' Guide to take advantage of the "ADF task flow framework" (like pass-by-value, pageflowScope, etc.) especially that we were having problems when we will just follow the procedures that was presented in the tutorials(I mean that- not all the procedures in the tutorials will work on an application based on the UI Shell pattern which do have multiple active taskflows.).
    For instance, you have an active List of employees in one tab, and two other tabs that try to edit employee records. If these employee list and employee edit forms are based on a single iterator binding, then what would happen to the information in the two edit forms on each separate tabs if you selected another row on the employee list tab? -- In our case, the edit tabs' values synchronized to the new selected row in the list tab.
    There are sure many work-arounds for these, but I am looking for a cleaner, clearer, or best way to handle this scenario.
    regards,
    pino

  • How to search in Pages for any number or any character, using wildcards

    Is it possible in Pages to use wildcards to search for any instance of any number? For example, I want to find all occurrences of any one or two digits followed by a colon, such as 8: or 37:
    If I can't use wildcards, is there any other way to search, other than tediously searching for every instance of 1, every instance of 2, etc.?
    Thanks!
    Sue

    Hello
    Here is an enhanced version.
    --[SCRIPT highlight_ digitspluscolon]
    Enregistrer le script en tant que Script : highlight_ digitspluscolon.scpt
    déplacer le fichier ainsi créé dans le dossier
    <VolumeDeDémarrage>:Users:<votreCompte>:Library:Scripts:Applications:Pages:
    Il vous faudra peut-être créer le dossier Pages et peut-être même le dossier Applications.
    Ouvrir un document traitement de textes Pages
    aller au menu Scripts , choisir Pages puis choisir highlight_ digitspluscolon
    Dans les éléments de texte, l'arrière plan des groupes de chiffres
    suivis d'un caractère deux points sera mis en rouge.
    --=====
    L'aide du Finder explique:
    L'Utilitaire AppleScript permet d'activer le Menu des scripts :
    Ouvrez l'Utilitaire AppleScript situé dans le dossier Applications/AppleScript.
    Cochez la case "Afficher le menu des scripts dans la barre de menus".
    --=====
    Save the script as a Script: highlight_ digitspluscolon.scpt
    Move the newly created file into the folder:
    <startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Pages:
    Maybe you would have to create the folder Pages and even the folder Applications by yourself.
    Open a Pages word processor document.
    go to the Scripts Menu, choose Pages, then choose "highlight_ digitspluscolon"
    In the text objects, the background of groups of digits
    with a trailing colon will be set to red.
    --=====
    The Finder's Help explains:
    To make the Script menu appear:
    Open the AppleScript utility located in Applications/AppleScript.
    Select the "Show Script Menu in menu bar" checkbox.
    --=====
    Yvan KOENIG (VALLAURIS, France)
    2010/07/17 -- enhanced to treat also text boxes and shapes
    --=====
    on run
    local en_liste, le_dernier, un_groupe, le_premier, recul
    local les_boites, une_boite, les_formes, une_forme
    Try to treat the main text layer
    tell application "Pages"
    try
    set le_document to name of document 1
    tell document 1 to set le_texte to body text
    on error
    set le_texte to ""
    end try
    end tell -- Pages
    if le_texte > "" then
    set en_liste to my decoupe(le_texte, ":")
    set le_dernier to 0
    tell application "Pages" to tell document le_document
    repeat with i from 1 to count of en_liste
    set un_groupe to item i of en_liste
    set le_dernier to le_dernier + 1 + (count of un_groupe)
    set recul to 0
    repeat with j from 1 to 10
    if character -j of un_groupe is in "0123456789" then
    set recul to -j
    else
    exit repeat
    end if
    end repeat -- with j
    if recul < 0 then
    set le_premier to le_dernier + recul
    set character background color of characters le_premier thru le_dernier to {65535, 0, 0}
    end if -- recul < 0
    end repeat -- with i
    end tell -- Pages…
    end if -- le_texte > ""
    Try to treat text boxes
    try
    tell application "Pages" to tell document le_document to set les_boites to every graphic whose class is text box
    on error
    set les_boites to {}
    end try
    if les_boites is not {} then
    repeat with une_boite in les_boites
    tell application "Pages" to tell document 1
    tell une_boite to set le_texte to object text
    end tell -- Pages…
    my highlight(le_document, une_boite, le_texte)
    end repeat
    end if -- with f
    Try to treat shapes
    try
    tell application "Pages" to tell document 1 to set les_formes to every graphic whose class is shape
    on error
    set les_formes to {}
    end try
    if les_formes is not {} then
    repeat with f from 1 to count of les_formes
    I know that using whose is more efficient than using an index but, in Pages '09, whose doesn't apply to shapes. *)
    tell application "Pages" to tell document 1
    set une_forme to item f of les_formes
    tell une_forme to set le_texte to object text
    end tell -- Pages
    my highlight(le_document, une_forme, le_texte)
    end repeat -- with f
    end if
    end run
    --=====
    on highlight(un_document, un_contenant, son_Texte)
    local en_liste, le_dernier, un_groupe, recul, le_premier
    set en_liste to my decoupe(son_Texte, ":")
    set le_dernier to 0
    tell application "Pages" to tell document un_document to tell un_contenant to tell object text
    repeat with i from 1 to count of en_liste
    set un_groupe to item i of en_liste
    set le_dernier to le_dernier + 1 + (count of un_groupe)
    set recul to 0
    try (*
    Useful if a shape was erroneously pasted in a text box. *)
    repeat with j from 1 to 10
    if character -j of un_groupe is in "0123456789" then
    set recul to -j
    else
    exit repeat
    end if
    end repeat
    end try
    if recul < 0 then
    set le_premier to le_dernier + recul
    set character background color of characters le_premier thru le_dernier to {65535, 0, 0}
    end if
    end repeat
    end tell -- Pages
    end highlight
    --=====
    on decoupe(t, d)
    local oTIDs, l
    set oTIDs to AppleScript's text item delimiters
    set AppleScript's text item delimiters to d
    set l to text items of t
    set AppleScript's text item delimiters to oTIDs
    return l
    end decoupe
    --=====
    --[/SCRIPT]
    It scans the main text layer in Word Processor documents.
    It scans text boxes and shape in Word Processor and Layout documents.
    Is it useful to scan :
    headers, footers, tables ?
    Yvan KOENIG (VALLAURIS, France) samedi 17 juillet 2010 21:07:04

  • Using wildcards in import statement

    I typically use wildcards in my import statements. For example:
    import javax.swing.*;
    Are there any advantages, though, in specifying exactly which classes I am importing?
    For example,
    import javax.swing.JPanel;
    import javax.swing.JLabel;
    import javax.swing.JEditorPane;
    import java.swing.JProgressBar;
    // etc.
    Specigically, is the resulting class file any smaller if I specify exactly which classes to use and does the Java runtime engine load faster if I specify exactly which classes I use in the import statemetents?
    Thanks,

    Import has precisely zero runtime impact. I believe it is used to help locate the specified class at runtime. Take the following 2 simple source files:
    import java.util.Vector;
    //import java.util.*;
    public class VectorTest
         public static void main( String[] args )
              Vector v = new Vector();
              v.add("Item 1");
              v.add("Item 2");
              System.out.println( v.get(1) );
    public class Vector
         public boolean add(Object o)
              return true;
         public Object get(int index)
              return "doh!";
    }1) Run the code as is and "Item 2" is displayed
    2) Recompile the code using the generic import and "doh!" is displayed.
    The point is that by fully qualifying the import statement you are sure you are executing the correct class and not just some class that happens to be lying around somewhere in your classpath.

Maybe you are looking for

  • Error While validating OAGIS Document

    Hi All, My requirement is that i need to send a OAGIS 9.0 file from the Host Trading partner to the Remote trading partner. So, i have defined the OAGIS document in the Custom Document protocol over Generic Busines Protocol.I does not get any error w

  • See callerID in Tiger when someone calls my nokia?

    Hello. I'm wondering if there are any applications to display callerID on my imac when my nokia 6230 rings so I can keep it silent and still catch phones regardless of it's location in my office. Seems BT could handle this sort of of thing. Thanks.

  • Solution Directory - Business Scenario

    Hello, I am trying to find the job management - job monitoring scenario under SAP ERP. I had everything set up under SAP ECC and still can see it there. But now that I switched my systems to SAP ERP, I would like to select it there, but cannot find i

  • Assigning multiple users to one action dynamically using Webdynpro

    Hi Experts, In my scenario we need to send a request to list of people dynamically . How can we pass list of people through context parameter in the block. I am passing the value through context but only first user in the list getting task in UWL. It

  • Flex Frameworks ?

    Hello ,   I am a Flex programmer ,  a pretty good one I would like to think.  Right now I am exploring the idea of using frameworks , Cairngorm , Mate , PureMVC.  I've seen some of their examples and "View Source Code" , however , I am a little put o