Using a variable in Spry conditional tests included in a Spry Tooltip

I have the following code:
<div spry:region="company" id="tooltip">
<div spry:repeat="company" spry:choose="spry:choose">
<div spry:when="'{name}'==memberName">
<table>
<tr>
<td
align="center"><h2>{name}</h2></td>
</tr>
<tr>
<td align="center"><img src="{headshot}"
alt="{name}" width="227" height="350" /></td>
</tr>
<tr>
<td align="center">{description}</td>
</tr>
</table>
</div>
</div>
</div>
<script type="text/javascript">
var tooltip_trigger_one = new
Spry.Widget.Tooltip("tooltip","#trigger", {showDelay: 200,
hideDelay: 200, offsetX: 250, offsetY: 200} );
</script>
where the variable "memberName" is set elsewhere to a value
that matches one of the occurrences in the column "name" in the
dataset "company". I can see, using debugging tools, that the
variable is being set correctly. But.... when the tooltip is
triggered, only a small few-pixel square box opens up.
If, instead of using the variable "memberName" in:
<div spry:when="'{name}'==memberName">
I use a string, as in
<div spry:when="'{name}'=='John Doe'">
then the code works correctly and I get a large tootlip
showing me the correct information for that member of the company.
I have tried different tests (spry:if and spry:test for
instance), tried various combinations of quotes and parenthesis and
tried placing the code at various places both inside and outside of
the <body> -- but always get the same results.
Is it not possible to test against a variable or am I doing
something else incorrectly?
Thanks,
Janet

OK.... some progress to report.
I was setting memberName onmouseover-- which is also the
trigger for the tooltip-- thusly:
<p><em onmouseover="memberName='John Doe'"
id="trigger">John Doe</em></p>
It seems that the variable is being set, but too late, as the
trigger has already caused the div... id="tooltip"> to be
evaluated with "memberName" not equal to any of the names in the
dataset. I tried using a function call to set "memberName" and
tried putting the onmouseover in the <p> tag and leaving the
trigger id in the <em> tag. but neither of those appear to
change the outcome. "memberName" still appears to be set to the
value I initialized it to up the the <head> section at the
time the tooltip <div> is evaluated. Although it is set
correctly if I check it's value using Firebug after I have
mouse-overed it.
Incidentally, using a Firebug breakpoint just before the
<div spry:when...> and checking the value of memberName was
how I discovered that "memberName" still seemed to have a value of
"initialized" which is what I set it to up in the <head>
section.
Having written all of this, I am wondering though, shouldn't
the value of "memberName" be equal to "John Doe" the second time I
mouseover it? Or, if there are more than one trigger "names" on the
page, shouldn't "memberName" be equal to the name of the previous
trigger that I moused-over? And with memberName having a legitimate
value at that point, shouldn't the tooltip now show the correct
display information rather than just that little few pixel square
box that I am getting when I mouse-over the trigger name?
Clearly there is something that I just am not understanding.
Janet

Similar Messages

  • Issue in using presentation variable as filter condition in the reports

    Hi,
    I have an issue in using presentation variable as filter condition in my reports the details are as follows:
    Details :
    We want to implement the Max and Min variables through Presentation variables only.we do not want to implement it through session variables in this case.
    We have two variables MIN and MAX to be used as Presentation Variables,for a column of the report (which is a quantity),so that the user wants to see the data for this column within a particular range.i.e the Min and the Max.This part has been implemented well . The issue is when the user wants to see the full data.In that case we will not pass any values to these two Presentation Variable or in other words we are not restricting the report data so we are not passing any value to the variables,this is when the report is throwing the error. we want to leave this variables blank in that case.but this is giving error.
    Please suggest how can I overcome this issue.
    Thanks in Advance.
    Regards,
    Praveen

    i think you have to use guided navigation for this. create two reports first is the one you are having currently and second is the one in which remove the presentation variable from the column formula. i.e. the same report with no aggregation applied.
    Now create a dummy report and make it return value only when the presentation variable value is not equal to max or min. guide the report to navigate between the first and second report based on the result of the dummy report.

  • How to use ADF variables in C:when test?

    I have a <af:iterator in my page fragment as follows
    <af:iterator id="i1" value="#{queryModel.currentDescriptor.conjunctionCriterion.criterionList}" var="criterion" varStatus="vs">
    Within this iterator, I want to make a decision absed on the index of the iterator. To do this test, I am using jstl as follows
    <c:when test="${vs.index == '0' or vs.index == '2' or vs.index == '4'}">
    This test is however always evaluating to false. I have tried cahnging my code using various combiantion as below ...
    <c:when test="#{vs.index == '0' or vs.index == '2' or vs.index == '4'}">
    <c:when test="${vs.index == 0 or vs.index == 2 or vs.index == 4}">
    <c:when test="${vs.index == '0' || vs.index == '2' || vs.index == '4'}">
    But nothign seems to be working fine.
    Can some one help me with what I am doing wrong?
    Thanks.

    How to use ADF variables in <C:when test?

  • Error in using a variable in filter condition in an Interface

    Hi All,
    I am using a variable in my interface in a filter condition. I have an EMP table of scott schema and want to pull all the records wiht hiredate date lying between 2 dates, incremental pull.For this I have created 2 variables and using them in the filter condition. I am getting an error inthe interface when I run in a package after declaring and refresing the variables.
    com.sunopsis.sql.SnpsMissingParametersException: Missing parameter
         at com.sunopsis.sql.SnpsQuery.completeHostVariable(SnpsQuery.java)
         at com.sunopsis.sql.SnpsQuery.updateExecStatement(SnpsQuery.java)
         at com.sunopsis.sql.SnpsQuery.executeUpdate(SnpsQuery.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execStdOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.i(e.java)
         at com.sunopsis.dwg.cmd.g.y(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Unknown Source)
    Regards,
    Krishna

    Hi Krishna,
    What is the datatype of the Variable lastupdate ?
    In my case
    Variable
    Name : LastUpdateDate
    Datatype : Alphanumeric
    Action : Historize
    Query : select to_char(to_date(sysdate,'DD-MON-YY'),'DD-MON-YY') from sys.dual
    Then in filter I used
    EMP.HIREDATE>to_date('#LastUpdateDate','DD-MON-YY')
    Thanks
    Sutirtha

  • Using javascript variable in spry if statement

    is it possible to put a javascript variable in to the spry if
    statement to test?
    like <div spry:if="javascriptvar == {ds_RowNumber}"....
    thanks.

    Hi rogerfreak,
    When the region processes a spry:if, it simply takes the
    value of the spry:if attribute, replaces all of the data references
    in it with real values from the data set and then evals the result
    (executes the string).
    So you can do something like:
    <script>
    var ds1 = new Spry.Data.XMLDataSet("foo.xml", "/foo/bar");
    var gMode = 5;
    function GetMode()
    return gMode;
    </script>
    <div spry:region="ds1">
    <ul spry:if="gMode == 5">
    <li spry:repeat="ds1">{name}</li>
    </ul>
    <div spry:if="gMode == 12" spry:repeatchildren="ds1">
    {name}
    </div>
    </div>
    In the example above the list markup will be written out if
    gMode is 5, but if it is 12, it will write out the div markup.
    You can also call functions:
    <div spry:region="ds1">
    <ul spry:if="GetMode() == 5">
    <li spry:repeat="ds1">{name}</li>
    </ul>
    <div spry:if="GetMode()== 12"
    spry:repeatchildren="ds1">
    {name}
    </div>
    </div>
    --== Kin ==--

  • OBIEE 11g:  Use presentation variable in Column Heading

    Hi everyone,
    I was playing around with sample app dashboards and I saw a dashboard prompt that they converted into a column selector. I liked it and reproduced it in my own sandbox.
    I like the results, however, I would also like to change the column heading to clearly reflect which measure was selected. It's pretty clear when you are looking in the dashboard, but once you export the data, it can be confusing which measure was selected.
    That is why I would like to use a presentation variable in the column heading section. I tried to do this but it interpreted it as a literal instead of evaluating the statement.
    Is there anyway to get a variable in the column heading?
    Thanks!
    -Joe

    Hi,
    Have a look at the following links:
    http://oraclebizint.wordpress.com/2008/01/25/oracle-bi-ee-101332-dynamic-column-headers-using-presentation-variables-sets-and-conditional-formatting/
    show the presentation variable on table column header
    Define presentation variable in column header
    hope it helps.
    Regards,
    Kalyan Chukkapalli
    http://123obi.com

  • How to use the variables of Function exit in the include program

    i have a problem of using the variables of a function exit in the include program..
    If i use those variables there will be an error indicating 'Field FEBVW_IN is unknown. It is neither in one of the specified tables nor defined by a DATA statement'. Please help... Below is the code of the function exit:
    FUNCTION EXIT_SAPLIEDP_202.
    ""Lokale Schnittstelle:
    *"  IMPORTING
    *"     VALUE(IDOC_CONTROL_INDEX)
    *"     VALUE(IDOC_DATA_INDEX)
    *"     VALUE(FEBVW_IN) LIKE  FEBVW STRUCTURE  FEBVW
    *"     VALUE(FEBKO_IN) LIKE  FEBKO STRUCTURE  FEBKO
    *"     VALUE(FEBEP_IN) LIKE  FEBEP STRUCTURE  FEBEP
    *"     VALUE(FEBRE_IN) LIKE  FEBRE STRUCTURE  FEBRE
    *"     VALUE(FEBPI_IN) LIKE  FEBPI STRUCTURE  FEBPI
    *"  EXPORTING
    *"     VALUE(I_FIMSG) LIKE  FIMSG STRUCTURE  FIMSG
    *"     VALUE(FEBVW_OUT) LIKE  FEBVW STRUCTURE  FEBVW
    *"     VALUE(FEBKO_OUT) LIKE  FEBKO STRUCTURE  FEBKO
    *"     VALUE(FEBEP_OUT) LIKE  FEBEP STRUCTURE  FEBEP
    *"     VALUE(FEBRE_OUT) LIKE  FEBRE STRUCTURE  FEBRE
    *"     VALUE(FEBPI_OUT) LIKE  FEBPI STRUCTURE  FEBPI
    *"  TABLES
    *"      IDOC_CONTROL STRUCTURE  EDIDC
    *"      IDOC_DATA STRUCTURE  EDIDD
    *"      IDOC_AVIP STRUCTURE  AVIP OPTIONAL
    *"      IDOC_AVIR STRUCTURE  AVIR OPTIONAL
    *"      IDOC_AVIT STRUCTURE  AVIT OPTIONAL
    *"  CHANGING
    *"     REFERENCE(IDOC_AVIK) TYPE  AVIK OPTIONAL
    *"  EXCEPTIONS
    *"      PROC_ERROR
      INCLUDE ZXF08U10.
    Here is the code for the include program.
      INCLUDE ZXF08U10
    MOVE febvw_in TO febvw_out.

    Sometimes you will get this error message when checking include code in exits even though there is really no error - it happens because the include does not realise it is in the function due to the navigation index being out of date.
    Try activating the code - it may work even though the check said there were errors.
    You can also get this issue when trying to drill down on the field in the include to view its structure.
    Andrew

  • Using process variables in conditional transition

    HI,
    I am usin Oracle BPM 1.03
    I wanto to have a value of a variable visible in the user's inbox. Therefore, I need to use project level variables.
    I also want to use this variable in conditional tranistion, but the condition editor only allows Instance level variables.
    Am I overlooking something? Is there an easy way to use project variable in conditional transtions?
    Matej

    you should be able to manually type the transition condition on the properties tab.
    xArea == "MyArea"
    where xArea is a Project Variable

  • Conditional suppression using substitution variable in Hyperion financial r

    Hi all,
    Is there a way that I can suppress a column using substitution variable in hyperion financial reporting?
    For eg, i want to suppress the column if the value of the substitution variable curr_mnth = jun.
    Is there a way to do this? In conditional suprression dialog box, I dont find this option.
    Please suggest.
    Your response is appreciated.
    Thanks,
    Sirisha.

    Hi Sirisha
    In my earlier reply I think I may have mislead you as I thought that you could set the member name equal to that in a row/column and I've managed to get into a HFR studio session this morning and realised that the conditional suppression only allows you to suppress where member name = 'XXX' (specific text) so that doesn;t meet your requirement.
    Different people will have different ways of achieving what you want and everyones requirements are different. If it helps my preferred way of conditionally suppressing periodic data (for Planning/Essbase) is to add a dynamic calc account member called 'TP-Index' into the database, set up a formula so that each period returns a numeric value from 1 to 12 to match the fiscal/calendar year as required.
    Then in reporting bring the account and period dimensions into rows/columns so that you are able to retrieve data for the TP-Index account and the period as defined in your substitution variable. You can then choose how the suppression works based on a numeric value, commonly you may want to suppress if greater than, e.g. you have a multi-period report where your actual data is to June so you want to suppress everything from July onwards.
    I'm sure that a similar thing could be achieved in HFM as well if that is your underlying system instead of Essbase.
    Does that help?
    Stuart

  • Code hints don't work - include files using a variable

    In Dreamweaver CS 5.5 code hints didn't work properly.
    DW would not look at my code and find the include files and look at the functions inside them when using a variable to make an absolute path, which is the best way to include files in PHP (its faster and more reliable on your web server)
    Here is an example:
    ======================================
    public_html/util/util_index.php
    $DIR_MAIN            =dirname(dirname(__FILE__).'../');
    require_once "$DIR_MAIN/init.php";
    my_function(#CODE COMPLETE DOES NOT WORK HERE
    public_html/init.php
    $DIR_INCLUDE=               "$DIR_MAIN/inc";
    require "$DIR_INCLUDE/common_functions.php";
    #set up environment variables
    #connect to the database
    #etc
    public_html/inc/common_functions.php
    function my_function(param1, param2, param3) {
    =======================================
    Has this been fixed in Dreamweaver CS6 or should I wait until CS7?
    Until this works, I prefer Notepad++

    I made a full SQL Developer installation with Java included, so I suppose that the included version is used.
    After a problem with the German Version I tried to switch to English Version by using the hint:
    link: 1.5.4 export insert statements
    I changed the content of sqldeveloper.conf and now again the code templates (strg-shift-t) don't work!!!
    (I already rebooted and set the accelerators to default, but it didn't help now.)
    This is the content of my sqldeveloper.conf now:
    "IncludeConfFile ../../ide/bin/ide.conf
    AddVMOption -Dapple.laf.useScreenMenuBar=true
    AddVMOption -Dcom.apple.mrj.application.apple.menu.about.name="SQL_Developer"
    AddVMOption -Dcom.apple.mrj.application.growbox.intrudes=false
    AddVMOption -Dcom.apple.macos.smallTabs=true
    AddVMOption -Doracle.ide.util.AddinPolicyUtils.OVERRIDE_FLAG=true
    AddVMOption -Dsun.java2d.ddoffscreen=false
    AddVMOption -Dwindows.shell.font.languages=
    AddVMOption -XX:MaxPermSize=128M
    IncludeConfFile sqldeveloper-nondebug.conf
    AddVMOption -Duser.country=US
    AddVMOption -Duser.territory=US
    AddVMOption -Duser.language=en
    "

  • Using SQLCMD variables in SQL Server Unit Test Project

    Is it possible to use SQLCMD variables in my SQL Server Unit Test Project? In my test initialize script I'd like to set a database name variable, something like this:
    :SETVAR MyDatabase "mydatabase"
    SELECT * FROM [$(MyDatabase)].[mytable]
    but I get syntax errors when I run the test. Any suggestions how I can get this to work.
    Result Message: Initialization method
    myTest.TestInitialize threw exception. System.Data.SqlClient.SqlException: System.Data.SqlClient.SqlException:
    Incorrect syntax near ':'..

    Hi Kevin,
    What is the error?
    This should work only thing i could see is no scheme specified.
    SQL Server uses dbo as default schema.
    In your case:
    :SETVAR MyDatabase "mydatabase"
    SELECT * FROM [$(MyDatabase)].dbo.[mytable]
    Also check your instance collation if its Case sensitive then specify database and table name as exact case.
    Example:
    :SETVAR MyDatabase "[mydatabase]"
    :setvar schemavar "[dbo]"
    :setvar tablevar "[mytable]"
    SELECT * FROM $(MyDatabase).$(schemavar).$(tablevar)

  • Is it possible to use repository variable in conditional formatting

    Is it possible to use repository variable in conditional formatting . if no then is there any workaround for implementing the same....
    Also i came across a sql of an init block.. which goes like 'exec OracleBi..procedure_name'
    Is 'OracleBi..' a keyword or something like that....

    Refer http://www.biblogs.com/2008/09/03/obiee-repository-variables-filtering-and-conditional-formatting/
    Init blk is calling any procedure here with name OracleBI here...no any specific significance.
    Hope this help
    Edited by: Deepak Gupta on Aug 12, 2011 8:27 AM

  • Using a variable as a value in jsp:param

    I was wondering, I have a String variable, vid_1, and want to use a jsp:include and pass that in as one of the parameters. How can I do this? I have to do some testing to make sure vid_1 is valid and set a default if not. It contains a number referring to which video needs to be displayed.
    Is there anyway I can get this value to be used in jsp:param value?
    John

    RahulSharna wrote:
    Well,First thing you haven't pharsed your question properly.
    Anyways as per my understading.
    The first thing is make use of in this case as your defined requirement states you need to make use of variables of both the JSP's which need compile time include not at the runtime.use of
    <%@ include file="url" %>would be more appropriate as you want to use the variable of parent jsp to the child one.
    Anyways if you are thinking to apply a solution using <jsp:include/>
    <jsp:include page="url">
    <jsp:param name="paramName" value="<%=stringVariable>"/>
    </jsp:include>and extract the paramName's corresponding value as a request parameter in other JSP.
    Hope that might answer your question :)
    REGARDS,
    RaHuLRaHul,
    Thanks for the reply. The second example you gave is what I was trying to do. I thought I did exactly what you have there and it was not working. I will check it over again and post back on here when I have a chance.
    For now I was trying to use c:set to save the variable in the request and then using the EL expression ${requestScope.variable} to put it in the <jsp:param> element. I had some things working and others not when I quit. Hopefully tomorrow I can give you a full report and we can get this worked out.
    Maybe my problem is something else? Look at this post of mine:
    http://forum.java.sun.com/thread.jspa?threadID=5236252&tstart=10
    Thanks so much for the help.
    John

  • Using a variable in netsh command to set ip address on NIC

    hi friends
    i wrote an script which gets an input & use that variable to set ip address on NIC. but actually it doesn't set ip address. may you please help me.
    my script contains:
    $VMNumber=Read-Host "please enter your VM number (for example 2)"
    Netsh interface ipv4 set address NIC static 192.168.1.$VMNumber

    1. I do not thing that the use of netsh is a right way.
    2. You will need a table with MAC address in first column and IP address in second to correctly map IP address to computer. MAC addresses are unique identification.
    3. Follow this article including comments and adapt scripts to your task
    http://www.powershellpro.com/powershell-tutorial-introduction/powershell-wmi-methods/
    HTH
    Milos
    hi Milos
    thank a lot for your useful answer.
    but let me say that my need has nothing to do with MAC address.
    in my test lab, i need an script which asks the administrators to enter their VM number & it saves this input as a variable & set is as the last octet in their VM IPV4 Address.
    so can we tell it as a rule that variables we create in powershell, can't be used inside non cmdlets (inside legacy cmd commands) ?

  • Using Select statement in IF condition?

    hi all,
    Can i use select statement in IF COndition in pl sql ?
    eg like- if( select 1 from ASD) then
    end if;

    There is no way to do any kind of select statement inside if conditions.
    Why don't test simple cases like this first?
    An example to show it.
    SQL> begin
      2   if exists (select 1 from dual) then
      3    dbms_output.put_line('ok');
      4   end if;
      5  end;
      6  /
    if exists (select 1 from dual) then
    ERRORE alla riga 2:
    ORA-06550: line 2, column 5:
    PLS-00204: function or pseudo-column 'EXISTS' may be used inside a SQL
    statement only
    ORA-06550: line 2, column 2:
    PL/SQL: Statement ignored
    SQL> begin
      2   if ( (select count(*) from dual) > 0 ) then
      3    dbms_output.put_line('ok');
      4   end if;
      5  end;
      6  /
    if ( (select count(*) from dual) > 0 ) then
    ERRORE alla riga 2:
    ORA-06550: line 2, column 8:
    PLS-00103: Encountered the symbol "SELECT" when expecting one of the following:
    ( - + case mod new not null others <an identifier>
    <a double-quoted delimited-identifier> <a bind variable> avg
    count current exists max min prior sql stddev sum variance
    execute forall merge time timestamp interval date
    <a string literal with character set specification>
    <a number> <a single-quoted SQL string> pipe
    <an alternatively-quoted string literal with character set specification>
    <an alternativ
    ORA-06550: line 2, column 33:
    PLS-00103: Encountered the symbol ")" when expecting one of the following:
    . , @ ; for <an identifier>
    <a double-quoted delimited-identifier> group having intersect
    minus order partition start subpartition union where connect
    SQL> begin
      2   if ( 0 in (select count(*) from dual) ) then
      3    dbms_output.put_line('ok');
      4   end if;
      5  end;
      6  /
    if ( 0 in (select count(*) from dual) ) then
    ERRORE alla riga 2:
    ORA-06550: line 2, column 12:
    PLS-00405: subquery not allowed in this context
    ORA-06550: line 2, column 2:
    PL/SQL: Statement ignoredBye Alessandro

Maybe you are looking for