[JDev 10.1.2] Compare JSTL var attribute with sessionScoped bean attribute

I'm new to JSTL.
I'm looking for a way in JDev 10.1.2 to compare a sessionScope bean attribute (sessionScope.User.Username) and a JSTL attribute variable. For this purpose I've developed the following code:
+<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>+
+<%@ page import="bean.User"%>+
+<jsp:useBean id="User" class="bean.User" scope="session" />+
+...+
+<c:forEach var="Row" items="${bindings.ReadOnlyViewObject.rangeSet}">+
+<c:choose>+
+<c:when test="${Row.CreatedBy == sessionScope.User.Username}">+
+...+
+</c:when>+
+</c:choose>+
+</c:forEach>+
+...+
However it doesn't work on the test line. I'm not able to compare Row.CreatedBy to sessionScope.User.Username.
I've also tried <c:when test="${Row.CreatedBy == User.Username}"> without success.
Could you help me?
Thanks.

The bean property will have an initial lowercase name, so try sessionScope.User.username ?
I believe since you used the jsp:useBean, that you can also just use User.username without the "sessionScope" in there, as well.

Similar Messages

  • Retrieve all attributes with specified name attribute

    hi all,
    how to extract the ancestor attributes with given name which is also an attribute?
    for eg.
    <country>
    <sponsor id="1" level="1" name="john">
    <sponsor id="2" level="2" name="mary">
    <sponsor id="3" level="3" name="ken">
    <sponsor id="4" level="4" name="mick"/>
    </sponsor>
    </sponsor>
    <sponsor id="2" level="2" name="kary"/>
    </sponsor>
    </country>
    (the structure above will be deemed as unlimited nested nodes)
    +how to get ancestor given name=mick, will return one way ancestor sponsor named: ken,mary and john?
    +the attribute name is the key to travese up or down, how to get the value?
    please advise, and thanks
    regards,
    wesley

    i solved one part of my problem.
    But, now i have to get all attributes for each users and i couldn't find them. The getattributes method doesn't return anything (i 'd like to retrieve the first name, last name, adress ...)
    thanx for help

  • Need urgent help on how to compare the user profile and process form attributes

    Hi All,
    We have a requirement  where after editing the  user profile attributes we have to compare the currently modified user  profile attributes and the existing     
    process form attributes and based on the differences we have to update the  process form accordingly.
    We have around 80 attributes so we cannot follow the procedure where
    we update the lookup process_triggers
    and add the "change attribute" task
    and "update attribute" taskin the process definition
    because it creates aroung 160 tasks in process definition. So we are doing it by writing a custom code. Is there any other simple way to do it or any API"s which can help us.
    Need very quick help.Thanks in advance.
    Regards,
    Geetha

    Check MOS: 1595938.1
    -Bikash

  • Comparing table attribute with a string without compromising performance?

    in pl/sql what is the best practice for comparing a varchar2 attribute with a string should be case insensetive, without compromising performance.
    I've read on using an index (upper(tbl_attribute)) and then comparing in the where clause using
    upper(tbl_attribute) = input_value'
    is this the only way?
    is there a directive that could make the process faster?
    how about reading the table into memory then do the compare using upper in memory would that be faster than reading the table each time we run the comaprison condition?
    example:
    select name from tblnames
    where upper(name) = upper('Joe')
    thank you

    I would say the ideal case would be to ensure that all the data that is stored in the column is upper case to begin with. To monitor that you could place a constraint on the table like the following:
    ALTER TABLE TABLE_X ADD CONSTRAINT UPPER_CONS CHECK (COLUMN_X = UPPER(COLUMN_X));If the code can't be modified to always store the data in upper case you could always create a trigger to force the value to be upper case.
    Then your WHERE clause would only have to be like the following:
    COLUMN_X = UPPER('JOE')In my opinion storing the data as it should be would be the best performing because it should allow the CBO to have as many access paths as possible. You could then create a regular index on this column if there was truly a need for even better performance.
    A function-based index as you suggested is another viable option as well.
    HTH!

  • Change page attribute with JavaScript

    Hi,
    hope someone can help.
    Is it possible to change a BSP page attribute with JavaScript??
    I have a JavaScript array with some serialnumbers. After push a save button, i want to save the array data into a page attribute.
    Some ideas?
    Regards Anton

    Hi,
    The only way of passing vars from JS to page attributes is submitting them via (hidden) values in a form or via params in an URL.
    Alternatively, you can try to let JS store things in a client cookie and let the BSP read that cookie.
    I didn't try that out yet though.
    Eddy
    PS.
    Put yourself on the SDN world map (http://sdn.idizaai.be/sdn_world/sdn_world.html) and earn 25 points.
    Spread the wor(l)d!

  • Using dynamic context attributes with flashisland

    I recently started looking at flashislands.
    Going through the SDN tutorials on this topic, I noticed that the declarations of GACDATASOURCE and GACPROPERTY properties inside web dynpro and their counterpart variables inside flex are a bit static (all naming and binding is done at design time).
    So I'm asking if there's a way inside flex to dynamically capture the values of the attributes of a web dynpro context node that is bound to an ArrayCollection variable inside flex without knowing the names and the amount of the attributes of the context node?
    Here's my situation:
    I have a context node (REPORT_DATA) inside web dynpro that at design time has no attributes.
    The attributes and their names are created dynamically at runtime.
    It is even so, that over time the amount of attributes may vary.
    Inside the web dynpro, the contents of this context node (REPORT_DATA) are shown in a (dynamically built) table.
    Besides using the table, I'm trying to show the same contents as a piechart and as a columnchart in a flashisland.
    The ROOTUIELEMENTCONTAINER of the FlashIsland view in web dynpro only contains a GACDATASOURCE element at design time.
    The 'dataSource' property of this GACDATASOURCE is bound to the context node REPORT_DATA.
    The 'name' property of this GACDATASOURCE is bound to an ArrayCollection variable inside flex (named dataSource).
    So much for the static part created at design time.
    At runtime inside web dynpro the correct GACPROPERTY's are created, based on the - over time changing - amount and the names of the context node.
    Suppose my REPORT_DATA context node at runtime starts with 3 attributes: ATTR1, ATTR2 and ATTR3
    Also suppose the node contains 2 elements: [ {"1_1", "1_2", "1_3"} , {"2_1", "2_2", "2_3"} ]
    The dataSource variable inside flex also contains 2 entries with 3 elements each.
    The code to show the value of (for example) the first element of all entries inside the ArrayCollection variable would be:
    +for each( var o:Object in dataSource) {
    var s:String = o.ATTR1;
    Alert.show( "the 1st value = " + s ); // 1_1 for the first entry, 1_2 for the second
    }+
    I can then use the myAC variable inside flex as dataprovider for various other objects.
    This works fine.
    But inside flex I can only capture the value of an attribute when I know its name at design time (like ATTR1 in the sample code above).
    And that's not what I want.
    Inside flex I want to capture the value of the context attributes dynamically in a (correctly typed) flex variable without knowing the names and the amount of the context attributes.
    Is this possible?
    Thanks in advance for - any - response.
    Bart.

    Hi again,
    I tried the same thing by creating a dummy context node without any attributes, and adding all attributes at runtime using the add_attribute method. In that case too, it doesnt work. All the attributes are available in the dynamic attributes of the node element, but are not getting displayed.
    Any help would be greatly appreciated. Thank you.
    regards,
    nithya

  • How to compare a Date data with Current Year and Period Member on FIX

    Hi experts,
    I have a Project dim that each member is a Project (P01, P02...)
    and Account dim that stores information of the each Project (Name, Start date, Finished Date...)
    Finished Date member is in Date data type
    So how can write a IF condition below in order to compare Project Finished Date with Current Year and Period members on FIX
    FIX (@Descendants(Projects), Descendants(All Year), Descendants("Year Total")...)
    IF (@CURRMBR(Period)->@CURRMBR(Year) < Project->FinishedDate)
    Do something...
    Else
    Do something
    Please help me on this. Sorry for my bad grammar. Please ask if there is anything unclear
    Many thanks,
    Huy Van.
    Edited by: Huy Van on Jan 29, 2013 1:14 AM
    Edited by: Huy Van on Jan 29, 2013 2:24 AM
    Edited by: Huy Van on Jan 29, 2013 2:25 AM
    Edited by: Huy Van on Jan 29, 2013 6:04 PM

    Here is what I have done. Post for whom may concern later
    VAR FM; /* Finished Month of Project*/
    VAR FY; /* Finished Year of Project */
    VAR CM; /* Capture Current Month on FIX statments */
    VAR CY; /* Capture Current Year on FIX statments*/
    FIX ( @RELATIVE( "Year", 0), @RELATIVE( "Period", 0), @IDescendants( "Base Projects")....)
    FY = @ROUND( "TGHT"->"NA Contract"->"FY06"->"NA Period" / 10000, 0);
    FM = @MOD( @ROUND( "TGHT"->"NA Contract"->"FY06"->"NA Period" / 100, 0), 100);
    /* For FY13 return 13... */
    CY = @JgetDoubleFromString( @CONCATENATE( "20", @SUBSTRING( @NAME( @CURRMBRRANGE( Year, Lev, 0, 0, 0)), 2)));
    /* Set CM value based on currrent Period On FIX statement */
    IF ( @ISMBR( "Jan"))
    CM = 1;
    ELSEIF ( @ISMBR( "Feb"))
    CM = 2;
    ELSEIF ( @ISMBR( "Dec"))
    CM = 12;
    ENDIF
    IF ( CY < FY OR ( CY == FY AND CM < FM))
    Do something...
    ELSE
    Do something...
    ENDIF
    ENDFIX
    Edited by: Huy Van on Feb 19, 2013 11:10 PM
    Edited by: Huy Van on Feb 20, 2013 7:46 PM

  • Problem using JSTL tag libraries with OC4J 9.0.3

    Hi
    I'm using the JSTL tag libraries with OC4J 9.0.3. I'm using JDeveloper10.1.2. I put the fmt.tld and c.tld in the WEB-INF directory and I'm adding the jstl.jar and standard.jar library to the EAR file. Both tlds have:
    <tlib-version>1.0</tlib-version>
    <jsp-version>1.2</jsp-version>
    And OC4J 9.0.3 is compatible with tlib version 1.0 and jsp version 1.2. When I run the web app I get:
    OracleJSP: oracle.jsp.parse.JspParseException: Line # 1, <%@ taglib uri="/WEB-INF/fmt.tld" prefix="fmt"%>
    Error: oracle.xml.parser.v2.XMLParseException ( /dataSource.jsp ):
    line #:1 column #:48 : FIXED type Attribute value not equal to the default value 'http://java.sun.com/xml/ns/j2ee'.
    line #:2 column #:18 : Attribute 'xmlns:xsi' used but not declared.
    line #:3 column #:19 : Attribute 'xmlns:acme' used but not declared.
    line #:4 column #:27 : Attribute 'xsi:schemaLocation' used but not declared.
    line #:7 column #:16 : Attribute 'version' used but not declared.
    line #:14 column #:15 : Invalid element 'tag-class' in content of 'tag', expected elements '[tagclass]'.
    line #:14 column #:15 : Element 'tag-class' used but not declared.
    line #:15 column #:18 : Invalid element 'body-content' in content of 'tag', expected elements '[tagclass]'.
    line #:15 column #:18 : Element 'body-content' used but not declared.
    line #:16 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:18 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.
    line #:18 column #:12 : Element 'type' used but not declared.
    line #:22 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:24 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.
    line #:24 column #:12 : Element 'type' used but not declared.
    line #:28 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:30 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.
    line #:30 column #:12 : Element 'type' used but not declared.
    line #:34 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:36 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.
    Any ideas?

    Hi
    Thanks for the reply.
    I tried it and I get the same error:
    OracleJSP: oracle.jsp.parse.JspParseException: Line # 1, <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt"%>
    Error: oracle.xml.parser.v2.XMLParseException ( /dataSource.jsp ):
    line #:1 column #:48 : FIXED type Attribute value not equal to the default value 'http://java.sun.com/xml/ns/j2ee'.
    line #:2 column #:18 : Attribute 'xmlns:xsi' used but not declared.
    line #:3 column #:19 : Attribute 'xmlns:acme' used but not declared.
    line #:4 column #:27 : Attribute 'xsi:schemaLocation' used but not declared.
    line #:7 column #:16 : Attribute 'version' used but not declared.
    line #:14 column #:15 : Invalid element 'tag-class' in content of 'tag', expected elements '[tagclass]'.
    line #:14 column #:15 : Element 'tag-class' used but not declared.
    line #:15 column #:18 : Invalid element 'body-content' in content of 'tag', expected elements '[tagclass]'.
    line #:15 column #:18 : Element 'body-content' used but not declared.
    line #:16 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:18 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.
    line #:18 column #:12 : Element 'type' used but not declared.
    line #:22 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:24 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.
    line #:24 column #:12 : Element 'type' used but not declared.
    line #:28 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:30 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.
    line #:30 column #:12 : Element 'type' used but not declared.
    line #:34 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:36 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.

  • ADF BC Attribute with VC of CONTAINS Ignores Choice List on the LOV

    JDev 11g PS 1.
    Objects:
    - A view criteria with attribute defined as CONTAINS (literal)
    - An LOV on that attribute with a default list type UI hint of Choice List
    - ADF Faces query-table based in the VC
    Problem: query-table ignores the Choice List and renders an Input Text.
    Clue: Changing the operator to EQUALS causes the expected Choice List to be rendered in ADF BC.
    If this is documented in the online help or in this forum, it is escaping me.
    Anyone know the best workaround? Set the VC using EQUALS and switch it to CONTAINS in buildWhereClause() maybe?
    Thanks,
    Peter

    Frank,
    Thanks for the fast reply and for the bug entry. Unfortunately stopping work is not an option. We've come up with a solution using a query listener that replaces EQUALS with CONTAINS before the query and resets it to EQUALS after the query (otherwise the component draws the text item after the query).
    Maybe you can think of another solution to our requirement: display a single master record in the results table for a master-detail database view. For example, in an altered Oracle HR world, each DEPARTMENTS record is associated with multiple LOCATIONS records (through a DEPT_LOC table). A database view, DEPT_LOC_VW, based on that table also contains the location description and department description.
    Users want to select and then edit (on another page) a department by querying by location. If we represent DEPT_LOC_VW in the query-table component, we see multiple result rows for a single department and that is unnecessary confusion for the purpose of editing a single department.
    So we have created an alternative database view, DEPT_VW, based on DEPARTMENTS only, with an additional column -- LOC_LIST -- based on a function that returns a delimited list of all location codes for that department. This way, the user sees only one department record in the results table (although we lose the location description in the results -- not an issue) and is still able to query based on location.
    A LOCATIONS_VW view contains the location code surrounded with the delimiiter. The DeptVw view attribute LocList contains an LOV based on that database view.
    We want the view criteria to create a query condition:
    WHERE loc_list LIKE '%'||<selected location code>||'%'We thought about some kind of clever use of a subquery using a bind variable:
    SELECT...
    FROM  departments -- not DEPT_VW or DEPT_LOC_VW
    WHERE department_id IN (
       SELECT department_id
       FROM   dept_loc
       WHERE  location_id = NVL(:userSelectedLocationId, location_id);But that bind variable does not show in the view criteria selection list so it will not appear in the query component.
    Thanks again,
    Peter

  • Urgent: Entity Attribute for this View Attribute cannot be in 'irc'

    Hi ,
    I am trying to extend AplAssgHistoryVO.xml to one extra field 'Chnaged By' as per our critical ptoduction requirement.
    I have downloaded the following TOPs under $JAVA_TOP
    (a) /oracle/apps/irc
    (b) /oracle/apps/per
    (c) /oracle/apps/ben
    (d) /oracle/apps/xdo
    (e) /oracle/apps/ota
    (f) /oracle/apps/pay
    I have copied these TOPs to my 'D:\p6908968_R12_GENERIC\jdevhome\jdev\myprojects' directory.
    Now when I have cerated one .JWS file and one .jpr under that.
    Now when I tried to expand oracle.apps.irc.applicant.server it is giving the following error:
    oracle.jbo.dt.objects.JboException: Entity Attribute for this View Attribute cannot be found.
    oracle.apps.xdo.oa.schema.server.TemplatesVlEO.DataSourceId
    oracle.apps.xdo.oa.schema.server.TemplatesVlEOView.DataSourceId
    Please could someone tell me why this error is coming. Whether I have to download any other patch/library/TOPs for this.
    Thsnka in advance for your help.
    Thanks and regards,
    Sunil Kanlti Malik

    Hi Abdul,
    Thanks for your reply.
    This is seeded one. All I am doing to try to extend it.
    Please could you let me know what are other TOPs we need to download to extend it.
    I am really stucking at this point as I do not know which other TOPs or library I need to download.
    Also I could not find the meneitoned item insode the TemplatesVIEO.
    Thanks in advance for your help.
    Thanks,
    Sunil

  • XmlObject - set value of element with a particular attribute

    Hi,
    In a xmlObject I try to set the value of xml element with a particular attribute but it doesn't work
    //get value of element with a particular attribute
    var myValue = xmlObject.ELEMENTS.ELEMENT.(@category == "myCategory"))// works fine
    //set value of element with a particular attribute
    var myValue = "foo"
    xmlObject.ELEMENTS.ELEMENT.(@category == "myCategory"))= myValue // doesn't work
    Thanks for your help
    Regards

    Hi Dirk,
    For example :
    var xmlObject = new XML ( "<rootElement> <elements> <element category='foo1'>value1</element> <element category='foo2'>value2</element> <element category='foo3'>value3</element> </elements></rootElement>");
    myValue = xmlObject.elements.element.(@category == "foo1");
    $.writeln(myValue)// return value1
    // Now I want modify value1 to value99 like this
    xmlObject.elements.element.(@category == "foo1")= "value99"; //doesn't work
    I hope I was clear in my explanation ;-)
    Regards

  • XML attribute 'with' reserved?

    While working on a XMPP implementation I'm noticing the attribute 'with' keeps throwing errors when trying to access it to set or get the data from it. Is that a reserved word or something? Sort of makes this difficult considering 'with' is used heavily in the spec..
    var xml:XML = <rootNode>
              <item with="test" without="rest">cool</item>
    </rootNode>;
    trace(xml.item.@without); // no problem
    //trace(xml.item.@with); // uncomment and you'll get error "Syntax error: expecting identifier before with."

    It can be how you access it when considering reserved words. Try trace(xml.item.attribute("with")); or trace(xml.item.@["with"]); 

  • Comparing the BOM usage with the actual usage for materials.

    Hi All
    My client want to compare the BOM usage with the actual usage and have a report for this within a period? More specified they want to calculate the BOM usage, based on the requirement quantity from confirmation - but with out the scrap %. mulitplied with the confimed quantity of the header material.
    The actual usage should be based on  goods issuing from stock, either as goods issue to order (backflushing) or as goods issue to cost center. 
    I havent been able to indentiy a standard report for doing this - does some of you know a standard report?
    -  I was thinking of the following method:
    Look at  tabel RESB and compare it  with MSEG, but I have some diferent problems with this.
      - In resb there is no qty before scrap. 
      - The data amount from MSEG, is so huge so it is not possible to make a data search for a whole period (eg. month)
    Br. M

    There is one std report MCRX which gives a comparison of quanity in order and actual consumption,
    if it doesnt meet your need, you may have to create a custom report.
    logic can be find the quantites as per BOM for the produced quantities
    issued quantities to the order
    tables you may need are AUFK AUFM
    AFKO, STAS STPO
    MSEG, MKPO
    JEST ( if you want to filter using order status)

  • HT1209 My Itunes Library and iPhone have fallen out of sync on music over the yearsare - how can I compare my itunes library with my Iphone  to see what songs are missing from my library so I can then bring my Library up to date

    My Itunes Library and iPhone have fallen out of sync on music over the yearsare - how can I compare my itunes library with my Iphone  to see what songs are missing from my library so I can then bring my Library up to date

    Hello Solid Buck,
    Thank you so much for providing the details about the duplicate song issue you are experiencing.  It sounds like you would like to remove the duplicate songs that will not play on your iPhone, but when you connect it to iTunes, iTunes only shows you one copy of the song on your iPhone. 
    In this situation, I recommend deleting the individual songs that do not play directly from your iPhone.  I found the steps to do this on page 61 of the iPhone User Guide (http://manuals.info.apple.com/en_US/iphone_user_guide.pdf):
    Delete a song from iPhone: In Songs, swipe the song, then tap Delete.
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • WCF :Consider marking the type with the CollectionDataContractAttribute attribute or the SerializableAttribute attribute or adding a setter to the property

    Hi All,
    Currently I am working in a WCF project here when I try to send data from WCF Project 1 to WCF project 2 I am getting the below error.
    The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:subscriber. The InnerException message was 'The use of type 'Integra.Business.ICC.ObjectChangeTracker'
    as a get-only collection is not supported with NetDataContractSerializer.  Consider marking the type with the CollectionDataContractAttribute attribute or the SerializableAttribute attribute or adding a setter to the property.'.  Please see InnerException
    for more details.
    I don't understand what issue this is since I am new to WCF. Please help me on this thanks in advance.

    You've posted to a forum for Microsoft Project - a project management program.  Please re-post your question to the WCF forum:
    http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=wcf
    Sorry - I cannot seem to move your post for you.
    Julie

Maybe you are looking for