Problem in String cpmparison using #{} and ${}

Hi,
I am facing a strange problem. I want to compare values of the following 2 variables:
{color:#0000ff}Variable 1 :{color} It is a variable for a dataTable.
I take data from the dataBase in postDataModel. Variable named "post" is used to iterate over the various selected values of the result set.
E.g. <h:dataTable value="#{ForumBean.postDataModel}" {color:#ff0000}var="post"{color} ......
So, #{post.username} the value of 1 column. It is of type "String".
{color:#0000ff}Variable 2 :{color} It is a variable from Backing Bean. say,{color:#ff0000} UserBean.name{color}
Now,
<c:if test="${UserBean.username == post.username}">
then do something... </c:if>
But the problem here is the above String comparison never returns true i.e. the Strings never match EVEN THOUGH both have the same value.
That's because: {color:#ff0000}${post.username}{color} gives null String, while {color:#ff0000}#{post.username}{color} gives the actual username.
E.g.
${UserBean.name} gives David
#{post.username} gives David
{color:#800000}How do I compare the 2 variables in JSTL? (JSTL only takes expressions with a '$' and not a '#') ?{color}
Depending on these values I have to render or not render a column in dataTable.
{color:#ff0000}{color}

Yes I treid both ways. I even used the rendered attribute. When it failed, I switched to JSTL.
Okay, for the same above question as posted above, according to you if I used the following:
{color:#ff0000}rendered = " #{UserBean.name == post.username} "{color} should be evaluated to {color:#ff0000}true{color} and the column should be visible.
But that is not happening.
Is the above syntax for rendered and in-between String comprison correct?
If not, it would be great if you could give me a work around as that is exactly what I want to do.
Thanks.

Similar Messages

  • Problems with string comparison using

    I have a problem using the > and < comparison operators.
    When the xsl:if test uses numeric values the comparison works OK. If the
    test uses string values it always returns a false result.
    The style sheet below shows an example (which should run against any
    XML doc with a root element)
    Note - the spurious
    tags are just for debugging- I write the
    output to an HTML page and IE happens to recognise them
    even though the rest of the HTML tags are missing !!
    <?xml version="1.0" ?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
    <xsl:template match="/">
    <xsl:for-each select="*">
    Starting numeric test :
    <xsl:if test="(1 < 2)">
    In Test, ID= <xsl:value-of select="generate-id()"/>
    </xsl:if>
    Finished numeric test :
    Starting alpha test :
    <xsl:if test="('a' < 'b')">
    In Test, ID= <xsl:value-of select="generate-id()"/>
    </xsl:if>
    Finished alpha test :
    </xsl:for-each>
    </xsl:template>
    </xsl:stylesheet>
    null

    Having looked at the XPath spec I believe what I am trying to do (compare strings with gt and lt type tests) is not supported. The spec indicates that they can only be used for node sets or numerics. Presumably the processor is attempting to convert the values to numbers but evaluating them both as NaN (not a number). Can someone confirm this.
    I find this restriction quite strange, is this a situation where an extension function is required ? If so can someone point me to some (Java) examples.
    null

  • Problem in String Search using OKAPI in 9i Lite

    We are creating an Symbian EPOC application using Oracle 9iLite in stand-alone mode. We have managed to create a C++ program that creates an Oracle database on the Nokia Communicator 9210.
    The problem is that a string search returns either null or all of the searched records, ie. it does not work.
    The code below should do the string search and return the strings that match the given keyword. Any idea why this is not working? We are using OKAPI.
    TempCond[0].Operator = OK_GT;
    TempCond[0].AttrPos = KEYWORDREFERENCE_INDEX_FOR_KEYWORD;
    TempCond[0].AttrVal.BufPtr = (unsigned char*) szGivenKeyword;
    TempCond[0].AttrVal.BufSize = OK_NEW_ARRAY | strlen szGivenKeyword);
    TempCond[0].AttrVal.Indicator=1;
    TempCond[0].Collate=0;
    TempCond[0].Connective=OK_AND;
    // Iterate through the entire group, extracting the key data
    //(whatever the key may be) and the object reference, and
    // append to the end of the array.
    e = okCreateIterator( iEnv,
    iEbmgKeywordReferenceGroupRef,
    iEbmgKeywordReferenceClassRef,
    FALSE,
    1,
    TempCond,
    20,
    0,
    NULL,
    &iter
    Thanks for any help you may provide.

    I am sorry, this is not an answer to your question but a little help from you is well appeciated.
    I have just started exploring oracle 9i Lite to develop apps. on Palm and WinCE using OKAPI but the documentation does not seem enough. Is there some book or sample programs available that demonstrate OKAPI to develop form based apps ? CodeWarrior and Satellite Forms are not good when someone wants to try writing demp app.
    Thanks,
    Ashish

  • Various problems when trying to use both my iPhone 4 and iPhone 5 at the same time? HELP!

    I am experiencing a wide range of problems with both of my iPhones. They are both a 4 and a 5. I will list the problems I am having.
    Using both phones:
    A few weeks ago I recieved a new phone, the iPhone 5 as my contract was renewed. I backed-up my old phone, the iPhone 4 to my computer and restored it onto my 5. But when using my 5, I discovered it has 'no service' (but will use wifi), it won't send IMs OR texts and Apple constantly keeps asking me for my Apple ID which i recently changed but still uses the old email, and won't accept any passwords.
    The 5 used to send IMs and texts but they would be sent to my friends through my email address, so I googled this and went to messages>send and recieve, and the only thing i can select is my email, not my number. I am using the 4 as well, purely so I can send texts and IMs through my name, not my email. The 4 also has signal and wifi, whereas the 5 only has wifi. I am wondering if the 5 has no signal and won't send IMs & texts because I am still using another phone? Surely they both cannot work together, so I was thinking I could reset my iPhone 4, and then see if the iPhone 5 will work, once the second phone isn't used anymore. If that doesn't work, I thought I could reset my 4, back-up my 5 and then restore again. I think that will work, but I have no idea.
    I have absolutely had it with trying to figure it out, I have used google but nothing seems to work. I am really hoping someone can tell me what to do with all my phone problems, because they are absolutely driving me mad!!!!!!!!!!!!!!!!!!! 
    I need to use the 5, it is costing me an extra £60 a month to use and I feel as though that money is being wasted as I can't text, IM or call people. Should i just get rid of the 4 and see what happens? I read online that to stop iMessages coming through as your email, you should turn it off and use regular texts. BUT I DO NOT WANT TO DO THIS. I send way too many texts, and it would cost a fortune. I also can't send photo messages on texts, because they cost a bomb to send through. I want to be able to use both texts and iMessages - using my name, not my email. 
    To add on to that huge essay I have written, on both phones Apple CONSTANTLY asks me for my Apple ID which I recently changed. I changed the email and the password, and it is coming up with the wrong email, and whatever password I put in, it still says it is wrong. It doesn't make sense, because yesterday I purchased some music from iTunes and when asked for my Apple ID, it used the right email and accepted the correct password. ...??? yet it still keeps getting it wrong, even though it worked in iTunes. ??!?
    Okay so I just reset my iPhone 4, and nothing seems to have changed...I thought if I reset it, it would be completely wiped, like a brand new iPhone 4, but it's not....THIS IS SO IRRITATING! Can someone please help me! I GREATLY appreciate any answers, hopefully someone on the internet can fix my problem! thank you for taking the time to read this essay, I am very thankful. PS. Both phones are up to date.

    You said, "the 4 also has signal and wifi whereas the 5 has only wifi". By "signal", I'm assuing that you mean cellular signal. If so, that means your iPhone 4 is still active on your cellular number and your iPhone 5 is not. Contact your carrier to sort out which phone is active on your account.

  • HT204053 i want to change my icloud id on my iPhone, but it won't let me now that i have upgraded.  I no longer have the password and the problem is It is using an old id which the email isn't valid and the security question does not think my birthday is

    I want to change my icloud id on my iPhone, but it won't let me now that i have upgraded.  I no longer have the password and the problem is It is using an old id which the email isn't valid and the security question does not think my birthday is valid.  I cannnot delete the account because "find my iphone" wants the password linked to this old account.  But when i go into the find my iphone app it is using my corect Apple ID.  How do i fix this?

    If you still have access to your old email address, go to https//appleid.apple.com, click Manage my Apple ID and sign in with your iCloud ID.  Tap edit next to the primary email account, tap Edit, change it back to your old email account and verify it.  Then edit the name of the account to change it back to your old email address.  You can now use your current password to turn off Find My iPhone on your device. Then go to Settings>iCloud, tap Delete Account and choose Delete from My iDevice when prompted (your iCloud data will still be in iCloud).  Next, go back to https//appleid.apple.com and change your primary email address and iCloud ID name back to the way it was.  You can now go to Settings>iCloud and sign in with your correct iCloud ID and password.
    If you don't have access to your old email address, you will have to contact Apple to have them reset the password so you can disable Find My iPhone and sign into your iCloud account.  You can either go to https://expresslane.apple.com, select "More Products and Services", then "Apple ID", then  on the next page select "Other Apple ID Topics", then "Lost or forgotten Apple ID password" and click "Continue"; or you can contact Apple Support (http://www.apple.com/support/icloud/contact/).

  • I can use my appleID without any problems for using to download new apps in the app-store or Itunes - Problem: I can´t use my ID at facetime and Imessage - I´d like to add an EMail account on top to my mobile number. My password will not be accepted!!!???

    I can use my appleID without any problems for using to download new apps in the app-store or Itunes - Problem: I can´t use my ID at facetime and Imessage -
    I´d like to add an EMail account on top to my mobile number to use more this services. My password will not be accepted!!!??? I try it and i try it and i try ist, throughout the same problem. Whats on? The user help desk said, i´ve to reset and use the WLAN key new as well as possible - no way!

    Contact the App store for Apple ID help. Their support link is on the right of the App store window
    LN

  • Hi i have an ipad mini and i have not used it for 2 month or more. Today i have tried to use it i came across with a problem. my Ipad is blocked and it asks me to wait 23,401,418 :) what should i do need your help. thanks

    hi i have an ipad mini and i have not used it for 2 month or more. Today i have tried to use it i came across with a problem. my Ipad is blocked and it asks me to wait 23,401,418 what should i do need your help. thanks 

    Have you charged ipad Try a Reboot press & hold power button & menu button hold both down until you see Apple Logo You may need to do this more than once. Bsydd uk

  • Hello. I have a problem with OEL 6.5 and ocfs2. When I mount ocfs2 with mount -a command all ocfs2 partitions mount and work, but when I reboot no ocfs2 partitions auto mount. No error messages in log. I use DAS FC and iSCSI FC.

    Hello.
    I have a problem with OEL 6.5 and ocfs2.
    When I mount ocfs2 with mount -a command all ocfs2 partitions mount and work, but when I reboot no ocfs2 partitions auto mount. No error messages in log. I use DAS FC and iSCSI FC.
    fstab:
    UUID=32130a0b-2e15-4067-9e65-62b7b3e53c72 /some/4 ocfs2 _netdev,defaults 0 0
    #UUID=af522894-c51e-45d6-bce8-c0206322d7ab /some/9 ocfs2 _netdev,defaults 0 0
    UUID=1126b3d2-09aa-4be0-8826-0b2a590ab995 /some/3 ocfs2 _netdev,defaults 0 0
    #UUID=9ea9113d-edcf-47ca-9c64-c0d4e18149c1 /some/8 ocfs2 _netdev,defaults 0 0
    UUID=a368f830-0808-4832-b294-d2d1bf909813 /some/5 ocfs2 _netdev,defaults 0 0
    UUID=ee816860-5a95-493c-8559-9d528e557a6d /some/6 ocfs2 _netdev,defaults 0 0
    UUID=3f87634f-7dbf-46ba-a84c-e8606b40acfe /some/7 ocfs2 _netdev,defaults 0 0
    UUID=5def16d7-1f58-4691-9d46-f3fa72b74890 /some/1 ocfs2 _netdev,defaults 0 0
    UUID=0e682b5a-8d75-40d1-8983-fa39dd5a0e54 /some/2 ocfs2 _netdev,defaults 0 0

    What is the output of:
    # chkconfig --list o2cb
    # chkconfig --list ocfs2
    # cat /etc/ocfs2/cluster.conf

  • I just installed yosemite on my mcb pro mid 2012 and installed win8.1 with bootcamp. now i have the problem, when i'm using windows i don't see my mac partition in the "computer" window. there is only the "bootcamp (c;) partition? what's the problem?

    i just installed yosemite on my mcb pro mid 2012 with a clean install. so i only had the new os x yosemite running on my mac. everything went perfect. than i installed win8.1 with the bootcamp assistant and also everything went perfect.
    But here's the Problem:
    When i'm using Windows 8.1 and i go to the "Computer" window where i can find my hdd partition "Bootcamp (c;) there is only this Partition. the mac Partition is missing.
    so i am not able to read the files on my mac Partition.
    Before i installed yosemite and win8.1, i was running mavericks and win7 on my macbook pro and i haven't had this Problem. i was able to see and read my mac Partition also on Windows 8.1???
    is there any solution for this Problem???
    greez c

    "Before i installed yosemite and win8.1, i was running mavericks and win7 on my macbook pro and i haven't had this Problem. i was able to see and read my mac Partition also on Windows 8.1???"
    Sorry there's a mistake in the sentence!
    i mean:
    "Before i installed yosemite and win8.1, i was running mavericks and win7 on my macbook pro and i haven't had this Problem. i was able to see and read my mac Partition also on Windows 7???"

  • I am using i 4 phone. recently I had a problem with my lap top and had formatted hard disk of it. Now I want to use sync data in my iphone back to itune n my lap top. how can I perform this task with out loosing data in my i phone.

    I am using i 4 phone. recently I had a problem with my lap top and had formatted hard disk of it. Now I want to sync data in my iphone back to itune on my lap top. how can I perform this task with out loosing data in my i phone.

    Hey floridiansue,
    Do you have an installed email program such as Microsoft Outlook?  If your email is through an online login, such as Gmail, etc, then one will have to create an email association with a program such as Microsoft Outlook on the PC for this Scan to Email system to function.
    -------------How do I give Kudos? | How do I mark a post as Solved? --------------------------------------------------------
    I am not an HP employee.

  • We bought an iphone 4s for our daughter. We transfered it to straight talk. She can make calls and text no problem. She can use the WiFi but is unable to use the internet or mms. How do we update the APN?

    We bought an iphone 4s for our daughter. We transfered it to straight talk. She can make calls and text no problem. She can use the WiFi but is unable to use the internet or mms. How do we update the APN?

    To clarify for anyone who is still having any problems doing this.
    1. Unlock your phone with the carrier ( I know the process will work if it is jail broken but I am assuming you dont want to void the warranty on your phone) NOTE: even if you purchased the phone outright at Wal-Mart it is still locked to ATT so you will have to unlock the phone.  If it's already unlocked skip to step 2.  This works and will work even if you update the phone. 
    1a Here is the link to unlock a ATT iphone. Simply follow the instructions https://www.att.com/deviceunlock/client/en_US/
    2. Get a T- mobile SIM. Even if you don't want the service, if you feign interest, they will send you one for free or 99cents. If you need it now you can get one at a T-mobile store too.
    3. Once you have both your Straight talk SIM and your T-mobile SIM follow these instructions:http://www.youtube.com/watch?v=mFFf5uqk18M
    4. If you have any remaining questions look at all the responses posted previously on this thread or check out the Howard Forums Wiki: http://wiki.howardforums.com/index.php/Straight_Talk_iPhone
    Everything should work flawlessly at this point.  If not let me know and I'm happy to help when I can.  I hope this makes doing this very easy for everyone in the future. God Bless -J

  • Problem w/ image item using 9i BLOB field and InterMedia ORDImage Object

    Hi,dear all,
    I have a problem with image item in Form 6i. Oracle 9i is used as backend DB, and a table contains image data is created for testing:
    create table image_test(
    id number,
    image blob
    In Form 6i, there is no problem to create a block for inserting/updating the image record into the database. However, it can not be used to retrieve image (blob field), the image item remains empty after 'execute query', while the id field can be retrieved. When the same table is created in Oracle 8.1.7, and the exact same form can be used without any problem both in inserting and retrieval. It seems that the Oracle 9i does not use the same way to store BLOB column. Has anybody ever encountered this problem? How to retrieve image (BLOB) in Form 6i from Oracle 9i?
    I tried to use interMedia ORDImage as the data type in Oracle 9i, that is,
    create table image_test(
    id number,
    image ORDSYS.ORDImage
    Same problem, the form can insert record with image, but when retrieving, nothing displayed. Anybody could help! Thanks in advance!

    hi!
    well working with oracle8i and form6i.
    same problem..but i used (instead of blob or clob as datatype..) Long raw..
    it can be saved as usual..i mean Commit..
    and can be retrieved..using Execute_Query..its working fine..
    well if anybody get any other solution..do inform..
    mail_id:
    [email protected]

  • I was having problems burning DVDs' fro iDVD and it turned out my burner is at fault I have a 27 inch iMac using a OPTIARC DVD RW AD-5680H. Where can I buy a replacement in UK?

    I was having problems burning DVDs' from iDVD and it turned out my burner is at fault.
    I have a 27 inch iMac using a OPTIARC DVD RW AD-5680H. Where can I buy a replacement in UK? I have seen these with SATA is this the correct cable for my mac?
    I have also tried the Mac superdrive but my imac wont recognise it as it's been configured for macbook air and mini mac. I know I can "make" it work by doing something or other in com.apple/plist, but dont want to mess about in there.
    I'm also told an external drive would work but does "mac compatible" mean only for air and mini as their own superdrive is or all macs?
    Any help appreciated before I convince myself mac is no better than windows pc!

    Thanks but this didn't really help.
    I can buy the drives at a dozen places but none of them seem to know what connection is correct (SATA etc) and that includes the apple store. It was the store who told me buy the superdrive and all my problems would be over. Wrong! It isn't recognised by imac as it's confifured for air and mini mac. Only way to make it work is as i said in earlier post. (Would you be happy buying a car you were told would start and then discover you have to open the bottome and fiddle to make it go?)
    The apple store I would not even consider taking it to. Days without the pc, over priced and don't have a good reputation for actually fixing things!
    But thanks

  • I am importing videos from my canon sl1 to my macbook when i use iphoto is says "iPhoto cannot import your photos because there was a problem downloading an image." and when i use image capture it says "An error occured while importing. The item 'MVI_1040

    I am importing videos from my canon sl1 to my macbook air when i use iphoto is says "iPhoto cannot import your photos because there was a problem downloading an image." and when i use image capture it says "An error occured while importing. The item ‘MVI_1040'' Thanks in advance

    Can you access the images on the phone with Image Capture (in the Applications Folder) ?

  • HT201210 nowadays have many user have problem with update to ios7 and need active with apple id maybe in the future in order escape from these problems must be stop use these products else. Because of simple user don't know about this technology and somet

    nowadays have many user have problem with update to ios7 and need active with apple id maybe in the future in order escape from these problems must be stop use these products else. Because of simple user don't know about this technology and sometime just hear from other user that it 's difficult to use then force they change phone that use to handle to another.

    It is a feature to discourage the theft of iPhones by making them useless if resold. It's not going anywhere. It's simple: just don't buy a phone until you make sure that the activation lock has been disabled.

Maybe you are looking for

  • FAQ: How do I post photos to Facebook from Revel?

    Q: How do I post photos to Facebook from Revel? A: Sharing your images to Facebook If you have an iPad or iPhone Click, then first login to facebook on your device. Then, launch Revel, navigate to an album and click on the icon. Select the images you

  • Skype Crashing When Calling/Using Webcam

    Hi, I currently have two Logitech webcams that are the same model on my Windows PC. I decided to use one instead of the other. Before that, everything worked fine. But when I unplugged the one and plugged in the other, I went to Skype video settings

  • Help with DOMParser

    Hi I'm using the DOMParse to parse a XML File. I want to print the tagnames.My program does it, but it prints a lot of "#text" too. What are they? How can I avoid them? Do I have to use a dtd or a xsd to use correctly the DOMParser? if I have, how ca

  • M305-S4910 password

    My niece has a M305-S4910 laptop.  She set a boot password on it and now has forgotten it.  She hasn't used the laptop for sometime, but, now nees to use it for school.  Is there any way to reset the password?  The computer boots up and goes directly

  • Flash lite 2.1 for wm5 can't play video in wm6?

    Dears, I install flash lite 2.1 for wm5_ppc in my phone(dopod S1 , system:wm6 ,mode:ppc),I develop a swf application using video,code as "myvideo.play ("test.3gp")",it does not work.I detected my phone support mime as: "avi,3gp",not as s60 "video/avi