Value attribute of command_link

Hi,
Hope someone can help me out. When you specify a value for the value attribute of the command_link tag does this value ever get sent to the user's browser or does it stay server side in a table referenced to that specific user?
Sorry if this is a strange question!
Barney

My best understand is that.
1)The server side just collects all UIComponent info and encryt form by form. All info will return to server when you submit. I just guess from the fact that browser always send back the old message back to server, even you server code already changed.
2) event and listener is invoked when data submited to Server.
3) Value attribute donot works. you should put <f:paramter name="" value=""> or <f:attribute name="" value=""> inside the command_link tag.
Vist for detail. http://forum.java.sun.com/thread.jsp?forum=427&thread=496686&tstart=15&trange=15
Daping

Similar Messages

  • Capturing value attribute from command_link

    Hi
    I have a command_link with no id attribute but a value attribute set ... as below:
    <h:command_link value="xxxx" actionListener="yyy"... />
    When the link is selected the yyy method is being called but how do I get the xxxx (of value attribute)...?
    Thanks
    Kishore

    Adam,
    That does not work...
    Here is my command_link
              <h:command_link id="LastNameLink" actionListener="#{ContactGenericList.editContact}" value="test" styleClass="navControlLink">
              <h:output_text styleClass="navControlLink" value="#{conIdx.lastName}"/>
         </h:command_link>
    I used value=test and in editContact method, I did
    String idVal = (String)((UICommand) event.getSource()).getValue();
    and it ALWAYS shows up as null.
    Please help
    thanks

  • Command_link generated by JSTL does not return value attribute

    Since data_table CANNOT RENDER DATA IN SINGLE ROW, MULTIPLE COLUMNS, I am using the following to show the data as links in single row, multiple columns
    <TABLE><TR><TD>
    <c:forEach var="item" items="${MyBean.Filters}">
    <c:set var="myLink" value="${item}" scope="request"/>
    <h:command_link value="#{myLink}" actionListener="#{MyBean.LinkSelected}">
    <h:output_text value="#{myLink}"/>
    </h:command_link>
    </c:forEach>
    </TD></TR></TABLE>
    The above JSTL shows up the links fine in a single row. But when a link is selected and the actionlistener is called, I see that the value parameter is null. Is this because the command_link is in a TABLE (i think I read somewhere that this is a known bug... )
    I do
    value = (String)((UICommand) event.getSource()).getValue();
    to get the value...
    I tried several ways.. all I need is a way to distinguish the links and know which link has been selected.
    Any suggestions please....

    The value is null when the ActionEvent listener fires, because the myLink variable is only available during processing of the JSP page as part of the Render Response phase, not in the request triggered by clicking on the generated link.
    There's simply no way to get this to work using JSTL's <c:forEach> action, and it's not because we didn't try. A custom renderer for the UIData component that renders a single component as a table with one row with multiple columns (or whatever you need) is the only solution I can think of.
    Hans Bergsten (EG member)

  • Assigning a String Value to the value attribute of html:file

    Hi,
    we facing a problem while assigning a value to the VALUE attribute of file tag
    <html:file property="fileupload" size='25' value="sample.xls" onchange="callsheet()" />
    can anyone help me out plzzz,

    Two points -
    1) Java is not Javascript or HTML; you would do better to find a more appropriate forum.
    2) When you take this to a better forum, you need to describe the problem.

  • 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 pass the data to a value attribute

    Hi,
    I am having a value attribute in a model node, It should have the values along with the modal attributes as its used in a table view can anyone explain me how to achieve this, It would be more helpful for me if someone gives sample code,
    Thanks in advance,
    Narayan

    replace this line with
    while (rs.next()!=null){
    with
    while (rs.next()){

  • How to make visible value attributes of a Search Node

    Hi All,
    We have a requirement to enhance the search context node SEARCH ( Dynamic Query Object SVYQ ) of component SVY_S.
    But the enhancement category of Attribute Structure CRMST_QUERY_SVYIL is 'Can't be enhanced'.
    So we are adding value attributes to this context node. How to make this value attributes available in view configuration tab?
    Please suggest a better approach if there is any.
    Thanks in adv.

    Hi  Suchindra,
       You assign these  enhanced  attributes to design layer. so you can see these fields in Config tab.
    How to do:
    IMG->Customer Relationship Management -> UI Framework -> UI Framework definition -> Maintain
    design layer
    Here include the enhanced attributes and then go to component work bench and in context attributes right click assign the desing layer, selct your attribute and  in the bottom click on SAVE button.
    Then check it in configuration tab your attributes will available in show available fields.
    I hope this will solve your problem
    Regards,
    Sagar

  • Dynamically building 'value' attributes with EL

    I'm trying to create an <af:inputText> component with a dynamic 'value' attribute. I'd like to generate something like this:
    <af:inputText value="#{myBean.myField}"/>
    Where 'myField' is a string stored in another var...#{myField}.
    Essentially I'd like to concatenate '#{myBean.', #{myField}, and '}' and use it to dynamically specify the value that the inputText is mapped to.
    Is there a way to do this with the JSF EL?
    Thank you.

    I'm almost positively sure that you cannot do what you want to do.
    But why do you want do do such a thing like that?
    If you want to do a reusable page, you can use the alias bean tag of Tomahawk (www.myfaces.org)

  • OAM : Multi-valued attribute in Authorization Rule Actions

    Our application is protected by an Oracle Access Manager deployment, where the identity user base is based in an Oracle Internet Directory.
    In the OID, for every user entry, we have a multi valued attribute (say, 'roleattr') which contains the roles recognized in our application. Once the user is authenticated by the Access Server, we need the roles associated to him to be fetched and returned in the page header (similar to uid).
    Hence, our question is, in PolicyManager, by setting the Authorization Rule > Actions, is it possible to retrieve this attribute (which is 'multivalued') and populated into the pageHeader, so that our application can retrieve the same.

    Sure, you'll get a colon-delimited list of the multiple values in your header!
    -Vinod

  • 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

  • How to set Value Attribute (under valu node) at run time

    Hi,
    This is my View context.
    wbsElement (Value Attribute of Type String)
    This is my Component Controller Context.
    Project_info  (Value node)->Wbs_Info (Value Node)-WBS(Value Attribute).
    Initially I want to set some dummy values to wbsElement(view attribute),sothat I can show that in drop downby key.
    On selecting of wbsElement I want to pass the selected value to component controllers ValueAttribute - WBS (this Value attribute is under 2 nodes-see the structure I've given).
    I tried this way which is not working fine.
        IWDNodeElement element = wdContext.createWBSElement();
         wdContext.nodeWBS().addElement(element);
        wdContext.currentWBSElement().setWBS(wbsElement);
    Can anyone tell me which is the correct way to do this?
    This is very urgent.plz help me in this.Thankx in advance.
    Regards,
    Karthick

    Hi Karthick,
       try this code.
    IPublic<compcontrolllername>.IWbc_infoElement  obj  =         wdThis.wdGet<Componentcontrollername>Controller().wdGetContext().createWbc_infoeElement();
    obj.setWBS(wdcontest.currentContestElement.getwbsElement());
    wdThis.wdGet<Componentcontrollername>Controller().wdGetContext().nodeWbc_infoElement().addelement(obj);
    set the cardinality of Project_info to 1:n or 1:1
    test this one
    if you find any problem let em know
    regars
    Naidu

  • Getting rid of "value" attribute in f:selectItems?

    Hello,
    There is a simple problem I am facing at work that is actually hurting us significantly... we have a JSF 1.1 (yes, it's very old!) situation where we need to present a page that has a very long dropdown list, more than 5000 options in it. The problem is that the options are very long, and the entire page ends up being over 600Kb in the browser, and worse than that the application server gobbles up massive amounts of RAM just to generate the page.
    One optimization we want to do is to take advantage of the following fact: all of the options have values that match the labels. In other words, our options look like this:
    <option value="longString1">longString1</option>
    <option value="longString2">longString2</option>
    <option value="longString3">longString3</option>
    We'd like to reduce the page by 50% with a simple optimization: suppress the value attributes like the following:
    <option>longString1</option>
    <option>longString2</option>
    <option>longString3</option>
    We are generating these options in an ArrayList of SelectItems, and using an f:selectItems to generate the HTML... but we have NOT figured out how to suppress the value attributes. Try as we might, we are unable to remove them... Is there any way to get:
    <f:selectItems ...>
    to just display the labels???
    Or is there another approach we should use??
    Thanks in advance.

    Hi,
    Can't help specifically with JSF 1.1 I'm afraid, but in 2.0 you need to supply a custom renderer to achieve this. The default MenuRenderer will always write out the value attribute, as per the following code:
    // com.sun.faces.renderkit.html_basic.MenuRenderer
    protected boolean renderOption(...) {
      ResponseWriter writer = context.getResponseWriter();
      writer.startElement("option", component);
      writer.writeAttribute("value", valueString, "value");
      writer.write(curItem.getLabel());
      writer.endElement("option");
    }I achieved an option list with no value attributes by extending this class, overriding the renderOption method, commenting out the writeAttribute line, and setting that as the default renderer for the SelectOneMenu. Like I said, this was JSF 2, but maybe a similar approach would work for JSF 1.1?
    On a completely different approach, how often do the values in the list change? If they are infrequent, then maybe you could use something like the following:
    - dynamically create a javascript file that holds the data, plus a method to build an option list from this data
    - include a reference to this javascript file in the page header
    - create a custom tag in the page which uses the javascript to build the option tags
    The advantage of this is that you can let the browser cache the big javascript file with all the options in it, and only include a link to it and a call to the javascript function in the page data. If required, you can add a sequence number to the javascript link to force the browser to reload it when the data changes.
    Obviously, you still get the hit the first time you load the list (although the data here is much more concise, as you don't need to send the XML tags at this point and also you only need to send each value once), and it's not as useful if your data changes frequently. Also dumps some processing on the client side, but that sounds like it would be a good thing in your case!
    I've used this approach in other situations where I had to repeatedly push a lot of static data to the client. Never actually used it from JSF, but the principle is still valid. Let me know if you think it would be useful; sure I've still got the old javascript lying around somewhere
    Cheers,
    Barney
    @EJP / qimbal2: The OP asked a pretty specific question: "how to render a dropdown list without the value attribute", which is a perfectly valid question. Yes, we can all see that 5,000 items in a drop down list is not ideal, and I understand that anyone answering questions like these is generally doing so on their own time, but just stating that the design sucks isn't really helping.

  • Value attribute not visible in runtime collection

    Hi,
    I have created some 2-3 value attributes (display only) in a standard model node for BTDOCFLOW (which also contains some display only fields). Put in the logic in their Getter methods and fields are getting displayed in UI with the values.
    Now, my requirement is to display this table view (Assignment block) in default sorting based upon one value attribute and one model node attribute. But the problem here is, I am unable to find value node attribute at runtime in BTDOCFLOW collection at DO_PREPARE_OUTPUT. (Even display only standard context node attributes, which are not part of model node structure are not visible)
    I have re-defined method GET_TABLE_LINE_SAMPLE with the value attributes, resulting in enhanced rv_sample line, but still the value attribute is not visible at runtime in the collection.
    Can someone pl. tell me, how can I display my value attributes in collection along with model node attributes, so that I can do default sorting based upon one custom and one model node attribute.
    Thanks,

    Hi,
    Whne you define value attributes within the model attribute then the node becomes mixed instead of either value node or model node.
    So you need to access the mixed node and then should access model attributes and value attributes separately.
    Get your collection into a normal entity then assign the entity to mixed node
    DATA: lr_mixed TYPE REF TO cl_bsp_wd_mixed_node ,
                current TYPE REF TO if_bol_bo_property_access,
                 lr_current TYPE REF TO cl_crm_bol_entity.
         current ?= me->typed_context->entity name->collection_wrapper->get_current( ).
          lr_mixed ?= current..
          lr_current ?= lr_mixed->if_bsp_wd_ext_property_access~get_model_node( ).
    Best Regards,
    Dharmakasi.

  • 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

  • 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=-

Maybe you are looking for

  • No longer receiving emails after iO6 update??

    I did the iO6 update the other day, I had problems straight away with all my messaging shortcuts not working. To resolve that I had to turn off documents and data in iCloud. Now I am no longer getting notified when I have an email. If I go into my ma

  • Unable to drop database user

    Hi All, I am unable to drop database user and getting the folllowing error: " must use DBMS_AQADM.DROP_QUEUE_TABLE to drop queue tables " I find 3 table with AQ prefix in the schema but unable to drop these table even by using "sys" user. Any idea ho

  • Flash Forms Not Rendering in IE7, Flash 9

    We're having a problem with flash forms in IE7 and Flash Player 9 not rendering the entire form. The form works fine in Firefox 2. It looks to be a problem with how the Flash player is able to pull back data in IE7. Likely this pertains to how IE7 ha

  • Two itunes libraries

    The music on my iphone is evidently from an older itunes library that I have.  Both have the same username and password (this and the newer itunes account that now opens on my desktop.)  I cannot get the two to sync music without "removing" (losing?)

  • Embedded Icc Profiles-Are they needed?

    What are they for? Do i need them if my images contain no color?