Deferred EL in dynamic attributes

According to the Sun Java EE 5 tutorial, using deferred EL ( #{} syntax) is forbidden for usage in a tag's dynamic attributes.
What's the exact use of making this illegal? (what problem does this rule solve?)
Anyway, I'm asking since I have developed lots of JSF 1.1 components with dynamic attributes that accept EL expressions. Technically it's not a problem. In the tag handler, I just itterate over all collected attributes, check if they're EL using the JSF API and if so create a value binding for them.
However, in JSP 2.1/JSF 1.2 the container prevents the "#{...}" string from reaching my tag handler code. This is very nasty. I can of course disable container evaluation for the entire page, but this is quite an ugly solution.
Is there any neat workaround for this problem?

When in doubt, check
the 2.1 spec. I'm guessing that the tutorial has a
doc error.You're right, I checked the (may 2006) JSP 2.1 spec, and on page 2-72, section 3 it says:
Dynamic attributes must be considered to accept request-time expression values
as well as deferred expressions.So, the tutorial is definitely wrong.
Maybe someone should notify Sun about this? It seems most people would resort to reading tutorials first instead of wading through the spec. Especially if a Sun tutorial states something, many people will probably consider it 'official'. Perhaps even the Tomcat folks have read said tutorial instead of the spec. Using an EL value in a dynamic attribute in Tomcat 6 causes a translation error.
Btw, I'm not 100% sure how to interpret this note from the spec:
Note that passing a String literal as a dynamic attribute will never be considered
as a deferred expression.What other way is there to pass a deferred expression than through a String litteral?

Similar Messages

  • Access dynamic attributes BPM; error while activating the process in sxi

    hi everybody,
    I have to access dynamic attributs in a BPM condition. I thought I could achive this when I click the radiobutton "contextobject" in the condition editor.
    When using the value-help button on the contextobject a huge list of objects is shown for selection.
    Strange to me is that also the radionbutton "interface-variable" is checked. I can not uncheck this radiobutton. But this makes the error while activating:
    "Containerelement 'IDOC_'MyContainerelement'{XSDSIMPLE::xsd:string;SHeaderSUBJECT:ht' does not exist".
    Has anybody expirience using the dynamic attributes/contextobjekts in BPM?
    Thanks, Regards Mario

    Hi all,
    it seems to be impossible to access the attributes:
    Technical Context Object in ccBPM
    Regards Mario

  • Create a dynamic attribute for each user

    Hi All,
    I request you all to let me know how to give an approach to the following requirement.
    REQUIREMENT: I have to create a dynamic attribute in UME for each user and the read the attribute on lead selection of a table having list of Users.
                             On lead selection, the dynamic attribute value should be either true or false. Based on this value the rest of the application specific operations wil be taken care.
                              If a particular User does not have the dynamic attribute associated to it, then we need to create the same.
    Looking forwarrd for your help.
    Regards
    Dipendra

    //@@begin javadoc:UMSavePropertiesByNode()
         /** Declared method. */
      //@@end
      public boolean UMSavePropertiesByNode( )
        //@@begin UMSavePropertiesByNode()
              try {
                   if (wdContext.currentUserDataElement().getVaIUserMaint().setAttribute("com.sap.security.core.usermanagement", this.getUMPropertyName(null) + ".TableColumns", this.getPropertiesByNode())) {
                        wdContext.currentUserDataElement().getVaIUserMaint().save();
                        wdContext.currentUserDataElement().getVaIUserMaint().commit();
                        msg.reportMessage(IMessageTableUtilsComponent.UMPROPERTY__SAVE__FIELDS__SUCCESS, null, false);
              } catch (UMException ex) {
                   wdContext.currentUserDataElement().getVaIUserMaint().rollback();
                   msg.reportMessage(IMessageTableUtilsComponent.UMPROPERTY__SAVE__FIELDS__ERROR, null, false);
                   return false;
              return true;
        //@@end
      //@@begin javadoc:UMLoadFieldsProperties()
         /** Declared method. */
      //@@end
      public petrobras.com.br.classes.FieldsTable UMLoadFieldsProperties( petrobras.com.br.classes.FieldsTable fields )
        //@@begin UMLoadFieldsProperties()
              String properties[] = wdContext.currentUserDataElement().getVaIUserMaint().getAttribute("com.sap.security.core.usermanagement", this.getUMPropertyName(null) + ".TableColumns");
              if (Compare.getLenght(properties) > 0) {
                   //msg.reportWarning("[UMLoadFieldsProperties]: properties.length = " + properties.length);
                   for (int i = 0; i < properties.length; i++) {
                        int attrPos = Integer.parseInt(properties<i>.substring(properties<i>.indexOf("(") + 1, properties<i>.indexOf(")")));
                        String attrName = (String) properties<i>.substring(properties<i>.indexOf(")") + 1, properties<i>.indexOf("="));
                        int attrValue = Integer.parseInt(properties<i>.substring(properties<i>.indexOf("=") + 1, properties<i>.indexOf(";")));
                        Field item = fields.getField(attrName);
                        if (item != null) {
                             item.setPosition(attrPos);
                             item.setVisibility(WDVisibility.valueOf(attrValue));
                             fields.removeFieldByName(attrName);
                             fields.addField(item);
              return fields;
        //@@end
    regards,
    Angelo

  • Dynamic Attribute in AS2 Receiver

    Hello,
    in the Seeburger AS2 Receiver channel I have found "AS Message ID" in the last of possible Dynamic Attributes. How do I set this one, so what is the name of the dynamic configuration key. Any idea on this?

    Let me expalin you the complete thing.
    In mapping i m using this UDF for dynamic subject.
    DateFormat dfCurrentDate = new SimpleDateFormat("yyyy-MM-dd");
    DateFormat dfCurrentTime = new SimpleDateFormat("HH:mm:ss.SS");
    Date dCurrentDate = new Date();
    String strCurrentDate = dfCurrentDate.format(dCurrentDate) + "T" + dfCurrentTime.format(dCurrentDate) + "Z";
    String strSubject="Literal"+ "_" + strCurrentDate;
    // Dynamic Subject
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey keySubject = DynamicConfigurationKey.create( "http://seeburger.com/xi/common/dtSubject", "DYNSUBJECT");
    conf.put(keySubject,strSubject);
    return "";
    In receiver service I have used "localejbs/Seeburger/AttribMapper" module.
    Parameter name  http://seeburger.com/xi/common/dtSubject
    Parameter value  @http://seeburger.com/xi/common/dtSubject/DYNSUBJECT
    In moni I can see the dynamic configuration tab(neither Tab nor value)
    But in RWB comm. channel monitoring I can see in Audit log but not in SOAP document.
    Hope i have cleared you..
    Thanks
    Jaideep

  • Need Dynamic attributes for XI adapter to use in Dynamic Configuration ..!!

    Hi Friends,
    We are planning send message to different receivers through XI adapter by using Dynamic Configuration.
    Can anyone please tell me what are the dynamic attributes used for XI adapter.
    In my scenario, I want to pass the Service Number and Path prefix of XI adpater dynamically by using sender ID from Idoc payload.
    I know how to use the dynamic configuration UDF in message mapping. But I don't know the dynamic attributes which we can pass to Service Number and Path prefix of XI adpater.
    Kindly suggest ..
    Thanks
    Deepthi.

    Hi Sourabh,
    >> You need to set these attributes explicitly in the adapter configuration..
    Can you please elaborate on this like how to implement this? Do we need to use any module configuration in the adapter?
    We will use XI adapter only while sending the data directly from IE without using any feautures of AE (like adapters, modules etc). It is like directly sending data from ABAP stack without using J2EE stack. That is the reason we can't use any Modules in XI adpater and it is in disabled by default.
    When I checked in SXMB_MONI.. as you said details are found in
    - <SAP:Attribute>
      <SAP:Name>host</SAP:Name>
      <SAP:Value>10.190.25.16</SAP:Value>
      </SAP:Attribute>
    - <SAP:Attribute>
      <SAP:Name>httpDestination</SAP:Name>
      <SAP:Value />
      </SAP:Attribute>
    - <SAP:Attribute>
      <SAP:Name>path</SAP:Name>
      <SAP:Value>/rcvA/receiver</SAP:Value>
      </SAP:Attribute>
    - <SAP:Attribute>
      <SAP:Name>port</SAP:Name>
      <SAP:Value>8210</SAP:Value>
      </SAP:Attribute>
    XI adapter uses mainly three parameters Host, Port and Path.
    I want to pass any two of these values dynamically to achieve my solution. Can you please suggest your solution how we can implement it.
    -Deepthi.

  • Dynamic Attributes with UDF - NullPointerException

    Hello,
    I want to set the file name of an file receiver by means of setting dynamic attributes in an UDF.
    I use the following code and map the output to the root node of the target message (one input variable is var1)
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String myFileName = var1;
    conf.put(key, myFileName);
    return "";
    When I want to test the mapping using the test tab I get a null pointer exception:
    Exception:[java.lang.NullPointerException] in class com.sap.xi.tf
    Could the reason be, that setting dynamic attributes does not work when testing a mapping as the mapping has to be called by the IE runtime or is there any other reason?

    Hi Florain,
    I can understand, but that is how it is designed because the filename paramter can be picked up only during the runtime. But if you use other parameters like interface, sender name etc you can test it in mapping. Please go to test tab and click on parameters  tab. There you see few parameters for runtime also. You can put some value there and then you can test the mapping and you will not receive that error. You dont have filename there, so thats the reason why you are getting error. Hope in next release SAP would come up with this option.
    Regards,
    ---Satish

  • Seeburger AS2 Adapter - Dynamic Attributes

    Dear all,
    We have a scenario where, we are sending an IDOC from our SAP system via XI to one of our partner using AS2.
    We have to manipulate the file name at the receiver end using the dynamic attributes of the AS2 communication channel.
    As per the documentation and the following threads
    Re: File to AS2 File Name? we have done the necessary configuration in the communication channel. The following activites are done
    Selected the checkbox "Use dynamic attributes"
    Under the Module tab
    In Processing sequence added a new entry
    Number 1
    Module Name : localejbs/Seeburger/solution/as2
    Module Type  : Local enterprise bean
    Module Key   :  "dynfile"
    Under the Module Configuration added the following details
    Module key  :  "dynfile"
    Parameter Name : "http://seeburger.com/xi/AS2/dtAS2FileName"
    Parameter Value : "DYNFILENAME"
    However, I understand that this configuration is incomplete, as somewhere i need to pass the value to the variable "DYNFILENAME".
    As per the thred Re: File to AS2 File Name?, Mr Srinivas Reddy mentioned 5 steps, however I am not clear about the step 3 & 4.
    FYI : What I want to map as the file name is the Parter Profile in the EDIDC40 segment of the idoc and the date+time stamp
    Many thanks for the help , in advance
    Regards : Bobby Bal
    Edited by: Bobby Bal on Sep 20, 2010 9:52 PM

    Hi,
    Use the below UDF in your mapping..
    public String FileName(String a,Container container){
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters()
    .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://seeburger.com/xi/AS2","dtSubject");
    conf.put(key, a);
    As per your requirement, Use Concatenate function  Idoc + Date + Time .
    Pass the resultant value to the UDF and pass this to any unused Target node.
    IDOC + Time+Date --> UDF --> Target node.
    In your receiver AS2 adapter, Click on use dynamic attributes and  Subject check boxes.
    If you want to use other Dynamic attributes like dtAS2FileName, dtAS2ContentType ..
    Simply replace the dtSubject with dtAS2FileName or  dtAS2ContentType . No need to use any modules.
    Thanks
    Deepthi.

  • Error in committing data while using dynamic attributes

    Hi,
    Module: Performance Management
    Page: Give Final Ratings: Main Appraiser
    Here, I have used dynamic attributes to show the competency name without segments.
    I have added this attribute through controller and i passed value to this attribute in the same ProcessRequest method.
    But, when the manager tries to complete the appraisal for his employee by pressing the continue button in the above mentioned page, the following exception is throwing.
    "This competence already exists within the assessment."
    Is this dynamic attribute will be the problem for this?
    can any one please tell me?
    Thanks in advance,
    SAN

    Hi,
    If you added the column from Extended Controller. It should be a transient attribute to the VO and I think it should not create any issues.
    Error "This competence already exists within the assessment." looks like from an FND Message , You can try to debug this issue by finding the FND Message Name corresponding to the error and search the Message Name in the seeded code.
    -Idris

  • Easy and efficient way to set dynamic attributes

    My integration scenario is quite complex involving many different receivers and an integration process. For some receivers I have to set dynamic attributes.
    I know that I can set them by using a UDF, however in my case I mostly use XSLT so this is not applicable.
    Is there any other way to do this relatively easy so that I can avoid Java Mappings? Problem ist that I would need to use several Java Mappings to set the attributes where no transformation to the payload itself is taking place which seems to be too much for me. Especially when I consider that these Java Mappings are hard to maintain as they have to be imported again and again if any changes occur.
    So my question is:
    1. Do I really have to go for several Java Mappings just to set some dynamic attributes ?
    2. If so, should I use different Java Packages or is it advisable to leave all Java Mappings in one package?

    Hi Florian,
    yes, you can!
    set dyn atts in XSLT:
    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:map="java:java.util.Map" xmlns:dyn="java:com.sap.aii.mapping.api.DynamicConfiguration" xmlns:key="java:com.sap.aii.mapping.api.DynamicConfigurationKey">
    <xsl:if test="REFERENCEQUALIFIER='MSU'">
         <xsl:variable name="dynamic-conf" select="map:get($inputparam, 'DynamicConfiguration')"></xsl:variable>
         <!--  mit dem folgenden Key-Key-Paar muss dann via UDF die Adresse aus den dyn. Attr. gelesen werden -->
              <xsl:variable name="dynamic-key" select="key:create('http://sap.com/xi/XI/System/Mail', 'MAILADRESS_SU')"></xsl:variable>
              <xsl:variable name="dummy" select="dyn:put($dynamic-conf, $dynamic-key, $MAILADRESS)"></xsl:variable>
              <xsl:comment>Mailadresse SU ermittelt: <xsl:value-of select="$MAILADRESS"></xsl:value-of>
              </xsl:comment>
    Hoffe es hilft.
    Grüße
    Mario
    Edited by: Mario Müller on Oct 15, 2009 1:47 PM

  • Extended receiver determination and Dynamic attributes

    Hello,
    is it possible to access dynamic attributes within an extended receiver determination? Can I modify / set dynamic attributes of an XI message within an UDF in the extended receiver determination mapping?
    In detail: In my scenario I want to use an extended rec. determination, make a lookup in a DB inside the determination in order to define the receiver, and based on the lookup result I want to add some information as dynamic attributes to the XI message, which then can be accessed in the interface determination as conditions.
    Thanks,
    Chris

    Hi,
    In my scenario I want to use an extended rec. determination, make a lookup in a DB inside the determination in order to define the receiver, and based on the lookup result I want to add some information as dynamic attributes to the XI message, which then can be accessed in the interface determination as conditions - See you can do a DB lookup in a msg mapping........but by the time you have reached msg mapping your receiver determination will be done......so  your receiver is already decided............Extended recever determination is for dynamically choosing a recever based on source msg's data.........
    Regards,
    Rajeev Gupta

  • Spec oversight? Using dynamic-attributes in XML tag files

    I have a couple of tagfiles that generate form elements with specific conventions for the 'name' and 'value' attribute. Basically, a data binding framework.
    Dynamic attributes are useful because you can delegate all the usual html attributes to the generated HTML form element: SELECT, INPUT, id, class etc.
    The usual way to do this is to concatenate all the "pass-through" attributes to a string, and append this string to the element generated:
    <input type="hidden" name="foo" ${dynattrs}/>I'm wondering how to do this in a tagfile in XML format (mytag.tagx), since the XML format forbids syntax like in the example above.
    jsp:attribute won't help much, if it's nested inside a c:forEach: it won't apply to the right element.

    Ran into the same problem with 'optional attributes'. (see post "JSP 2.0 Tag files outputting elements with conditional attributes" http://forum.java.sun.com/thread.jspa?forumID=45&threadID=681033)
    Found a solution that is not very elegant but does work and saves you the trouble of reverting to Java Tags. Consider the following tag-file that outputs an html input-tag with conditional attributes:
    <?xml version="1.0" encoding="utf-8"?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="1.2"
         xmlns:c="http://java.sun.com/jsp/jstl/core">
         <jsp:directive.attribute name="name" required="true" type="java.lang.String"/>
         <jsp:directive.attribute name="id" required="false" type="java.lang.String"/>
         <jsp:directive.attribute name="value" required="false" type="java.lang.String"/>
         <jsp:directive.attribute name="disabled" required="false" type="java.lang.Boolean"/>
         <jsp:directive.attribute name="hint" required="false" type="java.lang.String"/>
         <jsp:directive.attribute name="cssClass" required="false" type="java.lang.String"/>
         <jsp:text><![CDATA[<input type="text" name="]]><c:out value="${name}"/><![CDATA["]]></jsp:text>
         <c:if test="${!empty id}"><![CDATA[ id="]]><c:out value="${id}"/><![CDATA["]]></c:if>
         <c:if test="${!empty cssClass}"><![CDATA[ class="]]><c:out value="${disabled?(cssClass + '-disabled'):cssClass}"/><![CDATA["]]></c:if>
         <c:if test="${disabled}"><![CDATA[ disabled="disabled"]]></c:if>
         <c:choose>
              <c:when test="${!empty value}"><![CDATA[ value="]]><c:out value="${value}"/><![CDATA["]]></c:when>
              <c:when test="${!empty hint}"><![CDATA[ value="]]><c:out value="${hint}"/><![CDATA[" onfocus="if(this.value==']]><c:out value="${hint}"/><![CDATA[')this.value='';"]]></c:when>
         </c:choose>
         <jsp:text><![CDATA[/>]]></jsp:text>
    </jsp:root>In answer to your question: Yes, it looks like an oversight. Using the jsp:attribute tag in a c:forEach doesn't work because the attribute is then applied to the forEach tag. You would have to put the attribute-tag inside a jsp:body tag (inside the forEach). Then it would apply not to the forEach tag but to the tag enclosing the forEach. However, this doesn't work either, or at least it doesn't work in Tomcat 5.5. Could be a bug though, JSP 2.0 is still very buggy (for instance, using a tagfile inside another tagfile from the same taglib doesn't seem to work either...)
    Anyway, if you ever find a good solution please let me know by posting to this topic!
    TIA

  • CRM Loyalty Management - Dynamic attributes

    Hi,
    I am new to loyalty management. I wanted to know what is dynamic attributes which is linked to loyalty programs in loyalty management?
    I know its theoritical meaning but if any one could explain with an practical example then it would be really helpful.
    Thanks
    Saurabh

    Hi Saurabh,
    Example
    You use dynamic attributes to do the following:
    Recognize and reward your most frequent customers.You assign a dynamic attribute “Number of purchases” to a reward rule. You set up the reward rule so that the system updates the dynamic attribute in memberships. You define that members can move to the next tier in the tier group after 20 qualifying purchases. When a member in the “reward” tier group makes a qualifying purchase, the system updates the dynamic attribute in their membership. With the tier change reward rule, the system checks if the dynamic attribute reaches the value 20, and if so, moves the member to the next tier.
    Find out which of your usually frequent customers have not made a recent purchase.You assign the dynamic attribute “Date of last purchase” to another reward rule. You set up the reward rule so that the system updates the dynamic attribute in memberships. You use the dynamic attribute as a condition, to find out when a member in the “gold” tier of the “reward” tier group has not made a purchase for over one month.
    You can find more information on the below link.
    http://help.sap.com/saphelp_crm700_ehp03/helpdata/en/70/ea16956c54485083b7703ff498ef60/content.htm?frameset=/en/d9/407fbbba274c8c9df0248f56cc73e9/frameset.htm&current_toc=/en/80/775a4b17664be7ba4a6df3b5966128/plain.htm&node_id=30
    Regards
    Pramod

  • Fixed values of dynamic attributes are not displayed for bid response

    Hi
    I have created a bid with dynamic attributes and have weighted the options with fixed values. I publish the Rfx (bid) and all is ok. The problem is that the fixed values are not displaying when doing a bid response.
    We are using SRM 7.0
    Can anyone help?

    No. Not yet. I think it is a bug. You should create an OSS message to SAP and ask them to pay special attention to the following code block:
    Class: /SAPSRM/CL_CH_WD_DODM_DYNATTR
    Method: /SAPSRM/IF_CLL_MAPPER~REFRESH
    At the end of the method, look for code context:
    IF lv_object_type = c_qte.
    *Set the Fixed Values Table to Invisible
        lv_visible = abap_false.

  • Change non-dynamic attributes of MBeans to dynamic attributes

    Hi All,
    I have legacy code (for WL 8.1), that must run with WL 10.3. There are old Admin scripts for the domain-configuration of the application. During the configuration of the domain, the scripts are trying to set some MBean properties. These properties are non-dynamic, so consuming the change of these properties requires a restart of the Administration Server.
    Is there a way to make these non-dynamic attributes to be dynamic? So, how can I omit the restart(s) of the server?
    The messages in the log file are like this:
    A non-dynamic change has been made which affects the server adminServer. This server must be rebooted in order to consume this change.
    Interestingly, in the log files of the old system (WL 8.1) there is no sign of the need of reboot. In those logs, there is nothing like "non-dynamic", "restart", "reboot".
    József
    Edited by: Jozsef Halasz on 2009.08.03. 15:54

    It is not possible to change the font family of smartstyles. Yes, you are write... Uni-code enable printer cannot support Helve fonts we should use HELVECRYL (cyrillic fonts) else alignment of quantity, amounts all gets truncated.
    Regards,
    SaiRam

  • Tag Files: dynamic attributes

    Hello,
    I'm not quite sure what the following quote means. It's from the JSP 2.0 spec.
    For dynamic-attributes attribute of Tag File:
    "Only dynamic attributes with no uri are to be present in the Map; all other dynamic attributes are ignored."

    Could someone help me here?

Maybe you are looking for

  • Mac Pro Boot Problems After 10.6.2 Update

    After installing the latest version of snow leopard I am now having boot problems on my mac pro. Symptoms; -Screen resolution is incorrect at apple splash screen. -Takes a lot longer than usual to boot. -Once booted the blue tooth magic mouse isn't i

  • Odd Font Display issues.

    http://www.kieru.com/mac.jpg (406 Kb) This is what my screen sometimes looks like - and I have no idea why. I use Mozilla Firefox on a 20" Intel Core Duo iMac running OSX 10.4.7. I thought I fixed this problem when I hand-sorted through 1,800 fonts a

  • How can I stop all of my old emails from downloading to my new iphone?

    When I upgraded to iphone 4S a few years ago, hundreds and hundreds of old emails suddenly downloaded to my iphone, and I couldn't stop it. I can't remember how I resolved the problem then -- but it is happening again with my new iphone 6. My badge i

  • Change asset ownership

    A developer created a web site for me and copied jpeg files to pages. I'm editing the pages and get the following error message. This document contains a link to an asset being upsampled. When I looked at the asset in the panel I discover a question

  • Infotype 2011 corresponding  RFC in Component version 5.0

    Hi all ,    I am very new to SAP. Basicaly i am a XI consutnat. Now i am working on HR scenario infotype 2011. what my task is i have to insert employee, third party access control data to the R/3 system. I am woking on SAP ERP Central Component 5.0.