Missing membership checking functionality in a collection

Why did the designers of the JSTL EL decided to not include such an important functionality. There are many cases where I want to do something different if a specific element is present in a collection. Simply being able to iterate over is not enough.
Folks in this forum sugested to refactor the code to use a Map instead of a List/Set, then check for map["myElement"]. This works, but only if your values in the collection happen to be simple strings. Most of the time values in my map are objects.
Any thoughts?

Iam interested as I have had similar problems. Basically I set out to use jstl to check if a certain attribute exists in session and this is what I came up with,
<%
java.util.Enumeration en = session.getAttributeNames();
pageContext.setAttribute("en",en);%>
<c:forEach var="attr" items="${en}">
   <c:if test = "${attr eq value}">
      yes..process
   </c:if>
</c:forEach>Forgive my stupidity if there is an easy way around.
I have another complaint here ::: I have read that jstl looks for a 'get' method. It doesnt access the variable directly. However it looks like it requires both the variable and the associated get() method for it to work, because
<c:forEach var="attr" items="${session.attributeNames}"> in the above doesnt work. Iam forced to use a scriptlet. I guess this is because there is no Enumeration variable named 'attributeNames' in the HttpSession class. However my thinking was that as long as it is an instance method, why should jstl be bothered if the value is stored in an instance variable.
Last but not the least, how does conversion of a List/Set to Map help ?
ram.

Similar Messages

  • Missing part check at goods receipt or transfer posting

    How Missing part check at goods receipt or transfer posting is different from availabilty check in production order.??
    In which conditions we would use Missing part check at goods receipt or transfer posting ??
    Is it possible for same component to behave differently in Missing part check at goods receipt or transfer posting or availabilty check in production order ?

    missing parts check is possible at the time of a goods receipt, other receipt, or transfer posting.
    if the missing parts check function is active in the plant, the system checks whether the material posted as a receipt is a missing part.
    if it is a missing part, the system issues a warning message and sends an e-mail to the MRP controller responsible in the plant. assigning the missing part to a particular goods recipient takes place with the missing part processing in the application component Warehouse Management
    please also check here:
    http://help.sap.com/saphelp_47x200/helpdata/en/41/191fdb45fd11d188ff0000e8322f96/frameset.htm

  • How do I "see" a check function module in the debugger?

    I am correctly starting a custom workflow based on an event raised by standard SAP code in transaciton QE51N.
    I have to write a check function module to interrogate the event and start/not start
    the workflow because the same event is raised by SAP code in transaction QA02, and I have to be sure to start the workflow only if the event is raised in QE51N, not QA02.  (I also have to check some other properties of the QALS row for the inspection lot.)
    I know how to code the check function module, but if I need to debug it, how do I "set-up" for seeing the check function module in the debugger?
    I'm sure this is an obvious question and that I'm missing something simple.
    So thanks in advance for the answer.
    djh

    Dear DJH,
    Put a break-point in the function module and process the transaction. It will stop at runtime.
    Hope this will help.
    Regards,
    Naveen.

  • Missing part check functionaliy at the time of GR when using IDOCS

    Hi All,
    We are using IDOCs to record the the Good Receipt for the Purchase Orders.
    Then a BAPI is called to post the GR.
    There is a functionality for missing parts checks which can be activated at the time of GR which checks the ATP & sends mail to MRP controller.
    When we directly use the MIGO, then missing part check is activated & a mail is sent to MRP controller.
    If we use the IDOC to post the GR, the missing part check is not activated & mhence mail is not sent to MRP controller.
    Pl let us know if there is a way by which we can activate the missing part check in GR using IDOCS.
    Regards
    Vineet

    Hi,
    The G/L accounts which you give in the PO will be Debited & your vendor A/c will be crdtd at the time of LIV.
    Thanks & Regards,

  • Even in Safe Mode, minimize, restore, and close buttons are missing, though the functions remain, and a dialog box now comes up when opening FF.

    Ever since I installed the latest Firefox update, the minimize, restore, and close buttons are visually missing, though their functions are still present.
    I have also started to have one of those dialog boxes asking whether or not I would like to allow a program to make changes to my PC come up when I open Firefox.

    Check that Firefox isn't set to run as Administrator.
    Right-click the Firefox desktop shortcut and choose "Properties".
    Make sure that all items are deselected in the "Compatibility" tab of the Properties window.
    * Privilege Level: "Run this program as Administrator" should not be selected
    * "Run this program in compatibility mode for:" should not be selected
    Also check the Properties of the firefox.exe program in the Firefox program folder (C:\Program Files\Mozilla Firefox\).
    If you can't make the changes then you need to start Windows Explorer as Administrator.

  • Vision Acquisition Software installed, BUT why is the IMAQdx missing from the function palette?

    I just installed to the labview 2011, and many other modules and softwares including this VASAugust2010. But the IMAQdx is missing from the function palette (vision and motion). However the NI-IMAQ 4.5, IN-IMAQ IO 2.4.0 and NI-IMAQdx 3.7 are all clearly listed as installed in the NI software (contorl panel -> program - NI). In MAX, my usb webcam is also listed as NI-IMAQdx Devices and works well under MAX. But my own program is broken because the LV can't find those functions. So why the IMAQdx funtion is missing and how to fix it?  
    Thanks,
    Lei

    hi tommy
    check this may helps you http://digital.ni.com/public.nsf/allkb/A451D3CCBB740716862578FC004DB392
    Sasi.
    Certified LabVIEW Associate Developer
    If you can DREAM it, You can DO it - Walt Disney

  • Error messages in CRM2007 web ui from check function module

    Hi Experts,
    I want to display a warning/error in CRM webUI from my check function module. Moreover, in CRM GUI if i write a message like
    MESSAGE ID 'ZCRM' TYPE 'W' NUMBER '000'
                    WITH 'Warning Message'.
    it exits the transaction.
    Can anyone please suggest how do I go about this.
    Warm Regards,
    Abdullah

    Hi Dhawani,
    Hi Pavan,
    Can you please elaborate...how this will help??
    Thanks
    Dhwani
    I dont know the specific reason but internally there may some inconsistancy but i faced the same error and i tried with saving it in the package.
    Thanks

  • Missing some basic functionality

    I seem to be missing some basic functionality, like switching to tty1-n using Ctrl+Alt+F1-n.  I can't begin to guess what this is related to, as after several installs I've never experienced that to be missing.  Can anyone point me in the right directions?  Thanks.

    evr wrote:I was recently having problems with commands like because i was using "thinkpad" as the input.xkb.layout value in /etc/hal/fdi/policy/10-keymap.fdi.  Changing to "us" helped me, perhaps that's the issue?
    Hm.  I don't actually have that file in the policy directory.

  • Read workitem Container Value in Terminating event Check Function Module

    Hi
    I have some problems reading work item data / values of a work item container element in a check function module on a terminating event – Do any of you know if this is possible, and if so, how it’s done ?
    In My scenario I have created a multiline approval step for my business document, one task pr Line Owner.  The Event Approved is defined as a terminating event for this task, and the line owner is passed to the task container.
    Now, when I raise the event, with the line owner as an event parameter, I would like to check if the line owner on the raised event, matches the line owner in the task container in question in a check fm. But here I faced the problem, that only event data, and not work item data, are passed to the Check Function module.
    Regards,
    Morten Nielsen

    Hello Morten, hello Arghadip,
    in the instance linkage's check function module (entered via transaction SWEINST) you'll have the workitem-id in the system event parameter EVTRECEIVER_ID
    With this number you can use the frame work in order to read the work item container.
    This is a sample coding, how you access the correct work item container using SAP Enterprise and it's new OO frame work, which checks on the terminating event of BUS2105.Released the correct release code for a work item.
    INCLUDE <cntn01>.
    INCLUDE <SWFCNTN01>.
    INCLUDE RSWEINCL.
    *** Read workitem instance and container from event
           DATA: wi_id            TYPE swwwihead-wi_id.
           swc_get_element EVENT_CONTAINER evt_receiver_id wi_id.
           IF sy-subrc <> 0.
              MESSAGE E015(ZPREL) WITH evt_receiver_id
                                           RAISING wrong_call.
           ENDIF.
           DATA: lv_wi_handle    TYPE REF TO if_swf_run_wim_internal.
           DATA: ls_context      TYPE sww_wimctx.
           DATA: lv_wi_container TYPE REF TO if_swf_cnt_container.
    *    - set context
           ls_context-do_commit  = ' '.
           ls_context-called_btc = 'X'.
           ls_context-exec_user  = sy-uname.
           ls_context-fbname     = 'Z_CHECK_RELEASE_CODE'.
           CLEAR lv_wi_handle.
           CALL METHOD cl_swf_run_wim_factory=>initialize( ).
           CALL METHOD cl_swf_run_wim_factory=>find_by_wiid
                   EXPORTING
                      im_wiid             = wi_id
                      im_read_for_update  = ' '
    *                 im_enqueue_owner    = fb_name
    *                 im_wait_for_enqueue = 'X'
                      im_context          = ls_context
                   RECEIVING
                      re_instance         = lv_wi_handle.
    *** This check is only done for workitem linkage TS90100081
           IF lv_wi_handle->m_sww_wihead-wi_rh_task <> 'TS90100081'. "#EC_SYNTEXT
              EXIT. "Let event pass, as this is an instance linkage to another workitem
           ENDIF.
           DATA: releaseCode_wi        TYPE t16fc-frgco.
    *    - read releaseCode from workitem container
           lv_wi_container = lv_wi_handle->get_wi_container( ).
    *    - perform binding event container -> workitem container
           swf_get_element lv_wi_container 'RELEASECODE' releaseCode_wi.
          DATA: e             TYPE REF TO cx_swf_run_wim.
          CATCH cx_swf_run_wim INTO e.
             RAISE WORKFLOW_RUNTIME_ERROR.
       ENDTRY.
    *** From here on, the variable releaseCode_WI hold the
    *** container element RelaseCode of the work item, that
    *** is going to be terminated...
    *** Further coding from here as appropriate...
    Best regards,
    Florin

  • Spell Check Functionality in CRM 2007

    Hi Experts,
    Do we have spell check functionality in CRM 2007, If yes, How & where can we enable it ?
    For example if a sales representative/Manager types something in NOTES, they should able to spellcheck.
    Thanks & Regards
    Shiven

    I dont think there is SAP spellcheck functionality available. Your best bet would be to download a spellcheck plug-in for your web browser.
    Hope this helps
    Regards
    David

  • Spell check functionality in OA Framework

    In the absence of spell check functionality for OA applications, is there any workaround or custom code to have a spell check functionality in OA framework. The customer does not want to use the Google spellcheker or JSpell.

    Check this link http://weblogs.asp.net/pwelter34/archive/2005/07/19/419838.aspx
    Do a google on this topic and you will find more similar references.
    --Shiv                                                                                                                                                                                                                                                                                                                                   

  • How to use Spell-check functionality for textbox (like Orkut, gtalk)

    How to use Spell-check functionality for tex Hello Friends,
    I am working on a JSP application. I wanted to add Spell check for text box like we have here, when we post a message. It automatically shows red line under the word, when ever spelling is wrong. Please tell me how I can do this. If possible, the code too.
    Thanks.

    I believe the spell checking you see here, or on any other site, is the spell checking built into Firefox. At least that's what I see. Are you using Firefox?

  • My phone is miss please check the imei for me thanks

    my phone is miss please check the ime for me thanks.

    Apple does not track phones.
    Contact law enforcement if you believe the device has been stolen.
    If it is merely lost, start looking for it.
    If the "Find My iPhone" feature had been enabled prior to to losing the device, it would be trackable via www.icloud.com

  • What is the difference using start condition and check function module

    what is the difference  between using start condition and check function module

    That's new to me, I thought a start condition was evaluated before the workflow started, and thus now workflow work item is available. That's why I think the only situation in which start conditions/check functions can't be used, is when the availability of a workflow log for investigation of exactly what stopped the workflow is a requirement.
    I suppose the <a href="http://help.sap.com/saphelp_46c/helpdata/en/4c/86bf43feca11d2a64f0060087a79ea/frameset.htm">SAP documentation</a> is in need of an update.

  • Check Function Module is not working

    Hi All Expert,
    I'm new in workflow and  develop custom workflow for Transaction FB65 ( Vendor Credit Memo) and using business object FIPP , event CREATED.
    Actually  requirement is that when user  click on park button in FB65 then should  be trigger workflow only for particular vendor code .
    Now my workflow is working fine for all vendor code.
    For particular vendor code, I have created an new entries in  SWE2 and assigning a check function module to that
    Refer Link :         http://www.****************/Tutorials/Workflow/checkfunctionmodule/demo.htm
    and also same entries create in SWETYPV But Check Function Module is not working before workflow trigger.
    Appreciate your help and support.
    Regards
    Saurabh

    Hi
    : Check FM  : ZWF_DR_CR_MEMO 
    SourceCode :
    FUNCTION ZWF_DR_CR_MEMO.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(OBJTYPE) LIKE  SWETYPECOU-OBJTYPE
    *"     VALUE(OBJKEY) LIKE  SWEINSTCOU-OBJKEY
    *"     VALUE(EVENT) LIKE  SWETYPECOU-EVENT
    *"     VALUE(RECTYPE) LIKE  SWETYPECOU-RECTYPE
    *"  EXPORTING
    *"     REFERENCE(RESULT) TYPE  C
    *"  TABLES
    *"      EVENT_CONTAINER STRUCTURE  SWCONT
    *"  EXCEPTIONS
    *"      NOT_TRIGGERED
    BREAK-POINT.
    TABLES : VBSEGK.
      DATA : LV_VEND TYPE VBSEG-LIFNR.
      CLEAR : LV_VEND.
      SELECT SINGLE  LIFNR FROM  VBSEGK INTO LV_VEND WHERE BELNR EQ OBJKEY.
        if sy-subrc eq 0
          IF LV_VEND = '0000120510'.
            RAISE NOT_TRIGGERED.
          ENDIF
      endif.
    ENDFUNCTION.

Maybe you are looking for

  • Variable Wastage % based on Order Qty

    Hi All, I have a requirement to maintain a variable wastage % based on order qty for my raw-materials. For instance, in cases where the order qty < 500 the wastage should be 5%, if the order qty > 500 and < 1000 then the wastage should be 6% and so o

  • My laptop body is getting current while charging...what to do guys?

    my laptop body is getting current while charging...what to do guys?

  • DOWNLOAD into EXCEL -URGENT

    Hi, I am downloading data to excel file. Some fields has data like 0013, but when it goes to excel cell, it becomes 13 instead of 0013. So, while uploading, it is a problem.... That to the field has check table and it looks for only 0013 and not 13.

  • Trouble printing webpage designed in DW using CSS

    I'm using CSS for the first time to design a website in Dreamweaver MX 2004. I'm using a stylesheet for all of the styling, but when I preview the document in the browser, and try to view it in print preview, the printer continuously spools more and

  • Would someone please help me with Right Click or left click on my mouse

    Hi I am trying to use one of the side mouse keys to bring up the menu as if I am hitting the control key. I have changed them to secondary with no luck. I have read several post and still I cant find it. Looking at the apple site it says to change it