error after using a servlet in ADF - unable to choose another line in the table

Hello

I print a button and when I select a row in a table call a servlet to download. After I open or save the document, I can't make another selection from the table or another action.
The table has a row selection active.
The servlet are part of a workflow.

Here's the code for the sevlet and my version of jdev is 11.1.1.2.0

SerializableAttribute public class DownloadServlet extends HttpServlet {}

@Override
Public Sub init (ServletConfig config) throws ServletException {}
Super.init (config);
}

public void doGet (HttpServletRequest request,
HttpServletResponse response) throws ServletException,.
IOException {}


String ID = null;
Den String = null;

InitialContext ic;
try {}
IC = new world;
} catch (NamingException e) {}
}
DataSource ds = null;
Connection Conn = null;
PreparedStatement cStmt = null;
ResultSet rset = null;
Byte [] bdata = null;
String rezult_null = "";
id_fisier_lcl = request.getParameter ("id");
den_fisier_lcl = request.getParameter ("fileName");



rezult_null = ' <? XML version=\"1.0\" encoding =------"UTF - 8\ '? "> \n ' +.
"a fost arhivat Fisierul < body > < / Body >";



try {}
IC = new world;
DS = (DataSource) ic.lookup("jdbc/ConnDS");
Conn = ds.getConnection ();
cStmt = conn.prepareStatement ("commit");
cStmt.execute ();
Conn.Commit ();
cStmt = conn.prepareStatement ("SELECT a.item FROM table a WHERE = a.id" + id);

RSet = cStmt.executeQuery ();
If (rset.next ()) {}
clob = weblogic.jdbc.wrapper.Clob
(weblogic.jdbc.wrapper.Clob) rset.getClob ('content');
oracle.sql.CLOB oclob = (oracle.sql.CLOB) clob.getVendorObj ();

bdata = new byte [(int) oclob.length ()];
InputStream is = oclob.getAsciiStream ();
is. Read (bdata);
RSet.Close ();
cStmt.close ();

} else {}
bdata = new byte [(int) rezult_null.length ()];
bdata = rezult_null.getBytes ();
RSet.Close ();
cStmt.close ();

}
} catch (NamingException e) {}
} catch (SQLException e) {}
}

String username_lcl = null;
username_lcl =
ADFContext.getCurrent () .getSecurityContext () .getUserName ();





OutputStream outputStream = response.getOutputStream ();
String mimetype = "";

FacesContext facesContext = FacesContext.getCurrentInstance ();
response.setContentType ((mimetype! = null)? mimetype: "application/x-download");
response.setHeader ("Content-Disposition", "attachment; filename =------"' + den_fisier_lcl + '. '" xml\' ");

try {}
outputStream.write (bdata);
outputStream.flush ();
outputStream.close ();
}
catch (Exception e) {}
e.printStackTrace ();
FacesMessage msg =
new FacesMessage (FacesMessage.SEVERITY_ERROR, e.getMessage (),)
"");
facesContext.addMessage (null, msg);

}

}


}

How can I solve this problem?

Thank you.

Hello

have you seen this?

http://download.Oracle.com/docs/CD/E21764_01/apirefs.1111/e12419/tagdoc/af_fileDownloadActionListener.html

If you want to continue with your approach, then a way out of your problem might be to add an af:clientListener on the command button. The JavaScript function would be

function onDownload(evt){

  evt.noResponseExpected();

}

Frank

Tags: Java

Similar Questions

  • Error after using the FND_RESPONSIBILITY_PKG. DELETE_ROW

    Hello

    I get the error after using the FND_RESPONSIBILITY_PKG. DELETE_ROW, when I want to create respectively with the same name.

    Oracle error 20001:Oracle - 20001:FND_CANT_INSERT_USER_ROLE has been detected in FND_USER_RESP_GROUPS_API. INSERT_ASSIGNMENT

    Dear user,

    check the next ML doc
    839423.1
    559347.1
    330350.1

    Kind regards
    Taj

  • Add the line in the table of the ADF

    I am trying to add a new line to the table of the ADF. Here are my steps:
    1 create new entities to tables (new-> EJB-> entities from Tables)
    2. create the Session Bean (new->-> Session Bean EJB) with all required methods for earlier of the entity created
    3 create the control of data off of it (right click-> session bean create a Data control)-, it creates 'testFindAll '.
    4. After these steps, I drag / drop my "testFindAll" of data controls to form and create the table
    5. now I do drag & drop operation Create since my 'testFindAll-> operations", create a button and move the action to create CreateInsert

    And now, eating disorders: ((...)) When I click on the button to add the new line I get null pointer exception. Here is the part of the trace:

    java.lang.NullPointerException
    at oracle.adf.model.adapter.bean.UpdatableBeanDataControl.createRowData(UpdatableBeanDataControl.java:137)
    at oracle.adf.model.bean.DCBeanDataControl.createRowData(DCBeanDataControl.java:642)
    at oracle.adf.model.bean.DCDataVO.doCreateData(DCDataVO.java:870)
    at oracle.adf.model.bean.DCDataRow.create(DCDataRow.java:306)
    at oracle.jbo.server.ViewRowImpl.callCreate(ViewRowImpl.java:432)
    at oracle.jbo.server.ViewObjectImpl.createInstance(ViewObjectImpl.java:4679)
    at oracle.adf.model.bean.DCDataVO.createInstance(DCDataVO.java:567)
    at oracle.jbo.server.QueryCollection.createRowWithEntities(QueryCollection.java:1818)
    at oracle.jbo.server.ViewRowSetImpl.createRowWithEntities(ViewRowSetImpl.java:2211)
    at oracle.jbo.server.ViewRowSetImpl.doCreateAndInitRow(ViewRowSetImpl.java:2257)
    at oracle.jbo.server.ViewRowSetImpl.createRow(ViewRowSetImpl.java:2233)
    at oracle.jbo.server.ViewObjectImpl.createRow(ViewObjectImpl.java:9404)
    at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1223)
    at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2120)
    at oracle.adf.model.bean.DCBeanDataControl.invokeOperation(DCBeanDataControl.java:464)
    at oracle.adf.model.adapter.AdapterDCService.invokeOperation(AdapterDCService.java:307)
    at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:693)
    at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.executeEvent(PageLifecycleImpl.java:394)
    at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding._execute(FacesCtrlActionBinding.java:217)
    at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding.execute(FacesCtrlActionBinding.java:176)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    ...


    I know I can do it if you create ViewObject rather than Tables and SessionBean entities. But I need this approach.

    Thank you very much!

    Hi Goran,

    What is your version of JDev? You try with EJB 3.0 or 2.1? I just tried (with 3.0) and it works fine (tested in JDev 11.1.1.2.0).

    Here's my pagedef

    
    

    Infact, I don't have to change the action of creation at CreateInsert. By default, it is CreateInsert only.

    Arun-

  • EBS 12.1.3 - 500 Internal Server Error - after using FNDCPASS to change the SYSADMIN password

    Hello guys,.

    We run ebs 12.1.3 on OEL6. At the opening session today, I was invited to display the system administrator password. I ended up using FNDCPASS for successful change:

    FNDCPASS apps/apps 0 Y USER SYSADMIN of system/xxxxx xxxxx

    Since then I could not connect in the applications with its URL - I get

    '500 internal Server Error' Servlet error: an exception occurred. Current application deployment descriptors do not allow for the inclusion in this response. For more details, please see the application log.

    The Apache logs have a few errors:

    CD $LOG_HOME/ora/10.1.3/Apache
    error_log.1406246400 more
    [Fri 25 Jul 06:18:18 2014] [error] [client 10.1.101.81] [ecid: 0, 1406283498:10.1.100.43:32121:0:390] file does not exist: / u02/app
    lfind/inst/apps/OFD1_ofindev01/portal/favicon.ico
    [Fri 25 Jul 06:18:19 2014] [error] [client 10.1.101.81] [ecid: 1406283499:10.1.100.43:4002:0:505, 0] mod_oc4j: could not find a failover process oc4j for destination session request: application://oacore (no island or a group).
    [Fri 25 Jul 06:18:20 2014] [error] [client 10.1.101.81] [ecid: 1406283500:10.1.100.43:4005:0:476, 0] mod_oc4j: could not find a failover process oc4j for destination session request: application://oacore (no island or a group).
    [Fri 25 Jul 06:23:21 2014] [Warning] oc4j_socket_recvfull [client 10.1.101.81] expired
    [Fri 25 Jul 06:23:21 2014] [Warning] oc4j_socket_recvfull [client 10.1.101.81] expired
    [Fri 25 Jul 06:23:21 2014] [error] [client 10.1.101.81] [ecid: 1406283500:10.1.100.43:4005:0:476, 0] mod_oc4j: application to the OC4J ofind

    J’ai " $FND_TOP/patch/115/bin/ojspCompile.pl perl - compile - hunting Pei 2 "and run cmclean.sql but the problem persists."

    What Miss me?

    Thank you

    Mathias

    Mathias,

    Here is the command on the right:

    FNDCPASS apps / 0 system / fnd ORACLE FND

    This is mentioned in (Doc ID 437260.1) mentioned above.

    Thank you

    Hussein

  • How can I default first line below the selected line in the table of the adf

    Hello

    I use Jdeveloper 11 g,
    I created Adf quick query with table and changed selectionListener table as #{CustRMMap.onRMGroupNameChange}.
    and when I click on find fast query no row is selected.
    I want the first row to be selected / highlighted by default when I click search.

    Patel Imran

    You can also set an attributeValue in pagedef.xml
    bind this attributeValue with column of your table. This sets the value of the selected line to the variable attruibute.
    Will now link this with your desired component attributeValue.
    Put partial trigger on the component that should display this value.
    This will save you to write custom code and use the default table selection listener property, which marks the first default line.

    Apart from this, if you want to govern the first default line of managed bean selection use this code...

    + _Table = selectionEvent.getSource ((richeTableau)) richeTableau; + *
    + / / the model in the Collection is the object that provides the structured data.
    + / / for rendering table +.
    + TableModel CollectionModel = table.getValue ((CollectionModel)); + *
    + / / the ADF object that implements the CollectionModel is JUCtrlHierBinding. IT +.
    + / /is wrapped by the CollectionModel API.
    + JUCtrlHierBinding adfTableBinding = tableModel.getWrappedData ((JUCtrlHierBinding)); + *
    + / / Acess the iterator ADF, binding that is used with the binding table ADF +.
    + DCIteratorBinding tableIteratorBinding = adfTableBinding.getDCIteratorBinding (); + *

    + / / the role of this method is to synchronize the table feature selection +.
    + / / with the selection of the model of the ADF +.
    + Object selectedRowData = table.getSelectedRowData (); + *
    + / / cast of JUCtrlHierNodeBinding, which is the subject of the ADF that is +.
    + / line/a +.
    + JUCtrlHierNodeBinding nodeBinding = selectedRowData (JUCtrlHierNodeBinding); + *
    + / / get the key of the node binding line and set it as the current line in the +.
    + / / iterator +.
    + Key rwKey = nodeBinding.getRowKey (); + *
    tableIteratorBinding.setCurrentRowWithKey (rwKey.toStringFormat (true)); + *

    and another way on the right is a custom like this code:

    + public void setDefaultRow (int count) {/ / call this method your method of selection custom, rom pass the line of the line to select index. count = 0, will select first row + *}

    + try {+ *}
    Object oldRowKey = tblMag.getRowKey (); *
    + try {+ *}
    This.

    .getSelectedRowKeys () .clear ();
    *
    * +} catch (System.Exception e) {+ *}
    System.out.println (e.getMessage ()); *
    +}+
    This..setRowIndex (count);
    *
    RKS RowKeySet =. getSelectedRowKeys();
    *
    (RKS). Add(. getRowKey());
    *
    RKS =. getSelectedRowKeys();
    *
    +.setRowKey (oldRowKey); +

    * +} catch (System.Exception e) {+ *}
    System.out.println ("error:" e.getMessage ()); + *
    +}+
    +}+

    Hope this helps

    Concerning
    Maryline Roussel

  • How to display a message after inserting line in the table...

    Hello

    I want to display a message after inserting rows in the table as *' you have inserted a new line with success *'.


    I use the ADF button createinsert to insert the rows in table.after that I am stolen it.


    After commit I want to display message for the user.for what I need to do.





    Please help me.





    Sanchez.

    Double-click the validation button, to link Action property dialog will appear and then create a method of bean managed for the validation button.
    Then, add the following code to the method:

    public String saveButton_action() {}
    BindingContainer links = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding ("Commit");
    Object result = operationBinding.execute ();
    Note "!" operator has been removed from the default code.
    {if (OperationBinding.GetErrors (). IsEmpty())}
    FacesContext ctx = FacesContext.getCurrentInstance ();
    FacesMessage saveMsg is new FacesMessage ("saved successfully");.
    ctx.addMessage (null, saveMsg);
    }
    Returns a null value.
    }

    Then, restore the ActionListener value.

    I hope this helps.

  • Selected color change of line to the table in the ADF

    Hi all

    I'm new to ADF. I use Jdeveloper 11.1.2.4 version.

    My requirement is when I chose several lines, color of the line should be changed to red.

    I dragged and dropped ViewObject of the Department in the form of a table on a page and RowSelection to the multiple. I need color of selected lines/lines to be past to red. How can achieve us?

    I wrote the method selectionListner on the table, in which I get the details of the selected line. How can we apply color to selected lines.

    Thanks in advance.

    Best regards

    Claude Reynier.

    How about you create a variable temporary level VO with a default null value.

    Now on the selection listener retrieves the current line and change the value of this variable 'Y '.

    In the inlineStyle write an EL, if the value of this variable is 'Y' changes the color.

    Thank you

  • When I filled a form field using a query SQL result is displayed but not registered in the table.

    I write in the topic, I have created a form and in some of their fields, I used a SQL query to get information from a table based on the user who has been logging.

    The information displayed well, but when I press "Send button" loses information and the field in the table is shown empty.


    Anyone know what is happening?

    I enclose below a picture of the problem

    Concerning

    Problema DB APEX.jpg

    Hi ANTHONY,.

    ANTHONY wrote:

    I give you the credentials of my database, I hope you could do it works and most importantly, showing me what the error care...

    Feel free to change what you want in the application

    https://Apex.Oracle.com/pls/Apex/f?p=4550:1:2838412118981:

    BANCO_PRUEBAS

    ADMIN

    password

    It is interesting that, when I use APEX 5.0.1.00.06, I have some errors form appearing not using APEX 4.1.0.00.32

    Check your 77569 application-> Page 1. I have modified the page element attributes. Now it's working.

    Here are the changes (I will explain for P1_NOMBRE, did the same for the P1_APELLIDOS and P1_CATEGORIA):

    • 'Source' has become article attributed to him include:

    Source: Replacement always, value that exists in session state

    Source type: column database

    Source of value or an expression: NUMBER

    • The "Default" article now the following attributes:

    By default of Type: PL/SQL function body

    Default value:

    DECLARE
    
      L_NOMBRE B_LISTA_EMPLEADOS.NOMBRE%TYPE;
    
    BEGIN
    
      select NOMBRE
      into   L_NOMBRE
      from   B_LISTA_EMPLEADOS
      where  USERNAME = :APP_USER;
    
      RETURN L_NOMBRE;
    
    EXCEPTION
      WHEN NO_DATA_FOUND THEN
      RETURN NULL;
    
    END;
    

    Kind regards

    Kiran

  • ADF: How to get all rowKeys for the table displayed in the page

    Hello

    I have table "COMPANY" where the 'COMPANY_ID' column is the primary key. I created a page simple jspx with:

    (1) a text entry to accept new IDs of company

    (2) Insert button.

    (3) af:table which displays all available in "SOCIETY" company ID

    When the user tries to enter a company code that is already present in the table I want to compare with the keys of the row of the table displayed below and if it's an already existing, I would like to send a friendly message for the user and put an end to the movement.

    So, how to extract all line keys to compare?

    Thanks in advance.

    Here's a way to check if you use the OperationBinding exception class:

    operationBinding.execute ();

    If (! operationBinding.getErrors () .isEmpty ()) {}

    There is an error

    List errors = operationBinding.getErrors ();

    Browse the list of hollow and see if there is an exception of your restrictions

    }

  • Disable the button when there is no line in the table of the ADF.

    Hello! How can I say that this button is disabled if no data in the table of the ADF?

    Best regards, Debuger!

    Hello

    Disabled = ' #{bindings. " "{MyIterator.estimatedRowCount-eq 0}" button
    MyIterator is the iterator to which binds table.

    Kind regards

  • How to make a selected line in the table of the adf

    Hello
    I add a new line to my table as below.

    BindingContainer DCBindingContainer =
    (DCBindingContainer) ADFUtil.evaluateEL("#{bindings}");
    DCIteratorBinding iter = bindingContainer.findIteratorBinding("IfwSystemBrandView1Iterator");
    ViewObject vo = iter.getViewObject ();
    line = vo.createRow ();
    row.setNewRowState (Row.STATUS_INITIALIZED);
    vo.insertRow (row);

    This code adds a newline at the end of the table.
    I want this new line to select once it gets added.
    How to get there?

    Thank you
    Praveen

    So that the new row to select, you need to add the key to the new line created in the SelectedRowKeys of the table.
    (1) create a link to the table named "table".
    (2) after the insertion of the new line, add the following code:

    Key to the new line should be added to the key defined for the selected table row to be selected.
    table.getSelectedRowKeys () .add (row.getKey ());

    Thank you
    Nini

  • Error after using the registry work around for KB3072630

    I have problems with an MSI installation. At first, I was getting a registry ddl error that I used the registry subkey entry 'RemappedElevatedProxiesPolicy = 1' work around. Now, the mistakes of process with service error 1719 Windows install could not be found (from the application).  Logging of MSIEXEC product "Custom Server rejected Action - incorrect context", while the Windows Logs/Applications event: service error 1719 Windows install could not be accessed. Any ideas? It is on Win Server Ent. 2008 R2

    I have problems with an MSI installation. At first, I was getting a registry ddl error that I used the registry subkey entry 'RemappedElevatedProxiesPolicy = 1' work around. Now, the mistakes of process with service error 1719 Windows install could not be found (from the application).  Logging of MSIEXEC product "Custom Server rejected Action - incorrect context", while the Windows Logs/Applications event: service error 1719 Windows install could not be accessed. Any ideas? It is on Win Server. Ent 2008 R2

    Hello

    Post your question in the TechNet Server Forums, as your question kindly is beyond the scope of these Forums.

    http://social.technet.Microsoft.com/forums/WindowsServer/en-us/home?category=WindowsServer

    See you soon.

  • Get the access denied error after using the rights delegation wizard in Active Directory

    I used the rights delegation wizard to grant permissions to a group in AD and do not always receive either the access message when I try to change anything on an existing object, I can however create new objects without any problem. What can I do to fix this?

    Original title: Delegation issue in AD

    Hello mhipke,

    Your Windows XP question is more complex than what is generally answered in the Microsoft Answers forums, as it deals with Active Directory. It is better suited for the IT Pro TechNet public. Please ask your question in the ITPRO Technet Windows Server Directory Services.

    I have provided the link for you:
    http://social.technet.Microsoft.com/forums/en-us/winserverDS/threads

    Sincerely,

    Marilyn

  • Error on Siebel 8.1 tools when I put more of CLOB on the table.

    When I put more CLOB on the SBL-DEV-61032 table, I get an error on Siebel 8.1 tools. It is used to work in 8.0 tools.  Any ideas on how I do at the point 8.1.

    Hello

    Thanks for the post.

    I could find the document below

    LIMIT of SIEBEL COLUMNS CLOB to THREE PER TABLE (ID 1050304.1 the doc)

    According to this article Siebel does not support CLOB 3 then in a table.

    Please let me know if it helps.

    Kind regards

    Hari Meena

  • All the lines in the table of the ADF appear selected when the page loads

    I have a web application which for some adf displayed tables, displays all the lines highlighted that if they were selected. Not all tables in the request to do so, but those who have this feature do it every time.

    I see no difference between the declaration for tables that do not appear as well and those who aren't.

    I use 11.1.2.1 on Windows 7.

    Can someone point me in the right direction? The rowSelection property is set to unique and set apart from that I have no idea where to begin the search.

    Hello

    Just a wild guess here,

    You have the properl PKs defined in these tables?

    Kind regards
    Dimitris.

Maybe you are looking for