Using text_input value Attribute - Prefill Entry

I'm a newbie - I'm trying to prefill data entry on the Customer form of the CarDemo. I can add static values setting the value attribute, but I'd like to use request header or cookie values. Is that available through the implicit objects mentioned in the tutorial. I've tried a lot of combinations with no success:
<h:input_text value="cookie["NAME"]" valueRef="CustomerBean.firstName" >
Returns an error of:
org.apache.jasper.JasperException: /Customer.jsp(89,39) equal symbol expected
     at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:83)
     at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:363)
     at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:123)
     at org.apache.jasper.compiler.Parser.parseAttribute(Parser.java:240)
Any help here would be appreciated. Thanks,
Matt

Matt,
First of all, you can use either the value property or the valueRef property, but not both. If your CustomerBean hasn't been created yet, you can used the managed bean facility and initialize the bean's properties via faces-config.xml:
  <managed-bean>
    <managed-bean-name>CustomerBean</managed-bean-name>
    <managed-bean-class>com.jeff.CustomerBean</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
      <property-name>firstName</property-name>
      <value-ref>cookie["NAME"]</value-ref>
    </managed-property>
  </managed-bean>This way, the first time a component references the CustomerBean, it'll be created and the firstName property will be set to cookie["NAME"]. Of course this won't work if you create the CustomerBean some other way (like loading it from a database). In that case, you'll need to set up the values when you load the object (presumably in some Action). Also remember that this method initializes the value once -- it doesn't update it all the time.
Kito D. Mann
Author, JSF in Action
JSF FAQ: http://www.jsfcentral.com
I'm a newbie - I'm trying to prefill data entry on the
Customer form of the CarDemo. I can add static values
setting the value attribute, but I'd like to use
request header or cookie values. Is that available
through the implicit objects mentioned in the
tutorial. I've tried a lot of combinations with no
success:
<h:input_text value="cookie["NAME"]"
valueRef="CustomerBean.firstName" >
Returns an error of:
org.apache.jasper.JasperException:
/Customer.jsp(89,39) equal symbol expected
at
org.apache.jasper.compiler.DefaultErrorHandler.jspErro
(DefaultErrorHandler.java:83)
at
org.apache.jasper.compiler.ErrorDispatcher.dispatch(Er
orDispatcher.java:363)
at
org.apache.jasper.compiler.ErrorDispatcher.jspError(Er
orDispatcher.java:123)
at
org.apache.jasper.compiler.Parser.parseAttribute(Parse
.java:240)
Any help here would be appreciated. Thanks,
Matt

Similar Messages

  • Using multi-value attributes in out-of-box query application

    Hello.
    I am using SES 10.1.8.4.0.
    I have a Database data source and one of the attributes is multi-value, populated by an attributeQuery in the Query File (for example: SELECT attribute from Attributes a WHERE a.key = ##KEY##)
    When searching I can use the queries "attribute:value1" and "attribute:value2", and my document is found by both queries. That is expected behaviour.
    I need to show a concatenation of all the values for the attribute using the out-of-box query application, for example "Attribute: value1, value2". However, it seems that only "value1" is available in the <result> XML passed to the custom stylesheet. This is not expected behaviour, and it is a problem that I need to solve. What are my options?
    Regards,
    Brian Nielsen

    This is a limitation in the SES client-side API - multi value fields can be stored and searched on, but not displayed. I thought I had logged a bug on this but can't find it - maybe someone else logged it.
    The best (though not great) solution is to store the attributes twice - once in a proper multivalued field for searching, and again as a single comma separated list in a different attribute for retrieval.

  • Difference between using Binding and Value Attribute

    what is the deference between using binding and value attribute, when I use binding attribute at the time of Value change listener is behaving like action listener,
    Ex:
    If I use value attribute, at the time of value change listener the component is not showing the result in the component but when I use Binding attribute it is happening automatically. So I want to know how the binding attribute is working.
    I know, at the time of binding attribute the component is creating an instance at the bean side, So even also how it is following the life cycle of the JSF Frame work, and also Please suggest me weather which one is better to use either Binding or Value?

    JNaveen wrote:
    If I use value attribute, at the time of value change listener the component is not showing the result in the component but when I use Binding attribute it is happening automatically. So I want to know how the binding attribute is working.You need to learn about the JSF lifecycle. The ValueChangeEvent is invoked after conversion and validation in the 3rd phase, while the model values are updated in the 4th phase. In the valueChangeListener method you normally use ValueChangeEvent#getNewValue() to get the new value after the change.
    I know, at the time of binding attribute the component is creating an instance at the bean side, So even also how it is following the life cycle of the JSF Frame work, and also Please suggest me weather which one is better to use either Binding or Value?Use the 'value' attribute to bind the value to the bean. Use the 'binding' attribute to bind the component to the bean. If you don't need to precreate the component or do other things than getting/setting its value, then there is no need for the 'binding' attribute.
    Read on those links if you want to know something more about the JSF lifecycle:
    [http://balusc.blogspot.com/2006/09/debug-jsf-lifecycle.html].
    [http://jcp.org/aboutJava/communityprocess/final/jsr252/index.html] (pick 1st download).

  • Multi value attribute in IB - how does it affect system (crm 4.0)

    Hi,
    Is there any limitation when using Multi value attribute in set type which is used for Individual object in IB?
    I have succeed in implementation of Multi value variable feature in CRM 4.0 . this change is irreversible so I wish to know what are the _risks moving it to production.
    (We use IB VERY heavily with single value attributes)
    Does it affect performance? other features?
    Thanks
    Rachel

    hi there
    due to the pain of sending the single value attribute in production,we usually try create multi value attribute so that multidimensional usefulness takes place.
    i really don see any limitation and risk sending those in production,infact it will serve u a good cause there
    just procede with that,so far we havent observed any defect doing that in projects
    best regards
    ashish

  • Using "Update All Mapped Fields" with multi-value attributes

    Is it possible to update a value in a multi-value attribute through the import manager?  It appears that if a source value is different then it just gets added as another value to the record.
    For example, a product has an attribute of speed which is measured in revolutions/minute. Some products can be rated at two speeds (i.e. 1800/3600).
    I created a numeric attribute for speed and enable only nominal rating and selected multi-valued.
    In import manager, I set "/" as multi delimiter for source field.  This created two entries in destination attribute, 1800 and 3600. 
    However, if on subsequent imports the speed values changes for this record (i.e. 1200 and 1800) then I will now have 1200, 1800, and 3600 as values for this record.
    Would the proper solution be to create two individual numeric attributes that are single valued (i.e. Speed1 and Speed2)?

    Hi Aaron,
    in your example it would make sense to use two different attributes called "Speed1" and "Speed2". Using the multi value option, MDM allows you to store a list of values into a single field. This list is more or less unlimited, you can add as many values as you like. A change of an existing value is not possible. The reason is that Import Manager does not know, which value you've changed! So it simply adds the "new" record (which is the 1200 in your example) to your value list. This is the intended behaviour of the "update all mapped fields option". If you really want to replace the values, you can check if the "Replace" option is useable for you. But note, that the replace will replace the complete existing record with the incoming new one. This means if the product you want to import with the replace option is smaller than the existing one (maybe it does not contain values for all segments), you'll loose data in MDM.
    BR Michael

  • Using the value "Image/*" for the accept attribute of the HTML input Element, how can I add .pdf to the array of preconfigured file types (.jpe, .jpg, .jpeg, .?

    On a form, using the value "image/*" for the accept attribute of the HTML input Element, how can I add .pdf to the array of pre-configured file types (.jpe, .jpg, .jpeg, .gif, .png, .bmp, .ico, .svg, .svgz, .tif, .tiff, .ai, .drw, .pct, .psp, .xcf, .psd, .raw)?
    Say I wanted to add .gif, .jfif or .ico. I find this array limited, how can I add types to image?
    <input type="file" name="file" accept="image/*" id="file" />
    mimeTypes.rdf does not seem to allow this.

    ''mimeTypes.rdf'' has nothing to do with web development. It's a file that stores your file handling preferences (e.g. if you want ZIP files automatically saved or opened).
    You can't change the file types of the pre-defined content specifiers (audio/*, video/*, image/*), but you can specify additional MIME types. To add PDF to your above example,
    <pre><nowiki><input type="file" name="file" accept="image/*,application/pdf" id="file" /></nowiki></pre>
    For details, see
    * [https://developer.mozilla.org/En/HTML/Element/Input developer.mozilla.org/En/HTML/Element/Input]

  • Using AD connector to populate multi-valued attributes  to OIM

    Could anybody share the expirience of provisioning multi-valued attributes from AD to OIM 11.1.15?
    What is the best approach?
    Thanks.

    mc2,
    you can use http://docs.oracle.com/cd/E23104_01/download_readme_ps4/download_readme_ps4.htm#BABDABDA and http://docs.oracle.com/cd/E21764_01/install.1111/e12002/install.htm#CIHGAEFI as a staring point. This gives you pointers to all software needed and steps to follow.
    Kevin was referring in fact to BP1 11.1.1.5.1, Patch# [12748351|https://updates.oracle.com/download/12748351.html] , not PS1. PS1 is in fact 11.1.1.5.
    Florin

  • If I use Nav. Attribute X---Y in report, some of the values not assigned.

    Hi All,
    We r using  a navagational attribute like X-Y  in our report. X is Char. Y is Attribute. If I use Nav. Attribute X-Y in report, some of the values r not assigned. If i use display attibute Y under charectiristic X , I am getting correct values. why?
    Thanks in Advance

    Take the master data table name...go to se14...give the table name..click Edit...choose option Activate and adjust database..
    Run attribute change run
    Check and revert.
    Regards
    Gajendra

  • Using view context attribute values in view methods

    Hello,
    I have a view context mapped to a window context.  The window context has a supply function that gets some data.  I would like to use some of this data in one of my view methods but can't seem to find the syntax to use the values in the mapped view context attributes.  I know for displaying on the view you map the screen field to the context attribute but I just need to use this value in a method.  Any help will be greatly appreciated.
    Thank you,
    JR

    Hi Joseph,
    If you already had mapped the view context with the window context, all you have to do in the view method is to read the view context. For this, you can use the next code:
      DATA: lo_node      TYPE REF TO if_wd_context_node,
            lo_element   TYPE REF TO if_wd_context_element,
            lv_attribute TYPE wd_this->element_node-attribute.
      lo_node = wd_context->get_child_node( name = wd_this->wdctx_node ).
      lo_element = lo_node->get_element( ).
      lo_element->get_attribute(
        EXPORTING
          name =  `ATTRIBUTE`
        IMPORTING
          value = lv_attribute ).
    This is supossing you have a node named 'NODE' with an attribute named 'ATTRIBUTE'.
    Also, you can use the Web Dynpro Statement Structure. It's a wizard that helps you to generate some code. The icon is like a magic wand.
    Regards,
    Isaac Meléndez

  • How to retrieve null-valued attributes from a LDAP server?

    (I posted this in the ES board but then thought this is more of a programmer's question, sorry for the duplication).
    I am using JNDI api to do search operations on a Java Directory Server( part of SunOne).
    However, I found all the attributes that do not have values are automatically filtered out from the search result.
    NamingEnumeration answer = ctx.search(ctxName, filterExpr, cons);
                   while(answer.hasMore()){
                        SearchResult sr = (SearchResult)answer.next();
                        Attributes attrs = sr.getAttributes();
                        for(NamingEnumeration ne = attrs.getIDs();ne.hasMore();){
                             System.out.println("ids:"+ne.next());
                        System.out.println("-------------------------------------------------------");
                       for (NamingEnumeration ae = sr.getAttributes().getAll(); ae.hasMore();) {
                           Attribute attr = (Attribute)ae.next();
                           System.out.println("attrName:"+attr.getID());
                           //System.out.println("attribute: " + attr.getID());
                           NamingEnumeration e = attr.getAll();
                           while(e.hasMore()){
                                 System.out.println("  attrVal:"+e.next());
                       }Is there anything I did wrong here?
    Here are a couple of things I noticed,
    1. in a Softerra LDAP browser, those no-valued attributes are not present either. But in JXplorer, I can see the full list that includes the attributes that do not have a value.
    2. I had Schema disabled in the server console.
    Thank you in advance.

    There are only two ways to read data from Directory Server:
    1. a. just fetch the entry
    b. display the content
    2. a. fetch the entry
    b. parse the entry and figure what object classes it is of
    c. lookup each object class definition in the schema and retrieve the attribute list
    d. combine the attributes of the entry with all the "possible" attributes of its object classe(s)
    e. display the content
    Here's for an easy example we can relate to:
    I have the following entry in my DS
      cn=the_duuuuuude,dc=forum,dc=sun,dc=com
      objectClass: person
      cn: the_duuuuuude
      sn: arnaudIf you use method 1, you will get just what is stored in the db. That is:
      cn=the_duuuuuude,dc=forum,dc=sun,dc=com
      objectClass: person
      cn: the_duuuuuude
      sn: arnaudif you use method 2, you will get:
      cn=the_duuuuuude,dc=forum,dc=sun,dc=com
      objectClass: person
      cn: the_duuuuuude
      sn: arnaud
      description:
      seeAlso:
      telephoneNumber:
      userPassword:because when you looked up the 'person' object class you got this:
    objectClasses: ( 2.5.6.6 NAME 'person' DESC 'Standard LDAP objectclass' SUP top MUST ( sn $ cn ) MAY ( description $ seeAlso $ telephoneNumber $ userPassword ) X-ORIGIN 'RFC 2256' )Now the important thing to note is that physically in the database, the attributes description, seeAlso, telephoneNumber and userPassword are NOT stored. It's not that they have a 'null' value. They're just not there. It doesn't stop you from looking up the schema.
    Optimally, in your client, you would fetch the whole server schema and cache it so you have to do the extra round trip for every entry you process.
    The difference you observe with various LDAP browsers might simply be that one uses method 1 and the other method 2.
    Hope this helps wrap your mind around this.
    -=arnaud=-

  • How to retrieve null-valued attributes from LDAP server.

    I am using JNDI api to do search operations on a Java Directory Server( part of SunOne).
    However, I found all the attributes that do not have values are automatically filtered out from the search result.
                   NamingEnumeration answer = ctx.search(ctxName, filterExpr, cons);
                   while(answer.hasMore()){
                        SearchResult sr = (SearchResult)answer.next();
                        Attributes attrs = sr.getAttributes();
                        for(NamingEnumeration ne = attrs.getIDs();ne.hasMore();){
                             System.out.println("ids:"+ne.next());
                        System.out.println("-------------------------------------------------------");
                       for (NamingEnumeration ae = sr.getAttributes().getAll(); ae.hasMore();) {
                           Attribute attr = (Attribute)ae.next();
                           System.out.println("attrName:"+attr.getID());
                           //System.out.println("attribute: " + attr.getID());
                           NamingEnumeration e = attr.getAll();
                           while(e.hasMore()){
                                 System.out.println("  attrVal:"+e.next());
                       }Is there anything I did wrong here?
    Here are a couple of things I noticed,
    1. in a Softerra LDAP browser, those no-valued attributes are not present either. But in JXplorer, I can see the full list that includes the attributes that do not have a value.
    2. I had Schema disabled in the server console.
    Thank you in advance.

    There are only two ways to read data from Directory Server:
    1. a. just fetch the entry
    b. display the content
    2. a. fetch the entry
    b. parse the entry and figure what object classes it is of
    c. lookup each object class definition in the schema and retrieve the attribute list
    d. combine the attributes of the entry with all the "possible" attributes of its object classe(s)
    e. display the content
    Here's for an easy example we can relate to:
    I have the following entry in my DS
      cn=the_duuuuuude,dc=forum,dc=sun,dc=com
      objectClass: person
      cn: the_duuuuuude
      sn: arnaudIf you use method 1, you will get just what is stored in the db. That is:
      cn=the_duuuuuude,dc=forum,dc=sun,dc=com
      objectClass: person
      cn: the_duuuuuude
      sn: arnaudif you use method 2, you will get:
      cn=the_duuuuuude,dc=forum,dc=sun,dc=com
      objectClass: person
      cn: the_duuuuuude
      sn: arnaud
      description:
      seeAlso:
      telephoneNumber:
      userPassword:because when you looked up the 'person' object class you got this:
    objectClasses: ( 2.5.6.6 NAME 'person' DESC 'Standard LDAP objectclass' SUP top MUST ( sn $ cn ) MAY ( description $ seeAlso $ telephoneNumber $ userPassword ) X-ORIGIN 'RFC 2256' )Now the important thing to note is that physically in the database, the attributes description, seeAlso, telephoneNumber and userPassword are NOT stored. It's not that they have a 'null' value. They're just not there. It doesn't stop you from looking up the schema.
    Optimally, in your client, you would fetch the whole server schema and cache it so you have to do the extra round trip for every entry you process.
    The difference you observe with various LDAP browsers might simply be that one uses method 1 and the other method 2.
    Hope this helps wrap your mind around this.
    -=arnaud=-

  • Use of navigation attributes in APO DP

    I am trying to clarify how navigation attributes compare with full planning characteristics in APO DP (V5).
    In general, I know that navigation attributes are used for selection and navigation in APO DP.
    But suppose I have a navigation attribute called 'product type' for planning characteristic 'product'. Isn't it also possible to forecast and make adjustments at the 'product type' level.
    If the answer is yes, what is the real difference between the use of navigation attributes and planning characteristics?
    Thanks for any help with this.
    Bob Austin

    You do not see difference in Attribute and characteristics in the interactive planning screen. So you should be able to create selections and do general navigation
    just a little more detail on the difference between nav attributes and planning char
    But creating forecast profiles might be a problem- Selections with navigational attributes do not create forecast assignment table entries. As of SCM4.1, the attribute information can be stripped out of the selection via BADI, allowing an assignment entry to be created.
    Maintenance of CVCs also have to be done differently. Navigational attributes are not same as CVCs. Instead they point at the value of another characteristic. We create master data for nav attrib in the Admin workbench. Also If you plan to use navigational attributes on standard characteristics, say in 9AMATNR, then you could have issues in SNP since SNP does not support Nav attrib
    Also realignment of Navigational attributes is not a standard process but can be done.

  • Multi value attribute question

    Hello there,
    Our application would like to have a multi value attribute in DS11.1.1.7.0 on SLES platform. But here is my question..
    1. Can i have a one single attribute with value like companyCode: ABC,XYZ,QWE,RTY
    2. OR , can i have like below..
    CompayCode: ABC
    CompanyCode: XYZ
    CompanyCode: QWE
    CompanyCode: RTY
    which is the best method for LDAP server performance?
    Thanks

    Hi,
    Multi-valued attribute is supported OOTB by LDAP and it seems simpler&better (possibility to have better indexing, more efficient to add/delete values)  to use the second option, especially if you need to search for entries based on one of the attribute value. By default, LDAP attributes are multi-valued in the LDAP schema so you can store several values for companyCode.
    Note: attribute values in an LDAP attribute are unordered, so choose the primary option if you need to maintain ordering across attribute values.
    HTH
    -Sylvain

  • Values not passing from form to context attributes (value attributes)

    Hi Experts,
    I have bound the properties of theadobe interactive form (WD-Java) to the context attributes but the values are not passing to the value attributes at runtime.
    For your information I have not bound the pdfsource binary attribute of the view to the custom controller pdfsource binary attribute.
    Please advise.
    Thanks,
    Shobhit

    Context
       GetData - ModelNode mapped to controller context (DataSource)
             Attribute1 - Value Attribute (Form Field)
    Is it allright to have the Data Source as a ModelNode (mapped to the controller context node) and then have Value Attributes under the ModelNode which are then bound to the adobe form input fields.
    I know its frustrating to advise on such questions without looking at the code actually. But I would definitely need your support.
    If possible could you mail me a project of yours where you have the form being PREFILLED with some values coming from a RFC FM and then the same form gets posted to SAP though another RFC FM.
    Thanks,
    [email protected]
    OK. When I create a Fresh Adobe Interactive Form application, it works fine.
    The problem Im facing is in the case, when Im using an existing PDF file created in the ABAP stack (TCode SFP). I am importing this PDF file into the WebDynpro Java Application and then binding the fields. So in this case the context binding does not work.
    You guyz are right, I need to check if there is any other script which exists. But still what are views after this update?
    Message was edited by:
            Shobhit Swarup Mathur

  • Mod performance on multi-valued attributes

    Is there any way to improve mod performance of DS5.2P4 that has a lot of frequently modified multi-valued attributes?
    Thank you.

    There are different ways to tune Directory Server for write performance.
    The area to consider are :
    - DB cache size and location of the db-home-directory
    - Entry cache size and overall memory available
    - Spreading writes to multiple disks. For example, putting logs, transaction logs and the DB on separated disks
    - Useful vs useless indexes
    - Disks performances
    You may also want to check "cn=Directory Manager" blog <http://blogs.sun.com/DirectoryManager" about performance tips.
    Regards,
    Ludovic.

Maybe you are looking for

  • Safari the ONLY browser that works

    Since upgrading to Leopard, I have been unable to use ANY other internet browser but Safari. Normally this wouldn't bother me since I prefer Safari, but there are some websites out there that don't play nicely with Safari and so other browsers are ne

  • Spacing between letters

    HI friends, we are currently involving in scripts upgradation from 4.6c to Ecc 6.0. we are facing a small problem that there is a spacing between letters , when we upgrade the document in Ecc6.0. could u pls help me how to overcome this problem. Hope

  • NLS_DATE_FORMAT on database level?

    Hi all, I would like to change the NLS_DATE_FORMAT parameter so that the change will be reflected in the NLS_DATABASE_PARAMETERS view. I always thought it would be alter system, but that only changes it for all newly connecting sessions. Appearantly

  • HELP!!! New Comp issues

    My old computer recently died, can't even turn it on. So I bought a brand spanking new Dell Inspiron, super excited about it till I tried to sync my iTouch 2nd gen. It says that it has to delete all the data I have on my touch and put it on new. Not

  • 2.1 - which .exe do we use?

    Sorry, I'm sure this is a rather silly question. I'll be using 32bit, but which 2.1 .exe do I use? the setup32.exe or Install Lightroom2.exe? I'm guessing I use setup32.exe, but why the two exe files? and why are none actually named LR2.1? thanks