Appending to a string in c:if

I am trying to do something along the lines of this:
<c:if test="${ 'dueDateEqualsTodaysDate_<c:out value="${product.productId}"/>' == 'TRUE'}">
meaning I am trying to search to see if the variable dueDateEqualsTodaysDate_1489 is true, but the syntax is wrong (or maybe the structure is wrong as I'm not quit sure how to do it.
Any help please?
Message was edited by:
chet0264

You can't use custom tags inside attributes of another custom tag.
If you want to nest the expression like this, I think you will have to break it up a little
<c:set var="dueDateProduct" value="dueDateEqualsTodaysDate_${product.productId}"/>
<c:if test="${requestScope[dueDateProduct] == 'TRUE'}">
</c:if>You will have to specify which scope the dueDateEqualsTodaysDate_xxx is in.
Is it in page, request or session scope? use pageScope, requestScope, or sessionScope variables appropriately (I assumed request scope in my example)

Similar Messages

  • How do you append to a "string" type field?

    ABAPers,
    I am trying to understand how to append values to a "string" data type in an efficient way. One way to append to a string is using "concatenate" feature.
    data: myRetVal type string.
    DO
      CONCATENATE myRetVal ',' myNewData INTO myRetVal.
    ENDDO.
    However, CONCATENMATE is not efficient in this scenario. Each time you call it, myRetVal gets copied into myRetVal all over. As the string grows, this statement will execute slower and slower.
    The other option I thought is to use offset mechanism.
    MOVE myNewData to myRetVal+myRetValLen.
    However, it appears "string" and "xstring" type fields do not support offset and length operations.
    Is there a third choice that I am missing?
    Thank you in advance for your help.
    Pradeep

    There is no such operator.
    But if just using literals, you can use the &, like this.
    data: string type string.
    string = 'This is the first part ' & 'This is the second part'.
    Again, this will not work with variables.
    Regards,
    Rich Heilman

  • Append a constant string to every element in an array

    Hi Friend,
    I have a small stuck in my labview program that is I need to append a constant string to each element of an array. Could someone provide guidance on this? Prior thanks to your help.
    Have a nice day!
    Lee Joon

    Pass the array into a for loop with autoindexing; concatenate each element with the constant and then use the array output from the loop...
    I was a few seconds behind the post above; great minds think alike!
    Message Edited by Phillip Brooks on 11-15-2007 08:42 AM
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness
    Attachments:
    Append String.gif ‏33 KB

  • White spaces append to restulting strings

    Hello All,
    I'm faced with a weird issue. There are white spaces append to the strings. The only workaround I have is to use the TRIM function. However, I sense that this this maybe be a characterset conversion issue.
    I've included the NLS setting for bother Oracle and MySQL as well as my odbc.ini file
    QUERY:
    SQL> select '"'|| "User" ||'"' as Username from "user"@MYODBC5;                  
    Results (there is white spaces added right after the username, as the result shoudl have been "intm","root" as opposed to "intm                                "
    ===============================================================================================================
    USERNAME
    "intm
    USERNAME
    "root
    QUERYWORK AROUND:
    SQL> select '"'|| trim("User") ||'"' as Username from "user"@MYODBC5;
    USERNAME
    "root"
    "intm"
    NLS _SETTINGS  ORACLE
    ==============================================================
    Oracle:
    ======
    NAME                      
    VALUE$
    NLS_LANGUAGE              
    AMERICAN
    NLS_TERRITORY             
    AMERICA
    NLS_CURRENCY              
    $
    NLS_ISO_CURRENCY          
    AMERICA
    NLS_NUMERIC_CHARACTERS    
    NLS_CHARACTERSET          
    AL32UTF8
    NLS_CALENDAR              
    GREGORIAN
    NLS_DATE_FORMAT           
    DD-MON-RR
    NLS_DATE_LANGUAGE         
    AMERICAN
    NLS_SORT                  
    BINARY
    NLS_TIME_FORMAT           
    HH.MI.SSXFF AM
    NAME                      
    VALUE$
    NLS_TIMESTAMP_FORMAT      
    DD-MON-RR HH.MI.SSXF
    F AM
    NLS_TIME_TZ_FORMAT        
    HH.MI.SSXFF AM TZR
    NLS_TIMESTAMP_TZ_FORMAT   
    DD-MON-RR HH.MI.SSXF
    F AM TZR
    NLS_DUAL_CURRENCY         
    $
    NLS_COMP                  
    BINARY
    NLS_LENGTH_SEMANTICS      
    BYTE
    NLS_NCHAR_CONV_EXCP       
    FALSE
    NAME                      
    VALUE$
    NLS_NCHAR_CHARACTERSET    
    AL16UTF16
    NLS_RDBMS_VERSION         
    11.2.0.2.0
    NLS _SETTINGS  MYSQL
    ==============================================================
    Oracle:
    ======
    NAME :
    +--------------------------+----------------------------+
    | Variable_name            | Value                      |
    +--------------------------+----------------------------+
    | character_set_client     | utf8                       |
    | character_set_connection | utf8                       |
    | character_set_database   | latin1                     |
    | character_set_filesystem | binary                     |
    | character_set_results    | utf8                       |
    | character_set_server     | latin1                     |
    | character_set_system     | utf8                       |
    | character_sets_dir       | /usr/share/mysql/charsets/ |
    +--------------------------+----------------------------+
    ===========================================================ODBC INI
    [myodbc5]
    Driver = /usr/lib64/libmyodbc5a.so
    Description = Connector/ODBC 5.3.4 Driver DSN
    SERVER = 127.0.0.1
    PORT = 3306
    USER = intm
    PASSWORD = *********
    DATABASE = mysql
    OPTION = 0
    TRACE = OFF

    Hi,
      I reproduced the problem on my systems with Oracle AL32UTF8 and MySQL latin1 database selecting from a char column.
    The solution was to add -
    CHARSET=latin1
    to the MySQL odbc.ini entry.
    If I set -
    CHARSET=utf8
    then the problem happened.
    Try this and let us know what happens.
    Regards,
    Mike

  • Appending to a String Array

    I have a stucture that was generated when I created a proxy. I am not sure how to populate it.
    Structure:
    Z01DCC_GENERATOR_IN_DOC
    Fields                            Component Type                   Data Type    
    CONTROLLER               PRXCTRLTAB                            
    PIN_NUMBERS             Z01ARRAY_OF_STRING2D
    FILE_NAME                                                               STRING
    ADD_EPM                                                                 CHAR
    CUSTOMER_NUMBER                                               STRING
    LANG                                                                        STRING
    The PIN_NUMBERS field will have eg. 20 different values.
    Any help would be much appreciated.
    Cheers Steve.

    REPORT  yzso_callwebservice.
    DATA: zsoclass TYPE REF TO z01co_emwsapp_vi_document .
    *DATA: ls_proxy    TYPE Z01DCC_GENERATOR_IN_DOC,
         wa_proxy    like ls_proxy,
         ld_pin      LIKE LINE OF wa_proxy-pin_numbers,
    DATA:      pin_numbers TYPE z01array_of_string2d,
          file_name   TYPE c,
          add_epm     TYPE c,
          customer_number TYPE c,
          lang        TYPE c.
    data:
      ls_proxy    TYPE Z01DCC_GENERATOR_IN_DOC,
      ld_pin        LIKE LINE OF ls_proxy-pin_numbers,
      lt_pins       TYPE Z01ARRAY_OF_STRING2D.
    ld_pin = '1st value'.
    APPEND ld_pin TO lt_pins.
    ld_pin = '2nd value'.
    APPEND ld_pin TO lt_pins.
    ls_proxy-pin_numbers = lt_pins.
    TRY.
        CREATE OBJECT zsoclass
      CATCH cx_ai_system_fault .
    ENDTRY.
    DATA: output TYPE z01dcc_generator_out_doc .
    DATA: input TYPE z01dcc_generator_in_doc .
    TRY.
        input-file_name = 'DCC1234567_FILE'.
        CALL METHOD zsoclass->dcc_generator
          EXPORTING
            input  = input
          IMPORTING
            output = output.
      CATCH cx_ai_system_fault .
      CATCH cx_ai_application_fault .
    ENDTRY.

  • I need to append a random string to a loadVariablesNum file...

    i need a little help creating a random (2 digit?) string to
    append to this html call... if someone wouldn't mind helping me
    with this...
    url = "xxxxx";
    loadVariablesNum(url+"_main.html", 0);
    something like:
    string = "whatever()";
    url = "xxxxx";
    loadVariablesNum(url+"_main.html?"+string, 0);
    i'm guessing...?
    thanks much,
    GN

    will this work:
    end = "Math.floor(Math.random() * 10) + 1";
    loadVariablesNum(url+"_main.html?"+end, 0);
    ?

  • Append to a string..

    DECLARE
    ls_ename VARCHAR2(1024);
    CURSOR c_employee
    IS
    SELECT * FROM EMPLOYEE;
    BEGIN
    FOR lc_employee IN c_employee
         LOOP
         ls_ename=ls_ename||','||lc_employee.ename;
         END LOOP;
    dbms_output.put_line(ls_ename);
    END;
    Guys,
    I would need ls_name to appear as
    bhagat,Goel,Stalin
    instead of
    ,bhagat,Goel,Stalin.
    I don't need to comma in the beginning of the string.
    Help me out with the code changes.
    Thank you..
    Regards,
    Bhagat

    change ls_ename=ls_ename||','||lc_employee.ename;
    to
    ls_ename=ls_ename|| decode(ls_ename, null, null,',' ) ||lc_employee.ename;

  • How to append an xml string as a child node to a dom document

    Hi
    I have an xml represented as a String. Now I want to add this xml string as a child node to another DOM Document.
    Do I have to first parse the xml String into a xml Document and then add the nodes to the existing Document. Is there a simpler way to do this. Any input is appreciated.
    Many thanks in advance.

    radsat wrote:
    Hi
    I have an xml represented as a String. Now I want to add this xml string as a child node to another DOM Document.
    Do I have to first parse the xml String into a xml Document and then add the nodes to the existing Document. yes, this is what you need to do.
    Is there a simpler way to do this. Any input is appreciated.no, there really isn't, sorry.

  • Modifying the search form so it appends the '%' to String input fields

    Hi guys,
    How can I modify the search form to search for '%'sometext'%' instead of just sometext for input fields that take string type as input; not programmatically!

    Hi,
    you would have to do this one way or the other. Either in the managed bean (which then passes the search input to the underlying model) or in the business services (ADF BC for example)
    Frank

  • Essbase export with a "string" appended with all account dimension members

    Hi Everyone ,
    can any one please suggest , how i can do my essbase export with a string appended with all account dimension members.
    i have tried more options but it doesn't looks working. i tried it by report scripts using RENAME function , but it works for 1 member at a time..
    please suggest !
    thanks
    Edited by: Vivek on Jun 19, 2012 6:55 PM

    Hi,
    If you're looking for the ability to append different strings, then you should probably be looking to an external process.
    If you're looking to append the same string, I can think of one way. Make your report script fixed-width (that way you always know which character in the line you're changing) and then utilize the MASK command. (you can find it in the Tech Ref under Report Commands)
    Robert

  • Loop through Timer is ok, but then, how to append string?

    Hi,
    reading thorugh this forum, I was able to create a loop cycle via a timer (http://social.technet.microsoft.com/Forums/en-US/a1d160ba-a7d6-4c5c-aa2a-f724990a3b11/add-repeating-entry-to-collection?forum=projectsiena).
    Now, I would be ready to collect info of a cell, based on an index of the row (or, better, the ID value, which is incremental) of a collection.
    But, how can I append the pulled strings into one final string? So, even if there is the workaround for the loop cycle, how can it be used, other than populate another collection?
    Thanks!
    Fabio

    Hi,
    reading thorugh this forum, I was able to create a loop cycle via a timer (http://social.technet.microsoft.com/Forums/en-US/a1d160ba-a7d6-4c5c-aa2a-f724990a3b11/add-repeating-entry-to-collection?forum=projectsiena).
    Now, I would be ready to collect info of a cell, based on an index of the row (or, better, the ID value, which is incremental) of a collection.
    But, how can I append the pulled strings into one final string? So, even if there is the workaround for the loop cycle, how can it be used, other than populate another collection?
    Thanks!
    Fabio

  • Append strings to file

    Hi,
    How do i modify "write characters to file.vi" such that every time i append a new string to the same file, it will start at a new line?
    There is this parameter in the vi that is called "convert eol"? Read the help file but could not figure out what is a end of line marker. Please help.
    Thanks.

    Hi,
    the easiest way is to concatenate EOL symbol with your string and then write this new string to the file.
    So you will write something like
    EOL"your string". (or "/nyour string" in codes)
    EOL symbol and "Concatenate strings.vi" you can find in "Functions/String/..."
    Good luck.
    Oleg Chutko.

  • Append string using c tag

    Hi,
    I've a code like this
    <td>
    <c:set var="author" value="${blogEntry.authorDetails}"/>     <c:out value="${author.firstName}"/> 
         <c:out value="${author.lastName}"/>
    </td>
    the problem is both first name and last name are strings,word wrapping is not done perfectly.
    For instance if it is,
    "James Gosling"
    then it may come like ,
    James Gosli
    ng
    so is it possible to append both the string using jstl?
    Thanks,
    mms.

    I think it's caused by the cell column width being too small, not related to the behaviors of jstl tags. You can try it outside of a <td>, or increase the column width.
    -cheng

  • APPEND STRING TO defaultDocumentStyle.

    Hi all,
    Anyone have an idea how to append or add String to the file,?
    For e.g i have some string "Author : Xttrax".
    <code>
    protected JTextPane editorZone;
    protected StyleContext m_context;
    protected DefaultStyledDocument docStyle;
    protected RTFEditorKit m_kit;
    editorZone = new JTextPane();
    m_kit = new RTFEditorKit();
    editorZone.setEditorKit(m_kit);
    m_context = new StyleContext();
    docStyle = new DefaultStyledDocument(m_context);
    editorZone.setDocument(docStyle);
    try {
    OutputStream out = new FileOutputStream(fileRead + ".mcf");
    m_kit.write(out, docStyle, 0, docStyle.getLength());
    out.close();
    catch (Exception ex)
    ex.printStackTrace();
    </code>
    while come to the part >
    <b> m_kit.write(out, docStyle,0,docStyle.getLength()</b>
    can i do something like
    docStyle = docStyle.getText + "String";
    i want to do this because i wish to append some "Tag" to the file whenever it is "saved"..
    thanks for considering my doubts

    Try making the textarea larger and see if it still
    shows on a new line...Textarea width is very large .There are many line break sometimes all lines
    are of different length so there is no issue of word wrap .I check the output
    sometimes it gives newline when it encounter space but not always .there are also spaces in single line .Sometimes it gives new line when it encounter >
    and sometimes it continue in same line after enconter > .
    Thanks

  • Appending to new line in text file

    I am trying to append text to a new line to a file. I set the append parameter to true and I try to output the new line character after I write the string to the file. However it is still appending the next string to the end of the first rather than in the line below. My code is below. Can someone please help me?
    Thanks
    public static boolean WriteToFile(String nameOfFile,
    String contents)
    FileWriter myFileWriter = null;
    try
    System.out.println("Attempting to write text to = " + nameOfFile);
    myFileWriter = new FileWriter(nameOfFile,true);
    myFileWriter.write(contents);
    myFileWriter.write('\n');
    myFileWriter.close();
    return true;
    catch (Exception e)
    System.out.println("EXCEPTION thrown ");
    return false;
    }

    I am trying to append text to a new line to a file.
    I set the append parameter to true and I try to
    o output the new line character after I write the
    string to the file. However it is still appending the
    next string to the end of the first rather than in
    the line below. My code is below. Can someone please
    help me?
    Thanks
    public static boolean WriteToFile(String nameOfFile,
    String
    String
    String contents)
    FileWriter myFileWriter = null;
    try
    System.out.println("Attempting to write
    ting to write text to = " + nameOfFile);
    myFileWriter = new
    eWriter = new FileWriter(nameOfFile,true);
    myFileWriter.write('\n');
    myFileWriter.write(contents); myFileWriter.close();
    return true;
    catch (Exception e)
    System.out.println("EXCEPTION thrown ");
    return false;
    try the change what i have made in bold

Maybe you are looking for

  • Hi Cisco Team

    Hi Ciscc Team, This is Raghu Sharma, actully i configured Site-to-Site VPN with Nat-control it's working fine but when i am using Packet-tracer so i am geting some error in last point Result: input-interface: outside input-status: up input-line-statu

  • How to resolve on my iPad: Unable to connect to server error when trying to log into Game Center?

    When I try to log into the game center, i get an error message that says: unable to connect to server due to an error communicating with the server. I have logged off iTune and any other app I was logged in, I have done a hard reset of my iPad, I hav

  • Wireless on My New MBP super slow

    Hi everyone, I just bought a shiny new 15" Macbook Pro running Snow Leopard 10.6.2, love it except my wireless is super slow when using it on my home network. I know I'm not the first to complain of this and that there are plenty of other threads abo

  • Metainit/striping problem on Solaris 9

    We are trying to deploy the Apple XServe RAIDS to customers running Solaris 9. The issue is that Solaris 9 will not recognize a device/LUN that is > 2TB. (No problem with Solaris 10) In trying to solve this problem, we sliced a 7 disk (4.09 TB) RAID

  • Branch Cache Deployment

    Hi Techies, I need to deploy a Branch Cache Solution for one of the client's remote office. Users in the remote office need to access 3 files shares from two different locations (parent or main office). Below are the complete setup details:- 1. Branc