FileDownloadActionListener then Control Flow Case Action

Hi guys!
I'm working on a bounded taskflow and I've a little problem......
I've put a fileDownloadActionListener in a command button and I can download a file fine.Now I want put another action listener to follow the control flow case designed in the bounded taskflow. Is it possible?
this is my commando button code:
<af:commandButton text="Conferma" id="cb1" action="cancel">
            <af:fileDownloadActionListener contentType="application/pdf;charset=UTF-8"
                                           filename="Chiusura#{bindings.RegitrationNumber.inputValue}.pdf"
                                           method="#{pageFlowScope.JasperClient.reportPDFDownload}"/>
          </af:commandButton>thanks!!!

Thanks Zeeshan,
but your advice don't resolve my issue.... I forgot to say that my command button is in a popup dialog, this the entire code
  <af:popup id="p1" animate="false">
      <af:dialog id="d2" title="Siete sicuri"
                 shortDesc="Siete sicuri di voler chiudere il veicolo?"
                 closeIconVisible="false" inlineStyle="width:500px;"
                 type="cancel">
        <af:outputText value="Siete proprio sicuri di voler chiudere questo veicolo?"
                       id="ot1" inlineStyle="width:500px; height:150.0px;"/>
        <f:facet name="buttonBar">
          <af:commandButton text="Conferma" id="cb1"
                            action="#{pageFlowScope.JasperClient.returnToSearch}">
            <af:fileDownloadActionListener contentType="application/pdf;charset=UTF-8"
                                           filename="Chiusura#{bindings.RegitrationNumber.inputValue}.pdf"
                                           method="#{pageFlowScope.JasperClient.reportPDFDownload}"/>
          </af:commandButton>
        </f:facet>
      </af:dialog>
    </af:popup>thanks!!!

Similar Messages

  • Calling a Control Flow Case

    Hello there, i have a task flow with 4 page fragments, and 3 Control Flow Cases, that basically does the navigation.
    Im calling the task flow from a view.jspx that has 2 frames, left and center, the task flow its located at the center frame, and on the left frame i have 4 navigation buttons on that corresponds to each page fragment.
    Now the problem is how can i bind my buttons to my Control Flow Cases of my Task Flow ???
    Edited by: ThDn on Jan 19, 2010 7:20 AM

    Hi,
    Without the use case, it's difficult, but the general idea is to have 4 task flows, one per menu item. Then, you add a single region to your page and change the task flow id in the page def for an EL expression. The EL expression has to point on a managed bean property that returns the right task flow id depending on the context. Finally, you have the menu items call the managed bean to activate the task flow id linked to the item clicked as the current task flow, thus displaying it in the region. That's the basic way to implement a region changing according to an action made in the container page. The Fusion develoepr guide has a more comprehensive and detailed explanation on dynamic regions.
    Regards,
    ~ Simon

  • Dialog control flow case not opening in new browser window

    Hello -
    Using JDev 11gR1.
    I have a page fragment that contains a table of command links like so:
            <af:commandLink text="#{row.id}" id="cl2"
                            action="#{reportRunnerBean.runReportAction}"
                            useWindow="true" windowHeight="500" windowWidth="500">
              <f:param value="#{row.id}" name="reportId" id="p2"/>
            </af:commandLink>the runReportAction method returns the String: "dialog:runReport"
    in my page flow, the page fragment has a control flow case with the outcome "dialog:runReport" that leads to a URL View with the URL setting set to #{pageFlowScope.reportUrl}
    (the reportRunAction places a string in page flow scope with the key of "reportUrl". in case it matters, the url is external to the application)
    When I click on the link, I am directed to the correct URL. However, it does not open in a new browser window - it takes up the main browser window.
    Is there something obvious that I am doing wrong?
    Thank you for reading this,
    -- Scott

    Well, I couldn't figure out why the dialog wasn't working correctly, so I changed my page to use a server listener to handle the logic I wanted and just used af:goLink instead of a command link. That command link above became:
              <af:goLink text="#{row.id}" id="gl1"
                         destination="#{row.reportUrl}"
                         targetFrame="_blank">
                <af:clientAttribute name="reportId" value="#{row.id}"/>
                <af:clientListener method="logReport" type="click"/>
                <af:serverListener type="LogReportEvent"
                                   method="#{reportListBean.logReportInvocation}"/>
              </af:goLink>with the following client listener:
        <af:resource type="javascript">
          function logReport(evt) {
              var component = evt.getSource();
              var reportIdParam = component.getProperty("reportId");
              AdfCustomEvent.queue(component,
                                   "LogReportEvent",
                                   { reportId: reportIdParam}, false);
        </af:resource>and code in the bean:
        public void logReportInvocation(ClientEvent clientEvent) {
                String reportId =
                    (String)clientEvent.getParameters().get("reportId");
                //...do something w/reportId here...
        }Thanks to anyone who took the time to read this.

  • Setting Control-Flow- Case on java class/method

    hello All :D
    i have little problem about control flow case, in my case i've 2 page where before load to the page i'wanna make condition (if-else)
    when the user choose the field, the java class get the value for make true condition. In this case, i wanna implement ControlFlowCase in java class/method, so anyone help..?
    thx
    agungdmt

    Have you considered using router activity - http://download.oracle.com/docs/cd/E17904_01/web.1111/b31974/taskflows_activities.htm#CJHFFGAF ?

  • Control flow case to return from any page to start page!

    I need to use a Image Link at Master Page for go to "Start page". but when i use control flow case don't work.
    How can i assign a control flow case in a master page?
    My djeveloper version is 11.1.2.3

    You have to define what you mean by master page and start page. Are both pages are on the same talk flow?
    What do you mean by 'the navigation doesn't work'? Do you get an error?
    Normally you implement a wild card navigation which points to the start page. This navigation you use as target for the image link.
    Please post the code of your image link.
    Timo

  • Bounded-Task-Flow Page Fragment Control Flow Help

    jDeveloper: 11.1.1.0.2
    I am having an issue trying to figure out the correct way to use control flow cases between a bounded-task-flow with page fragments and an unbounded-task-flow page. We have taken the approach in our application to have a few shell / container pages to host bounded-task-flows made up of page fragments to facilitate re-usability and to speed up development. There are 4 or 5 shell pages on the applications unbounded-task-flow. As of now, we have about 20 page fragments that are implemented as bounded-task-flows. These fragments don't do much now, meaning there is only a single fragment in each bounded-task-flow. The issue I am having is trying to invoke a control flow navigation action from one of the fragments to load a different shell page.
    For Example, shellPage1.jspx contains fragment-flow-1 as a region. In my adfc-config.xml I have shellPage1.jspx and shellPage2.jspx, with control flow cases "toShell1" and "toShell2" respectively connecting the two pages. I have a link's action bound to the "toShell2" within the fragment that makes up fragment-flow-1. When the application is run, shellPage1.jspx and its fragment are displayed. But clicking on the link in the fragment ("toShell2") does absolutely nothing. It does not navigate me to the shellPage2.jspx as expected. What am I doing wrong here or do not understand?
    If the fragment is included as a JSP include, and not a bounded task flow include, everything works as expected. This is not desirable as we then need to copy the fragment's pageDef into the shellPage's pageDef to get the DataControls to function.
    If the faces-config.xml is used instead, and a JSF navigation case is used, it will also work as expected. This is not desirable because we really don't want to be mixing adcf-config and faces-config.
    So I am really stumped here.... Thanks in advance!

    Hi there:
    In your case, the adfc-config.xml has the control flow case between shell pages. And the task-flow-N.xml or your-task-flow.xml for each page fragment by default doesn't inherit control flow case from their containing shell page. In your case, in the page fragment task-flow.xml, you should add a "Parent Action" to flow to shell page2 for example. The outcome of "Parent Action" would be "toShell2" if calling from ShellPage1 page fragment.
    Is this 'Correct' or 'Helpful' for you? Please mark it as so if it does.
    Good luck,
    Alex

  • Set data in page flow begin action?

    Hi,
    I want to set some data in my page flow's begin action, and then access this data in a JSP. In my begin method, I have:
    * @jpf:action
    * @jpf:forward name="index" path="index.jsp"
    protected Forward begin()
    getRequest().setAttribute("foo", "mydata");
    return new Forward("index");
    then, in my index.jsp, I have:
    <netui:label value="{request.foo}" />
    but the JSP is displaying an empty value (i.e., blank).
    Is there something about the page flow begin action such that this can't be done there?
    Thanks,
    Jim

    Hi,
    For my sanity's sake, I tried creating another small test web app in Workshop, and just added code to my begin action. This time, the display of {request.foo} worked.
    So, it looks like there is SOMETHING in my original web app that is causing the data binding to stop working.
    I've been comparing the small test web app to my original web app, and the only thing that is significantly different is at the beginning of the JPF, I have the declaration for a control:
    public class Controller extends PageFlowController
    * @common:control
    * @jc:ManualConfiguration UserIdAttribute="uid" UserBaseDN="dc=whatever,dc=com" Port="389" Host="foo.whatever.com"
    private AccountManager accountManager;
    * @jpf:action
    * @jpf:forward name="index" path="index.jsp"
    protected Forward begin()
    getRequest().setAttribute("foo", "foodata");
    return new Forward("index");
    Would having that control declaration before the begin() method be causing this problem?
    Any other ideas about why this might be happening?
    Thanks,
    Jim

  • Better control flow?

    Actually this is a general question I've been wondering for a while...
    As the title states, I'm looking for a better control flow statement for what I planned.
    I have 4 variables that determine types of pipe in a program in my main class. There are 6 possible pipe types.
    For example Type 1 would have plastic grade = 5-7, color = 2, inner reinforcement = yes etc.
    My main method determines which type the client chose, (if it matched one of the types or not so if all 4 were true then it matches x type.)
    It's going to get really ugly if I use ifs and I don't think using a case statement would work.
    Any suggestions in what I can use?

    Unless you're just referring to getting user input and using it to look up a pipe >type?That would be what I'm doing, if I could figure out how to get the input variables from my applet class to the class that sorts out which pipe they picked.
    Except the variables had to be defined within a method so the try catch statments could be added to them to catch the nfe as most of them are converted from String to int.
    Let me suggest you to use nested switch case to solve the problemHmm, ok, I'll look into that. Would nested ifs suffice?
    Message was edited by:
    Yuriy_Ivanov

  • Why do we require Wildcard control flow rule?

    Hi,
    Why do we require wildcard control flow rule?
    Can anyone please explain me with a scenario?
    Thank you,
    Srinivas

    Wildcard rule means the rule is valid on all the taskflow's pages, so you don't have to wire the case separately from each page. Handy if you have for instance a button with a common action on many pages.
    See this example: http://blogs.oracle.com/jdev11g/2009/10/wildcard_control_flows_for_page_navigation.html

  • Tutorial on AWT/Swing control flow

    Greetings all,
    Just wondering if any of you folks know of a good tutorial on AWT/Swing control flow? I'm doing some pretty complex stuff with a table whose editors call other windows and insert values into the table based on callback objects...weird stuff happening with loss of focus when the other windows come out, etc etc etc.
    I have it working via a series of what I consider kludges, but I would really like to implement it cleanly, and it's looking like that's going to require understanding <ugh> <grin>
    So it looks like it's time that I bit the bullet and got to grips with control flow in AWT/Swing. Is there a tutorial out there that could help me with this?
    Many TIA

    skiaddict1 wrote:
    Let's take your word for it, but if you have the slightest doubt please consider the subject: EDT violation is a classic here.OK sure, but I really don't think I'm violating it. I avoid multi-threading like the plague, and only introduced it for my report writer because I wanted to have a little window advising the user that the report was in the process of being written.Raise your left hand and swear this report writer is not running when you experience the problem you describe! >o(
    OK, this is just kidding, as per the rest of your description, it sounds reasonable now to assume that your problem is not related to EDT violation.
    I'm doing some pretty complex stuff with a table whose editors call other windows and insert values into the table based on callback objects...This summary is a bit worrying, and I thought you would mention problems in the display of the table being edited. But you seem to refer to problems in other windows, or did I misunderstand?
    Or do you mean, loss of focus in the editor still being edited? Can you please clarify what you do and what your problems are?
    In particular, what does the other windows come out mean?OK, I was trying to be sparse with details because I didn't think they were relevant.Actually the worrying seems all the more justified, now that you have described it more extensively: I was afraid that you would raise other windows while editing, and that's the case. I know little of focus though...
    I have a table in window A, one of whose columns has a custom editor which, when a cell in the column is double-clicked, registers itself with window B as a choice-listener (see later) then asks window B to come to the front. Window B, when the user performs a choice amongst the UI elements in there, fires a choice-event to its listener, i.e. the custom editor. At which point the editor saves away the chosen value (for use by getCellEditorValue()), sets the text in the cell appropriately, turns edit mode off via fireEditStopped(), and brings window A back to the front.
    (...) once the custom editor asks window B to come to the front, the table in window A loses focus and when it is brought back to the front, the table's JScrollPane seems to have the focus (visually, it has the focus rectangle around it). Pressing the Tab key has no effect on focus; you have to use the mouse to focus something.I assume you have read the tutorial on using tables in Swing.
    It contains an example where a custom editor is bringing up a dialog: http://download.oracle.com/javase/tutorial/uiswing/components/table.html#editor
    AFAIK, the example does not suffer from focus problems.
    What I am finding, and I reiterate this is new since I rewrote the windowing subsystem for the app (the custom editor was not changed in the rewrite), is that (...)Just what do you call "rewriting the windowing system" (just to rule out the possibility of something Ramboesque)?
    I have no idea why this loss of focus is occurring, and I am at a loss to begin to figure it out. As I wrote above, I have a series of kludges which gets around the symptoms, but I would really rather figure it out and fix it.OK I admit I cannot tell what happens exactly, but:
    1) instead of bringing window B to front, couldn't the editor bring up a dialog B (e.g. using JOptionPane.showXxxDialog() to bring up just the choice panel? The advantage is that it is more "synchronous", you can control when the window A's table model is updated.
    2) what worries me too is that you update the model of the table being edited while you're editing one cell of it? Would it be possible, and make sense in your case, to update this model later (that is, post the model update as an invokeLater(...) call)? I don't see how seeing the table updating underneath helps the user editing its cell, but you may have your reasons.
    What do you call flow control , or control flow in AWT/Swing?Basically, what I am after is something that will help me begin to understand/diagnose problems such as the above when they happen in my code. I am deeply averse to multi-threading (...) Things in my code were working, and that was enough for me.
    But the above behaviour, and another weird behaviour I was having last week, which again I have solved with what I consider a kludge, and again which only began with my new windowing subsystem, have caused me to realise that it's time I really got to grips with this issue.Yes, when they say beware of threads when using Swing , nobody tells to not use threads! Just to be aware of how special Swing is with regards to threads (at least, compared to AWT, that didn't make such warning).
    I would like, for example, to really deep-down understand exactly when listeners for AWT-Swing events get called. I don't really care so much when the events get put on the queue, but I do care when exactly my event handlers will be called. This will help me diagnose problems, I'm sure.Well they get called in the EDT, by some framework code that, in an infinite loop, does something along the lines of:
    - pop next event from the event queue
    - determine which is the target widget
    - let the widget transform the event and send it to all registered listeners
    Now with dialogs, things gets dimmer, because while a dialog is brought up (via a<tt>setVisible(true)</TT> call on the EDT, the EDT is indeed suspended, and a new event thread manages the events for the dialog).
    I'm sorry I have no reference for that behavior, and my description is certainly blurry (and possibly wrong), but I don't think your problem is so much related to threading as I initially thought.
    N.B.: Darryl's second link does features sequence diagrams that try to demonstrate what happen (in a specific example with asynchronous access, but you can derive the simpler, regular, working, from it).OK, yes I saw that diagram, I was offput by the asynchronicity but I will have another look tomorrow also. Thanks againDon't put too much hopes in there, indeed it's definitely not the kind of info I understand you're looking after.
    Much luck all the same, and feel free to come back with your findings, or with more questions, about the initial subject (reference on event flow) and the specific problem (your focus issues with the editor).
    I also cannot end this message without suggesting that you try to reproduce the problem with an SSCCE (http://sscce.org), that you could post here for us to try out. See this recent discussion about the multiple interests of this approach: {message:id=9587964}
    Best regards,
    J.

  • GP Control flow

    Hi,
    I am trying to build a simple process of 3 steps, using GP.
    First step is a user input (Webdynpro Form DC).
    2nd step is User action (WebDynpro Form DC). This Webdynpro Callable Object returns three Result States
    1. Previous: (Process control should go back to Pervious/1st step)
    2. Next: (Process control should go to Next/3rd step)
    3. Cancel: (Process should terminate)
    3rd Step is User acknowledgement (Webdynpro DC) and then process ends.
    I tried using PreCondition and PostCondition blocks, but it can handle only two Result states. So Cancel and Next go to next step. I have workaround using passing context data, but that doesn't seem to be a clean solution.
    I think GP block/action should be able to handle it. I think GP should have "break" and/or "continue" kind of construct to control the process logic. Similar to what's there in any programming language.
    With 2004s SP07, what configuration of Blocks/Action can be done to build this kind of simple process?
    Any thoughts/ideas will be helpful.
    Thanks,
    Abhay

    Hi Abhay,
    I think you can implement this in the following way:
    1. Create a Sequential block.
    2. Assign to this block four action in the following order:
    1. Action 1(User Input)
    2. Action 2(User Action)
    3. Action 3(User acknowledgement)
    4. Background Action which do nothing(Use the standart Jump To Next CO callable object as basis for this action).
    The following details related to Action 2(User Action):
    The "Previous" result state assign to Action 1(User Input) as target. See http://help.sap.com/saphelp_nw2004s/helpdata/en/2d/71a9424092c511e10000000a1550b0/content.htm how assign result states to actions.
    The "Next" result state may be assigned to Action 3(User acknowledgement) or not, because block is sequential.
    The "Cancel" result state should be mapped to "Background Action", in this case "Action 3(User acknowledgement)" will not be started at all and process will be completed.
    Also you can terminate a process by the GP api method:
    IGPProcessRuntime.stopProcess(IGProcessInstance instance, Iuser user) ;
    In this case the fourth is not needed.
    Hope it helps.
    Best regards,
    Aliaksei

  • Use exception to control flow?

    I use validateExcelFile(File excelFile) to validate whether a file has valid excel format,
    when file is in invalid format, I have two options:
    1) return the error message in validate method:
    public String validateExcelFile(File excelFile) {
    String errorMsg = "";
    if(errorMsg.length == 0) {
    return null;
    } else {
    return errorMsg;
    Or
    2)Throw out a exception containing errorMsg
    public void validateExcelFile(File excelFile)
    throws InvalidExcelFormatException {
    String errorMsg = "";
    if(errorMsg.length != 0) {
    throw new InvalidExcelFormatException(errorMsg);
    The context in which the validate method is invoked needs to delete any invalid excel file according to the validate result, option 2 has the good that if there is another validate method and it also throws out the same exception when a file is invalid then I can place the two method in one
    try{
    validateMethod1( excelFile );
    validateMethod2( excelFile );
    } catch (InvalidFormatException ex) {  // deletes invalid file } statement, it is more clear than to check every method's returned error message, but I doubt whether it is good practice to control flow with exception instead of
    flow statements like if.
    Thanks.
    StuartS
    Edited by: StuartS on Oct 24, 2007 8:35 PM

    TimSparq wrote:
    You are correct, it is best practice not to controll flow with exceptions.
    Perhaps your validate message could just return a boolean and you can do something like:
    if (!validateExcelFile(file)) {
    // delete file
    Yeah, I was thinking of it more from a security validation standpoint, but if you simply want to accomplish an action as the result of a bad format, then you're definitely better off having a boolean function.

  • Programatically calling control flows from java code

    Hi all,
    I have a bounded taskFlow that uses pageFragments. This flow is a region in a page(.jspx).
    In my page fragment, I have a inputComboboxListOfValues with a ValueChangeListener code in a java bean.
    I want when a value is changed, to programatically call "controll flow" (this one has: "From Activity Id" -the page fragment with that inputComboboxListOfValues, and "To Activity Id" - the default Activity on this task Flow).
    So when the value change, practically I want to restart the flow programatically and pass the selected value as input parameter.
    Since the inputComboboxListOfValues is not like a button where in the "Action" property you can set the Control Flow and navigate somewhere, the only option I have is to programatically cause navigation from java code (example: the value change listener code).
    Can this be achieved?
    Any advice is helpfull.

    Hi,
    Absolutely, you can do it using the NavigationHandler. Try the following in you value change listener:
    FacesContext context = FacesContext.getcurrentInstance();
    NavigationHandler handler = context.getApplication().getNavigationHandler();
    handler.handleNavigation(context, null, outcome);
    // Render the response after that phase, the button actions should not be called
    context.renderResponse();
    // Add the following line if you want to prevent further value change listeners to be called
    // throw new AbortProcessingException();Regards,
    ~ Simon

  • From where i can understand the control flow and architecture of JVM?

    i want to know control flow and architecture of JVM?
    Where i can know from?
    if some one wish to explain you can here also.

    makpandian wrote:
    No it s not broken.
    As per your experience,tell me some links.Per my experience I don't need links. I could build the VM both from the general level and the specific levels by referring only to the VM spec.
    And I read the book I suggested, first edition, years ago. Although with many other books.
    Conversely if I wanted to find a link now then I would use google.

  • Why do we want use 'Data Flow Task' to 'Data Flow Tast' in Control Flow?

    I found an example in my company's SSIS package folders. In Control Flow, it has one data flow connected to the other. Both of them are importing data from flat file and then exported to database. I think these two are kind of at the same level and cannot
    see any reasons to conncect them together.
    Thanks & Happy Thxgiving,
    Gavin 

    Hi Gavin,
    Just as Arthur said, if there is no relationship between those two data flow tasks, we don’t have to connect them together. If they connect together, maybe there are some relationship between them.
    According to your description, both of the data flow tasks are importing data from flat file and then exported to database. It seems that there is no direct relationship between them. Another possibility is that there is a precedence constraint between them.
    The precedence constraint can be based on a combination of the first execution results and the evaluation of expressions. We can check the issue by double-check the connection string between them.
    The following screenshot is for your reference:
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

Maybe you are looking for