h:commandLink with f:param

Hello, I've got a simple list of commandLinks and
I try to add a parameter to them
               <c:forEach items="#{BrowserMB.categories}" var="abc">
                    <h:form>
                         <h:commandLink action="#{BrowserMB.browse}">
                              <h:outputText value="#{abc}" />
                              <f:param name="c" value="#{abc}" />
                         </h:commandLink>
                    </h:form>
               </c:forEach>Here's the part of managedBean class
     private String c = "asd";
     public String browse() {
          products = (getKatalogBean().getProductsByCategory(c));
          setPrepared(true);
          return "result";
     public String getC() {
          return c;
     public void setC(String c) {
          this.c = c;
     }but the problem is that the property "c" never gets updated, the method
getProductsByCategory(c)is always called with the default value. Do you know why?
Thanks for answering.

You need to either replace f:param by f:propertyActionListener as outlined here, or to define the parameter as managed property in faces-config.xml as outlined here.

Similar Messages

  • Tester: tests a View with bind params?

    Test a View with the right click on the AM, Test, that has
    bind params?
    After much searching the Help and this forum, I can't find the
    post that explained how to wrap another View to front end a
    SQLView/View with bind params.
    Thanks, curt

    Just as I posted this I thought of the search string that worked.
    I searched on "bind param" and oddly only one page of hits and
    the explanation on how to create a ViewHolder and ViewLink to
    front end a View with bind params and then to test it is in
    this message:
    Re: Getting message failed to load the following objects when opening any fmb
    curt

  • Commandbutton with f:param not working

    hi,
    f:param working command link working succesfully.
    f:param not working wiith command button,
    can I know how to use commandbutton with f:param?
    Thanks,
    siva

    As BalusC points out this isn't valid in 1.2 or ealier. 2.0 however, supports this functionality.
    If you'd like you can download early builds of JSF 2.0 here: [https://javaserverfaces.dev.java.net|https://javaserverfaces.dev.java.net]

  • How do i pass parameters in selectBooleanCheckbox with f:param...

    I try to pass, for a selectBooleanCheckbox, a parameter.Can i do that?? I try to do it, but the value it isn�t transfered to the JavaBean.
    i put that, but the JavaBean don�t received the "txeka" parameter.
    <h:selectBooleanCheckbox value="#{backing_form_del.markedForDeletion}">
    <f:param name="txeka" value="#{id.usu}" />
    </h:selectBooleanCheckbox>
    Other cuestion, If i achieve that, do i pass all the String parameters to a array of Strings(in the JavaBean)??
    My program consists doing a multiple delete with a database datatable.
    I�ve got a selectBooleanCheckbox, for a each row, and when the selectBooleanCheckbox(s), is(are) checked, i want to do a masive delete when i click a button. Can I do that???
    thanks in advance.
    I�m interesting in JSF aplications, because i�m doing the project final of the informatic ingeniering carrier.
    i appreciatte your help soo much.

    You could use somethings like this:
    <script>
    function setupInventoryReportURL(anchor) {
         var choice = document.getElementById('supplierCenter:inventory:categoryChooser');
         if (choice) {
              var url ='inventoryRPT.jsf' + '?currentCategoryName=' + choice.options[choice.selectedIndex].text;
              anchor.href = url;
         return true;
    </script>
    <h:form id="inventory">
         <h:panelGrid columns="1" border="1" cellpadding="5">
              <f:facet name="header">
                   <h:panelGrid columns="2" width="100%">
                        <h:outputText value="Inventory"/>
                        <h:outputLink value="inventoryRPT.jsf" onclick="setupInventoryReportURL(this)">
                             <h:outputText value="Report" styleClass="commandLink"/>
                        </h:outputLink>
                   </h:panelGrid>
              </f:facet>
    <h:panelGrid columns="2" width="100%">
         <h:panelGroup>
              <h:outputText value="Supply Category"/>
              <h:selectOneMenu id="categoryChooser" value="#{inventory.categoryId}" onchange="submit()"
              valueChangeListener="#{inventoryView.categoryChanged}" immediate="true">
              <f:selectItems value="#{inventory.categories}"/>
         </h:selectOneMenu>
             ..............................................Vladimir Perlov

  • h:outputFormat : how to use commandlink in f:param

    I'm using the <h:outputFormat> tag to render parameterized text but I need to replace the param (placeholder) with a <h:commandLink> instead of raw text, is this possible?
    Thank you.

    No. Best what you can do is to include HTML in the param value and set escape="false".

  • Calling Oracle stored procedure with out param of user define type from Entity Framework 5 with code first

    Guys i am using Entity Framework 5 code first (I am not using edmx) with Oracle and all works good, Now i am trying to get data from stored procedure which is under package but stored procedure have out param which is user define type, Now my question is
    how i will call stored procedure from entity framework
    Thanks in advance.

    I agree with you, but issue is we have lots of existing store procedure, which we need to call where damn required. I am sure those will be few but still i need to find out.
    If you think you are going to get existing MS Stored Procedures  or Oracle Packages that had nothing to do with the ORM previously to work that are not geared to do simple CRUD operations with the ORM and the database tables, you have a rude awakening
    coming that's for sure. You had better look into using ADO.NET and Oracle Command objects and call those Oracle Packages by those means and use a datareader.
    You could use the EF backdoor, call Oracle Command object and use the Packages,  if that's even possible, just like you can use MS SQL Server Stored Procedures or in-line T-SQL via the EF backdoor.
    That's about your best shot.
    http://blogs.msdn.com/b/alexj/archive/2009/11/07/tip-41-how-to-execute-t-sql-directly-against-the-database.aspx

  • Reload the same page with multiple param id

    Hi dude,
    i create review.jsp and include the displayproduct.jsp.. when i add review for the particular product,value added succesfully in db and successurl method will call and reload the displayproduct.jsp as blank page.. because param id not passing in url..
    how to pass the previous navactionid,navcountid and productid to SuccessURL with same jsp..
    pls clarify my doubt..

    hi MishraI need to pass the param in button
    <dsp:input type="submit" bean="MyReviewFormHandler.addReview" value="Submit Review">
    <dsp:input bean="MyReviewFormHandler.ProductReviewSuccessURL" type="hidden" value="displayCategory.jsp" />
    >
    It should work.
    I'm using below same way and working fine.
    <%/* URL to go to if user's session expires while he is filling out this form */%>
         <dsp:input bean="ShoppingCartModifier.sessionExpirationURL" type="hidden" value="../../common/SessionExpired.jsp"/>
         <%/* ADD TO CART BUTTON: Adds this SKU to the Order*/%>
         <dsp:input bean="ShoppingCartModifier.addItemToOrder" type="submit" value="Add to Cart "/>
         <%/* Goto this URL if NO errors are found during the ADD TO CART button  processing:*/%>
         <dsp:input bean="ShoppingCartModifier.addItemToOrderSuccessURL" type="hidden"  value="../checkout/cart.jsp"/>-RMishra

  • XSQL ERROR with bind-params in ref-cursor-function

    Hi Steve
    I always get the error
    ORA-01006 bind variable does not exist
    when using a bind variable in a <xsql:ref-cursor-function> action element.
    when I replace the bind variable with a @ - parameter substitution, all works fine.
    My configuration:
    XSQL 1.0.4.1 on Win200Pro ,Apache + Jserv + DB from ORA 8.1.7 installation
    My Source
    <xsql:ref-cursor-function
    dbconn="ekat"
    eblike="%"
    list="a0"
    bind-params="eblike"
    include-schema="no"
    null-indicator="no"
    id-attribute=""
    fetch-size="500"
    >
    {@dbconn}o.ekatkategcv.open_cv_ebh ('{@list}', :1)
    </xsql:ref-cursor-function>
    ( dbconn selects my schema, not changed often, which contains package ekatkategcv with
    function open_cv_ebh returning a cursor)
    Any fix would be appreciated to avoid reparsing on each call.
    BTW, is it right, that a ref-cursor funtion is reparsed whenever the content of
    a parameter used with @ changes?
    Best regards
    H.Buschmann ([email protected])
    null

    I have tried it using ? instead of :1, this method works fine.
    I haven't tried the name method (:bindvar) yet.
    Until now, I only used xsl:query and xsql:ref-cursor-function, so I didn't check
    the other action handlers with bind variables like :1
    null

  • WS-SDK Scheduling two instances of the same report with different params

    I'm using the web services SDK for Business Objects XI 3.1 SP 2 to schedule reports. I've got it so that I can successful schedule a report with prompts, setting the value for the prompt and running the report.
    However, I'm now trying to schedule two instances of the same report using a single call to BIPlatform.Schedule. It creates the correct number of new instances, the last of which is completely correct. The first one (and in fact if I do more than two all the rest except the last) lose the parameter value from the prompt and the schedule information and the type. So for example if I schedule two instances, both PDF, both for 8am tomorrow with parameters of 1 and 2, I get:
    A Webi instance, scheduled to run immediately with no parameters specified and
    A PDF instance, scheduled for 8am tomorrow with parameter 2
    Any idea what I'm doing wrong?
    Cheers,
    Jack
    Edited by: Jackson Pope on Feb 3, 2011 1:34 PM

    Can you possibly post your code here that sets params and schedules? Also as you schedule 2 instances on a single report in a sinlgle biplatform.schedule call(): as you query for InfoObject what you actually query for a single report isn't it, or do you schedule a report template and reschdule it previous instance?

  • Probalem pasing a value with f:Param

    Hi,
    The below code does not call the action method if the value in the passing parameter
    has an apostopher in the value test'[email protected]
    <h:commandLink id="moidyUser" value="#{srch.userId}" styleClass="Link" action="#{pc_UserSearch.modifyUser}">
    <h:outputText value="#{srch.userId}" id="out_user_name"></h:outputText>
    <f:param name="userName" value="#{srch.userId}" />
    </h:commandLink>
    Any help will be appreciated
    thanks

    To add to it , here's some code for the same ..
    String encodedURL = "";
    // USe some algorithm to encript your userId
    String encryptedUrl = SecurityUtil.getEncryptedPassword(userId);
    encodedURL = URLEncoder.encode(encryptedUrl, "UTF-8");Here you can set the display name and the actual URL that is used on clicking that link so it should work just fine for you ..

  • Full table scan issue with optional params

    Hi
    I have following problem when writing PL/SQL queries for optional search conditions in the SQL statements
    for ex: if there's a select querty with 3 contions as follows
    select .......
    from
    table1 t1 join...
    teble2 t2 join
    where
    ( :param1 = -1 or t1.col1 = :param1)
    and
    ( :param2 = -1 or t2.col1 = :param2)
    this is mainly to support optional search conditions such as param1 and param2 where when any of those params are option it is passed as -1 so that condition of where clause becomes true and has no filtering.
    However once we use this way even the contion columns are indexed those are not used but full scan happens.
    if we write dynamic SQL (i.e removing condition check section totally from where clause dynamically based on the value of the param) then the query performs as usual. other option is to duplicate the same query in if ... then.. else block for different values of param1 and param2 .. in that case we would end up with huge SP..
    so what's the solution for this kind of scenario... do we have to end up with dynamic SQL (string concatanation to build the query at runtime with required conditions)
    Please help me on this. Normally what is the usual approach for such selection query since most search pages have this option to ommit several selection criterias if necessary... so it should be very common problem
    Thanks
    -Rasika

    Hello
    Have a look at this link to asktom It shows how to specify a dynamic where clause AND use bind variables in the resulting SQL statement.
    HTH
    David

  • Stored proc with CLOB param to XMLType column

    I am using Oracle 8i client with the Oracle Provider for OLE DB to connect to an Oracle 9i database. It contains a table with several columns one of which is XMLType. We are trying to use a stored procedure to add rows to this table
    PROCEDURE SP_PUT_XML(
    P1 IN NUMBER,
    P2 IN NUMBER,
    P3 IN CLOB)
    Parameter P3 represents the xml document I am trying to insert.
    I have written a little C++ client program that uses the Oracle Provider for OLE DB to connect to the database and call this stored procedure. This program also reads in an UTF-8 encoded XML file and places it in a wchar_t array and then binds that array to the P3 parameter.
    When I run the program I get the following errors:
    Description: ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00007: unexpected end-of-file encountered
    ORA-06512: at "MYSCHEMA.MYPACKAGE", line 97
    ORA-06512: at line 1
    When I recompile the client program to use a char array
    (and the exact same file as above) instead of a wchar_t array and bind that to the CLOB param, then the program works fine. no errors.
    How can I determine if the default encoding of the database is not compatible with the encoding of the xml file?

    You can probably retrieve the Boolean as a number data type, such as Int16. I haven't tried this myself, but that's what I've heard some users workaround Boolean.

  • Can I deploy pages with DB params stored elsewhere?

    Hello,
    Trying to get up to speed with JSP's. So far, all is well. Can go into, out, etc. of a DB, which is fine.
    Question is this. The pages that have all of the JDBC connection params in them, is it possible to put all of the DB params into a module page, and just import it, so I don't have a ton of duplicate code floating around the web site? If so, what's the best? Almost like a .h file in C++, but in Java, what are they called?
    Thanks,
    10k

    http://java.sun.com/products/jsp/syntax/1.2/syntaxref12.html
    You can use the <%@ include %> which is the equivalent of a .h file in c++
    It is a static include at page translation time, which effectively just "pastes" the code into your jsp.
    This way you can have a common header on all of your JSPs.
    However it is preferable NOT to do SQL queries/scriptlet code in JSP.
    Write a java bean that handles database connection, and call db.getConnection() on it.
    Or use JSTL sql tags
    Even better, don't have any SQL statements on your JSP pages - put it all into java beans as a data access layer.
    Cheers,
    evnafets

  • Two adf components sharing same VO with different params on same screen

    Hello everybody,
    My current problem is that I need to create a screen with multiple graphs sharing the same VO but with different parameters for each one.
    Lets suppose that I want to use EmployeesVO to show 2 graphs on the same jspx page.
    One graph will show all employee salaries for department "Marketing" and another will show all employee salaries for department "IT".
    Remember that I want both on the same screen.
    The read-only VO will look like this:
    SELECT First_Name
    , Salary
    FROM employees
    WHERE department_id = :p_dept
    To do this I did the following:
    For each graph I created one Iterator.
    For each Iterator I created one ExecuteWithParams. (one receiving "Marketing Depto" and anther receiving "IT Depto")
    For each ExecuteWithParams I created one InvokeAction .
    While running the application all graphs show the same information. All of them show only one department (the last InvokeAction in the Executables List).
    The question is: How to keep each graph with their own parameter on the same screen?
    I'm using JDeveloper 11.1.2.1 on Windows 7 x64 SP1.
    Thanks in advance!

    Why dont you add 2 instances of the same Vo in the AM. For each instance set the different VC.

  • Problem with array param when calling a webservice from a BPM Process

    Hi. I have a web service and uses an array as parameter.
    The array (named "atributos") as part of a business object is defined here:
    <xs:schema targetNamespace="http://xmlns.oracle.com/bpm/bpmobject/DataTypes/TrackPCPDOTrans" ...>
    <xs:complexType name="TrackPCPDOTransType">
    <xs:sequence>
    <xs:element name=... />
    <xs:element name="atributos" nillable="true" type="ns2:AtributosType" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    <xs:element name="TrackPCPDOTrans" type="TrackPCPDOTransType"/>
    </xs:schema>
    <xs:schema targetNamespace=... >
    <xs:complexType name="AtributosType">
    <xs:sequence>
    <xs:element name="key" nillable="true" type="xs:string"/>
    <xs:element name="value" nillable="true" type="xs:string"/>
    </xs:sequence>
    </xs:complexType>
    <xs:element name="Atributos" type="AtributosType"/>
    </xs:schema>
    In the service task activity, I pass the params to the web service:
    "descripcion" --> TrackPCPDOTrans.atributos[1].key
    DataObject.descripcion --> TrackPCPDOTrans.atributos[1].value
    "estado" --> TrackPCPDOTrans.atributos[2].key
    DataObject.estado --> TrackPCPDOTrans.atributos[2].value
    "justificacion" --> TrackPCPDOTrans.atributos[3].key
    DataObject.justificacion --> TrackPCPDOTrans.atributos[3].value
    But when I test the process, an error ocurrs:
    <auditQueryPayload auditId="8712004" ciKey="380019">
    <dataState>
    <dataObject name="FaultMessage" isBusinessIndicator="false">
    <value> oracle.bpm.bpmn.engine.model.runtime.microinstructions.TrappableException: faultName: {{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure} messageType: {{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage} cause: {faultName: {{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure} messageType: {{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage} parts: {{ summary=<summary>empty expression result. The expression bpmn:getDataInput('trackPCPDOTrans')/ns:atributos[2]/ns1:key is empty. An attempt to read or copy data referenced or computed by the XPath expression either had invalid data, according to the XML schema, or did not contain certain optional data. Ensure that the variable or expression result named in the error message is not empty. Enable XML schema validation of related data elements to ensure the run-time data is valid. </summary>} } </value>
    </dataObject>
    </dataState>
    </auditQueryPayload>
    What is wrong?
    Thanks for your help.

    I did the assignment in XPATH:
    oraext:parseXML(concat('<AtributosTracking xmlns="http://xmlns.oracle.com/bpm/bpmobject/DataTypes/AtributosTracking">
    <arrayAtributosTracking>
    <key xmlns="http://xmlns.oracle.com/bpm/bpmobject/DataTypes/Atributos">','descripcion','</key>
    <value xmlns="http://xmlns.oracle.com/bpm/bpmobject/DataTypes/Atributos">',bpmn:getDataObject('DataObjectDDSAO')/ns:descripcion,'</value>
    </arrayAtributosTracking>
    <arrayAtributosTracking>
    <key xmlns="http://xmlns.oracle.com/bpm/bpmobject/DataTypes/Atributos">','estado','</key>
    <value xmlns="http://xmlns.oracle.com/bpm/bpmobject/DataTypes/Atributos">',bpmn:getDataObject('DataObjectDDSAO')/ns:estado,'</value>
    </arrayAtributosTracking>
    </AtributosTracking>'))
    AtributosTracking.xsd:
    <?xml version="1.0" encoding="UTF-8"?>
    <?bpmo version="11.1.1.6.0.15.53" build="15.53" fullName="DataTypes.AtributosTracking" modifiers="268435456"?>
    <xs:schema targetNamespace="http://xmlns.oracle.com/bpm/bpmobject/DataTypes/AtributosTracking" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://xmlns.oracle.com/bpm/bpmobject/DataTypes/AtributosTracking" xmlns:ns1="http://xmlns.oracle.com/bpm/bpmobject/DataTypes/Atributos" xmlns:bpmo="http://xmlns.oracle.com/bpm/bpmobject/" >
    <xs:import namespace="http://xmlns.oracle.com/bpm/bpmobject/DataTypes/Atributos" schemaLocation="Atributos.xsd"/>
    <xs:complexType name="AtributosTrackingType">
    <xs:sequence>
    <xs:element name="arrayAtributosTracking" nillable="true" type="ns1:AtributosType" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    <xs:element name="AtributosTracking" type="AtributosTrackingType"/>
    Atributos.xsd:
    <?xml version="1.0" encoding="UTF-8"?>
    <?bpmo version="11.1.1.6.0.15.53" build="15.53" fullName="DataTypes.Atributos" modifiers="0"?>
    <xs:schema targetNamespace="http://xmlns.oracle.com/bpm/bpmobject/DataTypes/Atributos" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://xmlns.oracle.com/bpm/bpmobject/DataTypes/Atributos" xmlns:bpmo="http://xmlns.oracle.com/bpm/bpmobject/" >
    <xs:complexType name="AtributosType">
    <xs:sequence>
    <xs:element name="key" nillable="true" type="xs:string"/>
    <xs:element name="value" nillable="true" type="xs:string"/>
    </xs:sequence>
    </xs:complexType>
    <xs:element name="Atributos" type="AtributosType"/>
    </xs:schema>
    But a new error occurrs when I run the BPM process:
    <auditQueryPayload auditId="8724004" ciKey="380025">
    <dataState>
    <dataObject name="FaultMessage" isBusinessIndicator="false">
    <value> oracle.bpm.bpmn.engine.model.runtime.microinstructions.TrappableException:
    faultName: {{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure}
    messageType: {{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage}
    cause: {faultName: {{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure}
    messageType: {{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage}
    parts: {{ summary=<summary>XPath query string returns multiple nodes.
    The assign activity part and query bpmn:getDataObject('AtributosTracking')/ns:atributosTracking are returning multiple nodes.
    The assign activity part and query named in the error message returned multiple nodes. It should return single node.
    According to BPEL4WS specification 1.1 section 14.3, the assign activity part and query named in the error message should
    not return multiple nodes. Verify the part and xpath query named in the error message at line number -1 in the BPEL source. </summary>} } </value>
    </dataObject>
    </dataState>
    </auditQueryPayload>
    Any idea?
    Thanks
    Edited by: César on 10/01/2013 11:02 AM

Maybe you are looking for

  • Master Data and Transaction Data For DB Connect extracted Data...

    Dear Experts, I have been working on SAP NetWeaver BW 7.3 and for the first time I have extracted data from Oracle DBMS by using DB Connect. I have successfully extracted data of a View namely Sales_View into BW by creating a DataSource. This View ha

  • Cannot check if user already exists in Shared Service (9.3.1)

    Hi, I wrote some code based on the sample from 9.3.1 CSS documentation for adding users for shared services. Thing is that I need this script to determine if a user exists or not so it won't go through the creation code again. So, from the code: publ

  • What does the scriptcollector do and how does it related to jsf lifecycle?

    hi, i want to know what does the scriptcollector do and how does it related to jsf lifecycle? and also in the scriptcollector if i call this, preRender=#{myBean.onPageLoadBegin} postRender=#{myBean.onPageLoadEnd} how my page will react?

  • Why is waking Leopard up so buggy!??!

    Comp goes to sleep, and won't wake up! This has happened on the Macbook and Powermac! Argh!

  • Remove symbol or stop points?

    Hello! I am currently doing game design at university and Have recently started looking at action script 3. I am not struggling too much and can usually find the answer to what I am looking for but this really has me stumped. I want to add an item to