Pass parameter to the custom validator

Hi, How can we pass parameters to the custom validator, i want something like:
<f:validator validatorId="validators.dateRangeValidaor">
     <f:param id="toDate" value="#{issue.toDate}"/>
     <f:param id="fromDate" value="#{issue.fromDate}"/>     
</f:validator>but tld dosnot support f:param tags in f:validator tag, is there any possible solution for that??

Use f:attribute; something like as follows:<h:inputText ...>
  <f:validator .../>
  <f:attribute name="toDate" value="#{issue.toDate}"/>
  <f:attribute name="fromDate" value="#{issue.fromDate}"/>
</h:inputText>Note that these attributes are not of the validator but of the parent component.
You can get these attributes using UIComponent.getAttributes().get("toDate").
I think this is not so friendly for page authors.
So, I recommend you to develop a custom validator tag which can be specified
the parameters you want.

Similar Messages

  • How to pass parameter to the custom class based on CL_RSR_WWW_MODIFY_TABLE

    Hello
    I created custom class based on CL_RSR_WWW_MODIFY_TABLE in order to modify web template.
    I would like to pass parameter to this class. How is it possible?
    HUGE thanks!

    Hello ,
              Various methods will be given for the class like CAPTION_CELL CHARACTERISTIC_CELL:
    Position the cursor on the name of the method and click on 'Redefine' , where you will get the parameters used in the method such as I_X, I_COLSPAN, where you can define your logic.
    hope it helps
    assign points if useful

  • How to pass parameter to the Query String of the Named Queries'SQL

    Firstly to say sorry,I'm a beginner and my English is very little.
    Now I want to know
    How to pass parameter to the Query String of the Named Queries'SQL in the Map editor.
    Thanks.

    benzi,
    Not sure if this is on target for your question, but see #5 in the link below for some web screencasts that show how to pass an input text form field value to the bind variable of a view object. If you're looking for something different, maybe provide some more details such as what you are trying to accomplish and what technology stack you are using - for example, ADF BC, JSF, etc.
    http://radio.weblogs.com/0118231/stories/2005/06/24/jdeveloperAdfScreencasts.html
    Also see section 5.9 and chapter 18 in the developer's guide.
    thanks

  • Passing values to the custom folder

    Hi All
    Can anyone tell me how to pass the dynamic values to the custom folder in the where condition.
    I want to build a custom folder using the follwing query
    select empno,ename,sal from emp where empno=10, here insted of 10 I want to pass the empno value dynamically.
    Eg : select empno,ename,sal from emp where empno=<dynamic value>
    I am really appreciate your help on this.
    Thanks..

    Hi
    The simplest way to do this is as follows:
    1. Create this custom folder: select empno,ename,sal from emp
    2. In Discoverer Plus, you build a workbook that has a condition on the empno with a parameter asking the user which one they want to query
    The workbook is then extremely flexible and it's easier than trying to add conditions or parameters to custom code.
    Best wishes
    Michael

  • Passing parameter to the i18n text from xml view in fiori app

    Hi,
    Could somebody let me know how to pass parameter to get the i18n text inside xml view of a Fiori app.
    For e.g. inside my i18n properties file i have a entry like:
    PEC_ISSUE={0}issues of total{1}
    inside xml i use it like {i18n>PEC_ISSUE}
    but now how do i pass those 2 parameters to this ??
    i know in javascript it works with , (comma) but does not work in xml. Any help...
    Thanks,
    Ashish

    Hi Michele,
    I found it. Below is the example from my coding.
    <Text      text="{parts: [{path: 'i18n>PEC_to'}, {path: 'promoprocsteps>RetailPromotionSalesFromDate_E'},
                                                           {path:'promoprocsteps>RetailPromotionSalesToDate_E'}],
                                                           formatter: 'retail.promn.promotioncockpit.utils.Formatter.formatDatesString'}"  />
    So you have to create a formatter and pass all the strings to the formatter and then do it inside JS.
    In JS you do it in this way:
    i18n.getText(i18String, [newString, string2]);
    i hope this helps.
    Regards,
    Ashish

  • How to pass parameter to the method in EJB session bean from Managed Bean

    Hi,
    I need some guidance in accessing the EJB session bean methods from one of my backing Bean. I use EJB 3.0 Entity Beans and EJB Session Beans. I have to get value from my page and pass it thro the backing bean to the respective EJB session bean. I have no clue of how to do this,
    When i click a command link on the page, in its backing bean click method, i am able to get a value and store in a variable under its click action. But from there i am not knowing of how to pass it as a variable to the EJB session bean and hence execute the query(this is where we have to pass the variable as a parameter in its where clause) in the entity bean.
    I wanna know how to make a call to the EJB session bean and from there execute the Enitity bean.
    Guide me regarding this....
    Thanks
    ri

    Unfortunately dependency injection doesn't work for jsf backing beans, so you have to use a normal jndi lookup to find your session bean. The following example shows you how to find a session bean and call a method:
    public void commandButton_actionListener(ActionEvent actionEvent) {
    Context ctx;
    try {
    ctx = new InitialContext();
    helloWorldEjb = (HelloWorldEJB)ctx.lookup("HelloWorldEJB");
    hello = helloWorldEjb.sayHello(name);
    System.out.println(hello);
    } catch (NamingException e) {
    e.printStackTrace();
    }

  • Passing parameter to the external process like notepad, calc etrc.

    Dear Experts,
    Can anyone help me, to find out how can we pass the value parameter, during calling external process like Notepad, Calculator etc.
    I want to fetch other data related to the parameter from the other ERP.
    Eg. If I pass 'Hi ' as a parameter, then I want to print this text into the Notepad.
    Please help.
    Thanks  in Advance
    Kedar
    Edited by: Kedar Paranjape on Jan 30, 2012 4:08 AM

    Hi Kedar,
    Welcome to SCN.First check whether is any rfc available for this or not.You can use GUI_RUN to call from sap.
    Regards,
    Madhu.

  • 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

  • Passing parameter for the bean function that deletes record from DB

    I need to delete some record from the DB without updating the reset of the user screen.
    I use commandButton with immediate attribute as true, because validation should be skipped.
    So, I can't rely on backing bean values being updated, but need to pass a param to the function that does the delete (deleteTemplate) function below.
    The value of this param is selected value in another comboBox called "template".
    Code below is not parsing. Could you advise how to do it?
    <a4j:commandButton id="deleteTemplate" value="Delete"
                             action="#{qtBeanParam.deleteTemplate(param['piPerformanceReturnsForm:template'])}" immediate="true" reRender="template,templateList,templateOwner,templateOwnerList"
                             styleClass="blue-button">
                        </a4j:commandButton>Error Parsing: #{qtBeanParam.deleteTemplate(param['piPerformanceReturnsForm:template'])}

    Thank you for your reply.
    Could I pass the value that is entered in some other field as a "parameter" though?
    <f:param name="anyName" value="parameter" />
    For example the value from the following comboBox?
    <rich:comboBox id="template" width="250" value="#{qtBeanParam.templateName}" enableManualInput="true"
                                  converter="#{templateConverter}" valueChangeListener="#{qtBeanParam.changeTemplate}" >
                                  <a4j:support event="onselect" reRender="template,templateList" ajaxSingle="true" />
                                  <a4j:support event="onchange" reRender="template,templateList" ajaxSingle="true" />
                             <f:selectItems id="templateList" value="#{qtBeanParam.templateList}" />
                        </rich:comboBox>

  • Passing parameter to the URL in UWL

    Hi ,
      We are sending the workitem from ECC to UWL and all these works fine.
    We have a custom form that opens from the UWL workitem on the click of a button 'Launch URL'  . We need to pass a name into the cutom form while it opens.
    We are using the Task visualization in the SWFVISU.
                                 Visualization type  = Portal page
                                  DYNPARAM          = zname=${item.externalld}.
    But the URL opens with a null value. Kindly help.
    - Liz

    Hi,
    please check the following OSS notes;
    <a href="https://service.sap.com/sap/support/notes/1015257">Note 1015257 - Need to enter escape characters for direct input in Variable</a>
    <a href="https://service.sap.com/sap/support/notes/1062214">Note 1062214 - Errors with direct input in web variable screen</a>
    hope this helps...
    Olivier.

  • Help in CURSOR when pass parameter for the IN

    Hi,
    Need some help I have CURSOR that takes a VARCHAR2 and NUMBER but when I run my Procedure it gives invalid number. Here is the CURSOR
    CURSOR get_count (p_list VARCHAR2, p_id NUMBER)
          IS
             SELECT COUNT (*) total_rows,
                    NVL
                       (SUM (CASE
                                WHEN UPPER (cdcode) = 'PASS'
                                   THEN 1
                                ELSE 0
                             END
                        0
                       ) tot_returned,
                      COUNT (*)
                    - NVL (SUM (CASE
                                   WHEN UPPER (cdcode) = 'PASS'
                                      THEN 1
                                   ELSE 0
                                END
                           0
                          ) diff
               FROM testtable
              WHERE plistcol IN (p_list)
                AND pidcol = p_id;
    plistcol is of datatype NUMBER
    In my procedure I am building a list to comma separated numbers that goes in p_list parameter of type VARCHAR2 to the cursor i.e.
    I have a for loop to build that list e.g.
    loop
    -- num is of datatype NUMBER
    p_list := p_list || num || ',';
    end loop
    IF (p_list IS NOT NULL)
    THEN
    p_list := SUBSTR (p_list, 1, LENGTH (p_list) - 1);
    END IF;here is how my p_list looks when i pass it on to the cursor
    *12,345,678*
    and here is how open the cursor
    OPEN get_count (p_list, 99999);
    and here is the error I get
    SQLERRM ORA-01722: invalid number
    Now when I hard *12,345,678* in my CURSOR SELECT it works fine, it's only when I pass this as parameter it fails. For example I hard code the values in my CURSOR select it works fine
    CURSOR get_count (p_list VARCHAR2, p_id NUMBER)
          IS
             SELECT COUNT (*) total_rows,
                    NVL
                       (SUM (CASE
                                WHEN UPPER (cdcode) = 'PASS'
                                   THEN 1
                                ELSE 0
                             END
                        0
                       ) tot_returned,
                      COUNT (*)
                    - NVL (SUM (CASE
                                   WHEN UPPER (cdcode) = 'PASS'
                                      THEN 1
                                   ELSE 0
                                END
                           0
                          ) diff
               FROM testtable
              WHERE plistcol IN (12,345,678) -- even '12','345','678' works when hardcoded
                AND pidcol = p_id;I even tried passing the values in the format *'12','345','678'* but still get the above error. So how can I pass the values to cursor IN clause.
    So wondering what might be the issue.
    Thanks

    Why this kind of coding needs to be avoid - here is one demonstration of one aspect ->
    satyaki>
    satyaki>select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    Elapsed: 00:00:00.22
    satyaki>
    satyaki>select * from emp;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          9999 SATYAKI    SLS             7698 02-NOV-08      55000       3455         10
          7777 SOURAV     SLS                  14-SEP-08      45000       3400         10
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-81       4450                    10
          7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
          7839 KING       PRESIDENT            17-NOV-81       7000                    10
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
          7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
    13 rows selected.
    Elapsed: 00:00:01.90
    satyaki>
    --Your query works and here is the slightly modified version of your query
    satyaki>
    satyaki>
    satyaki>declare
      2  
      3   type t_ref_cursor is ref cursor;
      4   l_cursor t_ref_cursor;
      5   l_count number;
      6   l_list varchar2(1000) := '10,20';
      7   v_sql varchar2(1000);
      8  
      9  begin
    10  
    11  v_sql := '';
    12  v_sql := v_sql||'select count(*) as tot_count ';
    13  v_sql := v_sql||'from emp ';
    14  v_sql := v_sql||'where deptno in ('||l_list||')';
    15  
    16  open l_cursor for v_sql;
    17  loop
    18    fetch l_cursor into l_count;
    19    exit when l_cursor%notfound;
    20    dbms_output.put_line('count: '||l_count);
    21  end loop;
    22  close l_cursor;
    23  
    24  end;
    25  /
    count: 8
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.09
    satyaki>
    --Now, modifying the input i can sniff into the entire data
    satyaki>
    satyaki>declare
      2  
      3   type t_ref_cursor is ref cursor;
      4   l_cursor t_ref_cursor;
      5   l_count number;
      6   l_list varchar2(1000) := '10,20) or (1=1';
      7   v_sql varchar2(1000);
      8  
      9  begin
    10  
    11  v_sql := '';
    12  v_sql := v_sql||'select count(*) as tot_count ';
    13  v_sql := v_sql||'from emp ';
    14  v_sql := v_sql||'where deptno in ('||l_list||')';
    15  
    16  open l_cursor for v_sql;
    17  loop
    18    fetch l_cursor into l_count;
    19    exit when l_cursor%notfound;
    20    dbms_output.put_line('count: '||l_count);
    21  end loop;
    22  close l_cursor;
    23  
    24  end;
    25  /
    count: 13
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.10
    satyaki>Got me?
    Regards.
    Satyaki De.

  • RowID as parameter in the Procedure valid or invalid?

    Dear All,
    Can any one please let me know is it allowed to pass ROWID as a parameter from one PL/SQL procedure to other PL/SQL procedure? If yes, could you plase let me know the procedure.
    Thanks

    SQL> set serveroutput on
    SQL> create table dummy(id number, ename varchar2(32))
      2  /
    Table created.
    SQL> insert into dummy values(1, 'Scott')
      2  /
    1 row created.
    SQL> create or replace procedure show_record(p_rowid rowid) is
      2    l_ename dummy.ename%type;
      3  begin
      4   select ename into l_ename from dummy where rowid=p_rowid;
      5   dbms_output.put_line(l_ename);
      6  end show_record;
      7  /
    Procedure created.
    SQL> select rowid, id from dummy
      2  /
    ROWID                      ID
    AAEbRAAABAAAWfSAAA          1
    SQL> exec show_record('AAEbRAAABAAAWfSAAA');
    Scott
    PL/SQL procedure successfully completed.

  • Pass parameter to the jsp include

    Hello,
    Is it possible to pass a string to the <jsp:include page ?
    Thanks!
    ~ Kyle

    Use jsp:param.

  • Pass Parameter to the Page After Successfull Login

    Dear all
    I want to make log in page,so that after successful pass log on , it should open main page and the employee should see only his information.
    Can u please help me in this issue.
    Best Regards;

    If you use ADF Security, you can get the logged in user information from SecurityContext and use this information to filter out the data.
    Sample Code:
    //Inside Model
    ADFContext aDFContext = ADFContext.getCurrent();
    String userName = aDFContext.getSecurityContext().getUserName();
    //Inside View - EL
    #{securityContext.userName}Sireesha

  • Open popup window and passing parameter to the popup

    Hi, I want to open a popup whenever a button is pressed (the page number is 10)
    my first attempt was to make a process which have a button condition (after submit)
    BEGIN
    htp.p('<script type="javascript/text">');
    htp.p('javascript:popupURL(
    "f?p=&APP_ID:12:&APP_SESSION.::NO::P12_PERSON::PERSON_ID")');
    htp.p('</script>');
    END;
    I want to pass the value
    from
    page 10 item :PERSON_ID (initial page)
    to
    page 12 item :P12_PERSON (this is the popup page)
    I also made a branch for the button which redirect to page 10, since no button can be left without any branch or redirect.
    the problem is, I dont see any popup was opened. Is there something wrong on my syntax?
    thanks for your attention, I appreciate any suggestion
    danny

    Thanks many many thanks for your help Varad, I'm still having problem with the JS though
    About the popupname I found another function on apex js documentation, the function name is popUpNamed(url,name). Now I don't have any problem with the date picker anymore.
    My JS look like this now
    <script type = "text/javascript">
    function buildURL()
    var pg = $x('P10_SHOWROLLELIST').value;
    var prsn_id = 'P'+ pg + '_PERSON';
    popUpNamed('f?p=&APP_ID.:' + pg + ':&APP_SESSION.::NO::' + prsn_id + ':&PERSON_ID.', 'Rolle' );
    </script>
    but still it seems like this line" var pg = $x('P10_SHOWROLLELIST').value;" still produce an error on my side. I tried to change pg into a fix value for eg: '12' and it works.
    P10_SHOWROLLELIST is a select list which return a value
    this is the query of the select list
    SELECT 'Mitarbeiter' AS D, '12' as R
    FROM persrollemitarbeiter
    WHERE person = :PERSON_ID
    UNION ALL
    SELECT 'Student' AS D, '13' as R
    FROM persrollestudent
    WHERE person = :PERSON_ID
    UNION ALL
    SELECT 'Mentor' AS D, '14' as R
    FROM persrollementor     
    WHERE person = :PERSON_ID
    UNION ALL
    SELECT 'Korrektor' AS D, '15' as R
    FROM persrollekorrektor
    WHERE person = :PERSON_ID
    UNION ALL
    SELECT 'Tutor' AS D, '16' as R
    FROM persrolletutor
    WHERE person = :PERSON_ID
    danny
    Edited by: user8241814 on 26.06.2009 07:56

Maybe you are looking for