How to invoke a function with arguments in JSTL expressions

Hi ,
I want to know how to send arguments in the JSTL expression.
I have a scenario like this
for (int i=0; i<nicList.size(); i++)
                      NavigationItemControl nic = nicList.get(i);
                      ni = nic.getNavigationItem();
                      //scr
                      if (nic.isAvailable(Mask.SYSTEM))
                      { %>
                        <option value="<%=ni.getInternalHandle()%>"  <% if(pi.getNavigationItemHandle().equals(ni.getInternalHandle())) {%>selected<%}%> ><%=nic.getLabel()%></option>
                      <%
                    }   I was changed these code into JSTL ,the new one is
<c:forEach var="nic" items="${nicList}">                                             
                                             <c:set var="ni" value="${nic.navigationItem}"/>
                                             <c:set var="nicAvailableMaskSystem" value="${*nic.available*}"/>
                                             <c:set var="navigationItemHandle" value="true" />                                             
                                                  <c:if test="${nicAvailableMaskSystem}">
                                                       <option <c:if test="${pi.navigationItemHandle==ni.internalHandle}">  selected </c:if> value="${ni.internalHandle}" >
                                                                 ${nic.label}
                                                       </option>
                                                  </c:if>
                                        </c:forEach>in the above code I have problem with nic.isAvailable(Mask.SYSTEM),
Can any one help me on this how can I invoke a function in JSTL with arguments.
-Bhaskar

JSTL can only handle getter/setter methods. You can't pass parameters to the methods.
There are a couple of ways around this
1 - set up "mask" as a seperate attribute of the NavigationItemControl bean.
ie getMask() setMask()
and then have your isAvailable method as
  public boolean isAvailable(){
    return internalIsAvailable(getMask());
  }Another solution is to define a static function and invoke it as a function.
public static boolean navigationAvailable(NavigationItemControl, Mask);
What does the isAvailable() method do? How complicated is it?
Hope this helps,
evnafets

Similar Messages

  • How to invoke RFC function module from XI interface

    Hi all,
    I am having one question, How to invoke RFC function module from XI interface.
    Please reply me as soon as possible.
    Thanks in advance,
    Radhika

    Hi,
    To call the RFC in mapping u need to create the RFC lookups...check these links.
    How we have to create the lookups?
    Check this weblogs with some screenshots on how to achieve this:
    /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
    /people/sravya.talanki2/blog/2005/12/21/use-this-crazy-piece-for-any-rfc-mapping-lookups
    /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    /people/sap.user72/blog/2005/12/06/optimizing-lookups-in-xi
    /people/morten.wittrock/blog/2006/03/30/wrapping-your-mapping-lookup-api-code-in-easy-to-use-java-classes
    lookups in xi
    XI Design Guidelines
    Re: RFC Lookup API
    /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439
    Regards,
    Phani

  • How to create a function with ref_cursor as parameter in OWB 10.1

    Hi,
    Can any one help me how to create a function with ref_cursor as parameter in OWB 10.1.?
    Its urgent. Please help me.
    Thanks,
    Siv

    Hi David,
    Thanks for your reply.
    Before going for this function, I need to create a package in transformation node in owb module.
    My package is as follows,
    Create or replace package 123
    type xxx is RECORD ( parameters);
    type yyy is RECORD (parameters);
    type aaa is table of yyy;
    type bbb is REF CURSOR return xxx;
    type ccc is record (parameters);
    type ddd is ref cursor return eee;
    END;
    How can I create the above kind of package manually in OWB 10.1 (Should not to import the package)
    Please help me its urgent.
    Thanks,
    Siv

  • How to use TRUNC function with dates in Expression Builder in OBIEE.

    Hi There,
    How to use TRUNC function with dates in Expression Builder in OBIEE.
    TRUNC (SYSDATE, 'MM') returns '07/01/2010' where sysdate is '07/15/2010' in SQL. I need to use the same thing in expression builder in BMM layer logical column.
    Thanks in advance

    use this instead:
    TIMESTAMPADD(SQL_TSI_DAY, ( DAYOFMONTH(CURRENT_DATE) * -1) + 1, CURRENT_DATE)

  • How can I Create function with an  out Parameter

    how all
    how can I Create function with an out Parameter
    I try to create it it sucess but how can I CALL it , it give me error
    please I want A simple example
    thanks

    3rd post on same question by same user :
    Re: how can I Create function with an  out Parameter
    how can I Create function with an  out Parameter

  • How Create procedure or function with ADO ?

    Hello,
    How Create procedure or function with ADO?It's my question.
    Thanks.
    Henri

    This message if post by Taiwan-ChangHaw-Oracle-Stored-Procedure-For-Business-Rule-Club
    public bool ConnectDatabase()
    try
    { string strConnectionString =
    "Provider=OraOLEDB.Oracle" +";"+
         "Data Source=" + ConnectionParams.Datasource +";"+
    "User Id =" + ConnectionParams.Username +";"+
    "Password =" + ConnectionParams.Password;
         m_conn=new ADODB.Connection();
         m_conn.ConnectionString=strConnectionString;
         m_conn.Open("","","",0); //i_"YYAOl Open the connection
    catch(Exception e)
    {     System.Windows.Forms.MessageBox.Show(e.Message);
         return false;
    return true; //YYAOl_B>3I9&connected successfully
    public void InsertDescription(string p_product,string p_language,string p_tname,string p_tdescription)
    { string sql="{Call inserttranslateddescription(?,?,?,?,?)}";
    try
    { ADODB._Command cmd=new ADODB.Command();//Create a command object
    cmd.ActiveConnection=m_conn; //Set its active connection to open connection
    ADODB.Properties properties=cmd.Properties;//Get the command properties into ADODB Properties object
    IEnumerator ienum=properties.GetEnumerator();//Get an enumerator on above properties
    ADODB.Property singleprop;
    while(ienum.MoveNext()) //iterate through the enumerator
         {singleprop=(ADODB.Property)ienum.Current;//Get the current property from enumerator
         string propname= singleprop.Name; //Get the name of current property
         if(propname.Equals("NDatatype")) //if the property is 'NDatatype' set its value to true
         singleprop.Value=true;
    cmd.CommandType=ADODB.CommandTypeEnum.adCmdText;
    int pid=Int32.Parse(p_product);
    ADODB._Parameter langid     =cmd.CreateParameter("langid",          ADODB.DataTypeEnum.adChar,ADODB.ParameterDirectionEnum.adParamInput, 100,p_language);
    ADODB._Parameter productid =cmd.CreateParameter("productid",     ADODB.DataTypeEnum.adNumeric,ADODB.ParameterDirectionEnum.adParamInput, 100,pid);
    ADODB._Parameter tname =cmd.CreateParameter("tname",          ADODB.DataTypeEnum.adBSTR,ADODB.ParameterDirectionEnum.adParamInput, 50,p_tname);
    ADODB._Parameter tdescription=cmd.CreateParameter("tdescription",ADODB.DataTypeEnum.adBSTR,ADODB.ParameterDirectionEnum.adParamInput, 50,p_tdescription);
    ADODB._Parameter check          =cmd.CreateParameter("check",          ADODB.DataTypeEnum.adNumeric,ADODB.ParameterDirectionEnum.adParamOutput,100,0);
    cmd.Parameters.Append(langid);
    cmd.Parameters.Append(productid);
    cmd.Parameters.Append(tname);
    cmd.Parameters.Append(tdescription);
    cmd.Parameters.Append(check);
    cmd.CommandText=sql;
    //Execute the command to insert product details in database
    object recs;
    object param=p_language;
    cmd.Execute(out recs,ref param,1);
    ienum.Reset();
    while(ienum.MoveNext()) //iterate through enumerator
    { singleprop=(ADODB.Property)ienum.Current;//Get the current property in to Property object
    string propname= singleprop.Name; //Get the name of current property
    if(propname.Equals("NDatatype")) //if it is 'NDatatype' set its value to true
    singleprop.Value=false;
    IEnumerator iprop=cmd.Parameters.GetEnumerator();//Get the enumerator for command parameters
    while(iprop.MoveNext()) //loop through enumerator
    { //Get the current parameter in enumerator
    ADODB._Parameter checkval=(ADODB._Parameter)iprop.Current;
    if(checkval.Name.Equals("check")) //if the parameter is 'check'
    if(checkval.Value.ToString().Equals("0")) //If check's value is zero data was inserted
    System.Windows.Forms.MessageBox.Show("Product details Inserted successfully");
    else
    System.Windows.Forms.MessageBox.Show("Product Details Updated");//else data was updated
    catch(Exception e)
    System.Windows.Forms.MessageBox.Show(e.Message);//Display any error message
    }

  • How to link Partner function with EDI ?

    Hi all,
    While sending PO thourgh EDI i am getting some error message...Partner function is not assigned with EDI..this message is not coming with ALE.
    Can any body help me to "How to link Partner function with EDI "?
    Thanks in advance.
    ankush

    Hi Ankush,
    Perhaps unintentionally, you are not rewarding points for correct answers, instead of clicking on the radio button"AWARD POINTS", you are clicking  "SOLVED BY OWN".
    and no points are being given from your side.
    Please award points if you find the answers helpful.
    Now also you can award points first, unassign by clicking again and then assign to whomsoever you think deserves.
    Regards,
    Sachendra Singh

  • How to call java function with parameter from javascript in adf mobile?

    how to call java function with parameter from javascript in adf mobile?

    The ADF Mobile Container Utilities API may be used from JavaScript or Java.
    Application Container APIs - 11g Release 2 (11.1.2.4.0)

  • How to extend the range with a second Airport Express? Do I need a DSL cable?

    How to extend the range with a second Airport Express? Do I need a DSL cable?

    Thanks, now we need a bit more information, please, in order to provide you with the correct information that you need.
    I assume that you already have one AirPort Express.....either a model A1264 or A1392.....set up and operating OK, is that correct?
    If yes, you can extend the network either by using wireless or an Ethernet cable with a second AirPort Express.....either the A1264 or A1392 model. A wired connection is the way to go, if possible, since it provides better performance.  But, wireless might work OK for you if you want to try that.
    Let us know "how" you want to extend......wireless or wired?

  • Urgent please ! How to invoke java method with diffrent argument types?

    Hi,
    I am new to JNI.
    I had gone through documentation but it is not of much help.
    Can any one help me out how to invoke the below java method,
    // Java class file
    public class JavaClassFile
    public int myJavaMethod(String[] strArray, MyClass[] myClassArray, long time, int[] ids)
    // implementation of method
    return 0;
    // C++ file with Invokation API and invokes the myJavaMethod Java method
    int main()
    jclass cls_str = env->FindClass("java/lang/String");
    jclass cls_MyClass = env->FindClass("MyClass");
    long myLong = 2332323232;
    int intArray[] = {232, 323, 32, 77 };
    jclass cls_JavaClassFile = env->FindClass("JavaClassFile");
    jmethodID mid_myJavaMethod = env->GetMethodID( cls_JavaClassFile, "myJavaMethod", "([Ljava/lang/String;[LMyClass;J[I)I");
    // invoking the java method
    //jint returnValue = env->CallIntMethod( cls_JavaClassFile, mid_myJavaMethod, stringArray, myClassArray, myLong, intArray ); --- (1)
    //jint returnValue = env->CallIntMethodA( cls_JavaClassFile, mid_myJavaMethod, ...........); --- (2)
    //jint returnValue = env->CallIntMethodV( cls_JavaClassFile, mid_myJavaMethod, ...........); --- (3)
    Can any one tell me what is the correct way of invoking the above Java method of (1), (2) and (3) and how ?
    The statement (1) is compilable but throws error at runtime, why ?
    How can I use statements (2) and (3) over here ?
    Thanks for any sort help.
    warm and best regards.

    You are missing some steps.
    When you invoke a java method from C++, the parameters have to be java parameters, no C++ parameters.
    For example, your code appears to me as thogh it is trying to pass a (C++) array of ints into a java method. No can do.
    You have to construct a java in array and fill it in with values.
    Here's a code snippet:
    jintArray intArray = env->NewIntArray(10); // Ten elments
    There are also jni functions for getting and setting array "regions".
    If you are going to really do this stuff, I suggest a resource:
    essential JNI by Rob Gordon
    There is a chapter devoted to arrays and strings.

  • How to - invoke OAF function from outside oracle with parameters?

    I have an oaf page, that does simple create/update/view functions for set of records based on custom db.
    currently user has to login to oracle apps, go to resp> invoke the page> search the part number > look up all the existing records(part#,set#,rev)> click on view link to view details of specific record.
    The requirement is : to invoke a set of record outside oracle.
    for example : user goes on network folder and opens a doc file from : /folder-2010/AAA-101-pqr.doc
    contents of doc file :
    revision = 1
    setNumber=2
    partNumber : ABCDEF* --this needs to be a link invoking the function call to the oaf page with these set of parameters :revision, part number and set number.
    ....and a few more....
    What I did was : I gave the OAFunc=xxxxx guest grants (http://mukx.blogspot.com/2008/07/creation-of-anonymous-page-introduction.html)
    so it invokes the main page from any file outside oracle, without login required. but i still have to search the existing records for a part number and click on view link.
    How can I pass the part#,set#,rev to the link so that it opens up the view page directly ?
    any help would be appreciated.
    thanks a ton.

    ok so say my function is :
    MASETUPVIEW with html call : OA.jsp?page=/oracle/apps/mac/matooling/webui/WorkSheetViewPG
    So from word file : Should I give the link to invoke as :
    http://zzzzzz.company.com:8009/OA_HTML/OA.JSP?OAFunc=MASETUPVIEW&viewInvItemId=123456&viewMachine=101&viewRevision=C&viewSetNumber=5&viewCategory=MILLS&paramActionType=ViewWS

  • How to call a function with pl/sql

    How does one call a function with pl/sql that uses a function?

    Hi,
    How does one call a function with pl/sql that uses a
    function?I'm not sure what you mean.
    In PL/SQL function can be used just about anywhere where an expression (with the same data type that the function returns). Arpit gave a very common example.
    Here's another example, where all the functions take a single NUMBER argument and return a NUMBER, so they can all be used in places where NUMBERs are used:
    IF  fun_a (fun_b (0)) < fun_c (1)
    THEN
        UPDATE  table_x
        SET     column_y = fun_d (2)
        WHERE   column_z = fun_e (ROUND ((fun_f (3), fun_g (4)));You call a function simply by using its name, followed by its argument list, if any.
    If the function is in a package, you must call it with the package name, like "pk_foo.bar (1, 2, 3)", unless the call comes from within the same package.
    If the function is owned by someone else, you must give the owner name, like "scott.bar (SYSDATE)" or "scott.pk_foo.bar (1, 2, 3)". You can create synonyms to avoid having to name the owner.

  • How to call a function with event

    How do I call a function with a event inside it?
    function showTopTen(e:Event):void
        highscoreData = new XML(e.target.data);
        trace("Hiscores: " + highscoreData.item[0].name.text() + " - " + highscoreData.item[0].score.text())
    //showTopTen();  ..??

    Could you indicate why you would want to?
    The eventhandler you show here uses the properties of the event object passed as an argument.
    The way I read it it is data retrieved from a server so your app won't know anything about is untill it is loaded from the server which should be done with an URLLoader object which in it's turn calls your eventHandler when the Event.COMPLETE is triggered.
    something like:
    var urlLoader = new URLLoader();
    urlLoader.addEventListener( Event.COMPLETE, showTopTen )
    urlLoader.load( new URLRequest( "http:// etc." ) );
    to me would seem the proper method to have the function execute.

  • Call function with arguments in AS3

    Hello!
    I`m a new in Flex developing, and cannot understand same code
    convention, im Java programmer.
    How I can write correct function call in ActionScript, my
    call: var goodsWnd:CreateGoodsWindow =
    PopUpManager.createPopUp(this,
    CreateGoodsWindow, true) as CreateGoodsWindow;
    I wish call function above with argument, how I do that?
    Where my class: public class CreateGoodsWindow extends
    extends TitleWindow
    public CreateGoodsWindow(data:Object)
    }

    Use PopUpManager.addPopUp() instead of createPopUp().
    addPopUp takes an object that has already been instantiated:
    var createGoodsWindow:CreateGoodsWindow = new
    CreateGoodsWindow(data);
    PopUpManager.addPopUp(createGoodsWindow);

  • How to call a function with generic table parameter

    Hi everybody
    I need to call function module RSAR_ODS_API_GET (from BW). It recive an internal table with request ids and should return in E_T_DATA "unstructured" data from the psa and in E_T_RSFIELDTXT the description of the data structure, I guess
    from sap help only thing I have reggarding how to use the function module is :
    "You can call up the function module RSAR_ODS_API_GET with the list of request IDs given by the function module RSSM_API_REQUEST_GET. The function module RSAR_ODS_API_GET no longer recognizes InfoSources on the interface, rather it recognizes the request IDs instead. With the parameter I_T_SELECTIONS, you can restrict reading data records in the PSA table with reference to the fields of the transfer structure. In your program, the selections are filled and transferred to the parameter I_T_SELECTIONS.
    The import parameter causes the function module to output the data records in the parameter E_T_DATA. Data output is unstructured, since the function module RSAR_ODS_API_GET works generically, and therefore does not recognize the specific structure of the PSA. You can find information on the field in the PSA table using the parameter E_T_RSFIELDTXT."
    unfortunately I when running de report bellow, I get a dump which says:
    Function parameter "E_DATA" is unknown
    in the definition of the interface E_DATA has no type, which  means it can recive any table type, right?
    So I have two questions?
    1) How to get the code working
    2) How do I use the parameter E_T_RSFIELDTXT to parse the data returned in E_DATA
    by debuging RSSM_API_REQUEST_GET for this code I found it try to put an internal table with the struct of the database table /BIC/B0000151000 in E_DATA
    Thanks a lot for any help
    rgds
    my test report is:
    REPORT  ZTEST_PSA_API.
    TABLES: /BIC/B0000151000 .
    TYPE-POOLS: RSSM.
    TYPES: BEGIN OF STC_REQ_LINE,
      sign(1),
             option(2),
             low  TYPE rsa_request,
             high TYPE rsa_request,
             END OF STC_REQ_LINE,
      IT_REQUEST TYPE STC_REQ_LINE OCCURS 0.
    DATA: lit_request TYPE RSSM_T_API_REQUEST_GET WITH HEADER LINE,
          lc_system TYPE RSSM_T_API_LOGSYS,
          lit_request1 TYPE IT_REQUEST WITH HEADER LINE.
    DATA: lc_dtarget_name TYPE RSA_ODSNAME,
          lit_meta_data TYPE RSARC_T_RSFIELDTXT.
    DATA: lt_psa_data LIKE /BIC/B0000151000 OCCURS 0.
    CALL FUNCTION 'RSSM_API_REQUEST_GET'
      EXPORTING
        I_SOURCE    = '2LIS_13_VDITM'
        I_TYP       = 'D'
        I_DATEFROM  = '20060627'
      IMPORTING
        E_T_REQUEST = lit_request[]
        E_T_LOGSYS  = lc_system
        EXCEPTIONS  = 1.
    READ TABLE lit_request.
    lit_request1-sign = 'I'.
    lit_request1-option = 'EQ'.
    lit_request1-low = lit_request-request .
    APPEND lit_request1 .
    break-point .
    CALL FUNCTION 'RSAR_ODS_API_GET'
      EXPORTING
        I_T_REQUEST = lit_request1[]
      IMPORTING
        E_ODSNAME = lc_dtarget_name
        E_T_RSFIELDTXT = lit_meta_data
      TABLES
        E_DATA = lt_psa_data
      EXCEPTIONS
        NO_DATA_FOUND = 1
        PARAMETER_FAILURE = 2
        REQUEST_NOT_AVAILABLE = 3
        NO_REQUEST_FOUND = 4
        NO_FIELDS_TO_ODS = 5
        NO_ODS_FOUND = 6
        PACKAGE_LOCKED_BY_LOADING = 7 .

    Try to pass table parameter without "[]" :
    CALL FUNCTION 'RSAR_ODS_API_GET'
    EXPORTING
    I_T_REQUEST = lit_request1
    IMPORTING
    E_ODSNAME = lc_dtarget_name
    E_T_RSFIELDTXT = lit_meta_data
    TABLES
    E_DATA = lt_psa_data

Maybe you are looking for

  • Itunes 9.0.2 ridiculously slow

    I am by no means the first person to post on this topic, but after reading through countless threads that all lead to the same frustrating "Where is Apple??" conclusion, I thought I would post my own thread to see if any light has been shed on the su

  • Getting key events without a jcomponent...

    Is it possible to get key events without adding a keylistener to a jpanel? I want a class of mine to manage input of it's own, but it has no reference to a jpanel. They don't necessarily have to be KeyEvents, but just some way to detect if a key has

  • Interpreting PLSQL RUNTIME DUMP

    Currently some jobs that import lots of data have crashed. I got an 100+ MB .trc in bdump directory, containing numerous times information like below snippet: /usr/local/oracle/admin/PROD/bdump/prod_j001_5205.trc Oracle9i Enterprise Edition Release 9

  • ITunes is not working with the 7.1 upgrade!

    My iTunes did the automatic upgrade 7.1.0.59 and it stop working. It was working perfect befored this upgrade. Now I open iTunes it loads up fine but when I try to listen to my music an error comes up ( iTunes has encountered a problem and needs to c

  • How do i import song from my iphone to my laptop?

    a couple of weeks ago, i was prompted to update my itunes so i did. however, ever since i did this, i have been having some problems with my laptop. so i backed up all my music to cds and did a factory restore for my laptop because this update caused