Counter variable within EL expression

Hello,
I want to set the value of a h:inputText by EL, consider the following example:
<h:inputText id="field1" value="#{handlers.data[1]}"/>The property 'data' is an object array.
Since I have many inputText tags I would like to generate them within a while loop. Thus, the above number '1' must be replaced by a variable (i++).
Does anybody know how to print the value of a variable within an EL expression? <%= i++ %> does not work.

I tried the c:forEach tag, but without success.
Consider the following example:
<c:forEach items="#{handler.myCollection}" var="it" varStatus="idx">
  <h:outputLabel for="field #{idx.index}" value="Field1" rendered="#{handler.labels >= #{idx.index}}"/>
  <h:inputText id="field #{idx.index}" value="#{handler.anotherCollection[#{idx.index}].fieldname}"/>
</c:forEach>

Similar Messages

  • Using Variable within Filter expression will not parse.

    IN ODI 11.1.1.3.0, I defined a Variable (SelectionDate) of type "Alphanumeric", Default Value = 01-JAN-1970 with the select query: select to_char( SYSDATE , 'DD-MON-YYYY') from dual.
    I intend to use this variable as a scenario variable (parameter) that receives a value in the form of 'DD-MON-YYYY', from the execution environment.
    I refreshed the variable and it received the value 16-JUN-2011 (today's date). So far so good.
    I then defined an Interface and used the variable in a filter expression:
    Active Filter: Checked
    Implementation Tab:
    SOURCE_VIEW.SELECTION_DATE BETWEEN TO_DATE('#PROJECT1.SelectionDate', 'DD-MON-YYYY') AND (TO_DATE('#PROJECT1.SelectionDate', 'DD-MON-YYYY') + 1)
    Execute on :Source
    When verifying the expression (click on the checkmark in the implementation tab) I always get: Expression is not valid for this DBMS. java.sql.SQLDataException: ORA-01858: a non-numeric character was found where a numeric was expected.
    I cannot get the filter to parse. Thank you for your ideas of what might be wrong.
    Jose.

    Yes, it worked when placed in the package.
    I think the expression editor is sending the string as it is written to the database in order to parse it, without replaceing the #variable for the actual value. Anyway thanks.
    Jose

  • Variable within Filter expression will not parse -Seems to be corrupted

    ODI 10.3.4.0
    I defined a Variable TTE_BU of type "Alphanumeric", Default Value = the select query:in (SELECT BUSINESS_UNIT FROM PS_S1_ODI_LEARNING)
    I use this variable as a package variable to filter table source data
    When I run the package The package errors out with the message:
    911 : 42000 : java.sql.SQLException: ORA-00911: invalid character
    java.sql.SQLException: ORA-00911: invalid character
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
    If I create another variable with another name but with the same SQL query the package runs OK.
    Has anyone ever solved tthis king of error?

    Solved the problem by doing a delete in the ODI repository.
    DELETE FROM SNP_VAR_DATA WHERE VAR_NAME = 'TTE_BU'
    I would be thankful to anyone who can explain the purpose of this table.

  • Decode a variable within an expression

    Hi,
    I am trying to make sure a variable is not zero when doing division. So far I have:
    <?xdoxslt:div (Total_Jobs_with_WT_Changes, decode(xdoxslt:get_variable($_XDOCTX, 'x'),'0','1',xdoxslt:get_variable($_XDOCTX, 'x'))) * 100 ?>
    The template doesn't compile with this.
    Thanks for any help.
    - Jenny

    Change it to this way :)
    <?if:xdoxslt:get_variable($_XDOCTX, 'x') > 0?>
    <?xdoxslt:div (Total_Jobs_with_WT_Changes, xdoxslt:get_variable($_XDOCTX, 'x') * 100) ?>
    <?end if?>

  • PL/SQL Counter for HTMLDB - Application Express - Survey Counter

    I wonder if somebody could help me to clarify the HowTo on this Survey.
    Based on:
    http://www.oracle.com/technology/products/database/application_express/index.html
    http://www.oracle.com/technology/oramag/oracle/06-mar/o26browser.html
    I follow up however that is not exactly what I like to see in my Survey. I like to make something more elegant and flexible.
    On this example he put 10 questions/ page. I like to use 1 Question / Page.
    And I like to extend to more than 10 pages. for example 20.
    My question to the forums is:
    If I create an application with Only 3 pages [ Welcome, Survey, End ]
    And the main page for the Survey is the second page.
    How would programatically be the logic to:
    Start the Welcome page => Setup variable counter = 1
    Then using sessions with a button click on Start Survey.
    Survey Page check for the existence of counter variable if exist retrieve the Question from the Questions table and the properly Answer will be recorded.
    This answer could include comments, and the Rating could be an LOV.
    After the Question 1 is asnwered then the Next Button on the Page 2 Call the same page 2. If the Questions is the max number of questions [20] then go to the End or Summary Page. if not just increase the counter variable then retrieve the next question.
    Am I asking to much ???. I'm just starting on PL/SQL and HTMLDB I'm not sure how to manipulate those variables. I've been trying but I'm stuck.
    Thanks in Advance for your Help.
    Dino.
    http://htmldb.oracle.com/pls/otn/f?p=42721:1:4875344191023058749:::::
    PS -> As soon as have the answer will post it public in htmldb.oracle.com =)

    Move this over to :
    Oracle Application Express (APEX)

  • Using jsp variables within JSP tag

    I have a variable defined within a JSP:
    <%
    String cust_id = request.getParameter("cust_id");
    %>
    I want to use this variable as a parameter to a custom tag:
    <%@ taglib uri="/tlds/DBTags.tld" prefix="db" %>
    <db:MultiColumnSelect columns="c.id, c.po" name="ccar_id" table_name="ccar_headers c, ccar_rmas r" selectString="r.ccar_id = c.id AND c.cust_id = <%= cust_id %>"/>
    The selectString value that is passed to my tag is:
    r.ccar_id = c.id AND c.cust_id = <%= cust_id %>
    The <%= cust_id %> is not replaced by the actual variable value.
    How would I accomplish using this variable within my JSP tag?

    Your definition of the selectString attribute must indicate that it can accept runtime expressions.
    <%
    String cust_id = request.getParameter("cust_id");
    String selectString = new String("r.ccar_id = c.id AND c.cust_id = " + cust_id);
    %>
    <%@ taglib uri="/tlds/DBTags.tld" prefix="db" %>
    <db:MultiColumnSelect columns="c.id, c.po" name="ccar_id" table_name="ccar_headers c, ccar_rmas r"
    selectString="<%= selectString %>"/>

  • Resetting a counter variable

    I am trying to use counter variable "count". The default for "count" is 0 when the program is opened up. I initialize ssd and sumclick to be 0. However once it goes through the formula node, the value for "count" changes to 1 and then the decision loop within the formula node that checks if "count>0" is used.
    My problem is, if I stop the program and then rerun the program without closing and reopenign the program, the value for count continues to be 1, and so my intialization for ssd and sumclick dont happen. Whenever I hit the run button I want count to be 0. I dont want count to remember the 1 from the previous run. How can I do this?
    The VI is below.

    Hi Charles,
    Thanks for answering my question. The pciture I posted is part of a large program. After I posted the question I reworked on the block diagram to create a base level example to try and figure out what was going wrong. Here is the base level example. I tried to get rid of the formula node in this. i just have a while loop and all LV operations. 
    I am trying to generate a random number, take the deviation^2 of the random number from 1 and then keep adding that cumulatively to make SSD. I want my SSD to begin with 0, everytime I stop and re-run the program. VI Attached. Please look at it and tell me. Thanks for the help in advance. 
    Attachments:
    ssd.vi ‏8 KB

  • How do I use a variable within a sql statement

    I am trying to use a local variable within an open SQL step but I keep getting an error.
    My sql command looks like this "SELECT BoardDetailID FROM BoardDetails WHERE SerialNumber = " +  locals.CurrentSerialNo
    If I replace the locals.CurrentSerialNo with an actual value such as below the statement works fine.
    "SELECT BoardDetailID FROM BoardDetails WHERE SerialNumber = " +  " 'ABC001' " 
    Can someone tell me how to correctly format the statement to use a variable?

    Hi,
    Thanks for the reply. I have changed the required variable to a string, but with no success. I have reattached my updated sequence file and an image of the error.
    When looking at the Data operation step I see that the sql statement is missing everything after the last quotation mark.
    Thanks again,
    Stuart
    Attachments:
    Database Test Sequence.seq ‏10 KB
    TestStand error.JPG ‏37 KB

  • Dataset Column Filter Within an Expression

    I have a shared dataset called "CommAccessEnrollments." Within the dataset there is a column called "On_Net_Off_Net" that will output a value of either "On Net" or "Off Net." Within the same report I have a row of
    just On Net results and another row with just Off Net results. I made 2 different datasets (from the same shared "CommAccessEnrollments" dataset) with filters on "On_Net_Off_Net" for On Net and Off Net results ("CommAccessEnrollmentsOnNet"
    and "CommAccessEnrollmentsOffNet"). Instead of having to create two different datasets to derive the on net/off net information, can I define that within the expression?
    Here is my existing expression for On Net: =Sum(Fields!M4.Value, "CommAccessEnrollmentOnNet") 
    Here is my existing expression for On Net: =Sum(Fields!M4.Value, "CommAccessEnrollmentOffNet") 
    Would something like =Sum((Fields!M4.Value, "CommAccessEnrollment") WHERE On_Net_Off_Net = On Net) work?
    EDIT:
    This expression also does not work:
    =Sum(IIF((Fields!ON_NET_OFF_NET.Value, "CommAccessInstallsAll") = "On Net", Sum(Fields!M4.Value, "CommAccessInstallsAll"), 0))

    Hi Pamela,
    According to your description, you want to sum M4 values of "On Net" and "Off Net". Right?
    In this scenario, since you have set the filter for the whole the dataset to filter the records where it is "On Net" or "Off Net". We can create a parameter to filter the records instead of creating two datasets. Specify "On Net" and "Off Net" as Available
    Values and set the column equals the parameter. Now you just sum the M4 value and the scope should be the whole dataset. If you want to combine the records of "On Net" and "Off Net", you can set row group on "On_Net_Off_Net" and add Total for each group instance.
    For your last expression, the reason why it's not working because we can't specify scope for a data field directly, so "(Fields!On_Net_Off_Net.Value,"CommAccessInstallsAll")" is invalid.
    Reference:
    Report Parameters (Report Builder and Report Designer)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou 

  • Assigning a specific value to the sapscript counter variable

    Hi all,
    I am trying to use the sapscript counter variable in my sapscript but encounter the following warning.
    My code looks like the following:
    /: DEFINE &SAPSCRIPT-COUNTER_0& = 0
    The new counter value is &SAPSCRIPT-COUNTER_0(+)&
    The warning i get when i do the syntax check is:
    Ambiguous symbol &SAPSCRIPT-COUNTER_0&
    What is wrong with my syntax?
    Appreciate any help i can get.

    Hi,
         If i am not wrong you are trying to reinitializing that standard variable. if that is the case one thing, in script we cannot assign values to variable other than at initializing time but here you don't have chance to initialize that variable because that is standard one. More over modifications to standard variable will give some warnings.
    So try to use other than standard one as per your requirement.
    Hope this will help you.
    Regards,
    Aswini.

  • How to Set and Use a global variable within a session?

    Dear All,
    I'm new to jsp, and would like to ask how to set and use a global variable within a session?
    Thanks in advance.
    Regards,
    Cecil

    With session.setAttribute("name",object) you can store a Attribute in the session object.
    with session.getAttribute("name") you can get it.
    That's it.
    Regards,
    Geri

  • Optional variables within report  not shown on portal

    Hello,
    I have got following phenomenon:
    I created a report with the Report Designer. This report contains different queries that all use the same optional variable. Our first tries showed the selection screen for this variable within the portal.
    After we changed the technical name and the description and published it into portal again the selection for the optioanl variable isn't shown anymore.
    It's no general problem because on queries for example the optional variables are shown.
    Has anybody an idea what could be the problem and how we can solve it?
    Greetings & thanks
    Bettina

    Hello,
    if I execute the report within the Report Designer there occurs a drop down menu on the variable screen "Available variants:" with on item "Report with variable".
    I can save this variant - but it's not possible to choose this special variant for publishing into portal (ok, maybe it works but my first tries didn't work). Do you have an idea how this setting can be used in portal??
    Greetings & thanks
    Bettina

  • Using variables within GETurl

    Having issues with getting a simple script working...
    I've created a 'flashvars' tag in my embed code (aid=test), which I simply wish to add to the end a GetUrl statement, contained in within a button (which is on the first level of the flash movie). This is the code I've added to the button...
    on (release) {
        getURL("http://www.platinumselect.com?id="+aid);
    But this doesnt seem to work!? Is there anything else I need to do?
    Thanks in advance! (p.s. using actionscript 2.0)

    Where are the 3 places?? I've got it in two at the minute.
    Date: Tue, 10 Nov 2009 07:53:55 -0700
    From: [email protected]
    To: [email protected]
    Subject: Using variables within GETurl
    in as2, there is no LoaderInfo class and you don't need to do anything in flash to parse the flashvars.
    but, as i mentioned in a duplicate post, you do need to define your flashvars in 3 places in your embedding html file.  failure to do that is the most common reason for a problem with flashvars.
    >

  • How to use the date repository variable in filter expression

    Hi Gurus
    I am getting error in using the date repository variable in Filter expression. I am using the below formula
    filter( Fact.calls USING  "Dim Time"."Fiscal Month End Date" = VALUEOF("month_start") )
    I am getting below error
    Formula syntax is invalid.
    [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 22024] A comparison is being carried out between non-compatible types. (HY000)
    SQL Issued: SELECT filter( fact.Calls using "Dim Time"."Fiscal Month End Date" =VALUEOF("month_start")) FROM "Call Data"
    Then i tryed the below format i am getting still the error
    filter( Fact.calls USING  "Dim Time"."Fiscal Month End Date" = DATE'(VALUEOF("month_start"))' )
    Formula syntax is invalid.
    [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 46047] Datetime value (VALUEOF("month_start")) from (VALUEOF("month_start")) does not match the specified format. (HY000)
    SQL Issued: SELECT filter( Fact.Calls using "Dim Time"."Fiscal Month End Date" =DATE'(VALUEOF("month_start"))') FROM "Call Data"
    Please let me know what i am missing or what is the correct syntax for fitler using the date repository variable.
    Thanks in advance
    Regards
    @li

    Hi @li,
    Syntax-1 is fine it will work,What kind of Variable is it?
    Static or Dynamic
    Thanks,

  • Unable to read shared variable in signal express

    Dear all,
    I am trying to read a shared variable with data type 'Array of Double Waveform' and the signal express gives a network variable error stating
    "The data type of specified shared variable xxxxxx is not supported".
    could any one explain why is this not supported or suggest a work around.
    Munir.
    Attachments:
    Untitled-1.jpg ‏66 KB

    Hi Munir,
    the datatype you want to use is not supported in Signal Express. So if you choose this datatype you always get this error massage. As a work around I can recomment you to take the Double Waveform datatype this is supported, create a shared variable for each array element (waveform) and read this variable in Signal Express. This should help you out.
    If you got any questions feel free to ask me.
    Regards
    TomBaum

Maybe you are looking for

  • Schedule Manager - List of Activities, please help

    Hello Experts, could you pleased help me, as to what all activities could be covered under process Schedule Manager in FICO.

  • Substitution rule does not work in SAP CRM

    Hi, In our client, we have work flow set up for substitutions. Manager A has specified B as his substitute for approving work flow items during his absence. I checked the table T77S0, WFLOW AUTOF is set to 'X'. I checked the table HRUS_D2, here the e

  • Good zoom lens for 60d

    60D Solved! Go to Solution.

  • Suffix Tree Disk Based

    I am doing a senior project with the topic of Genomic Code Searching. I've already done the java code for building suffix tree and also can be used for searching from the created tree with memory based version. Now I have a problem with the disk base

  • My iPhone 3GS self edits SOME contacts...

    hi guys to make my life easy i write down my contact's names in my iphone in the first name case in bold, upper case - it's SO MUCH easier to read or when outside in broad day light, no need to put on my reading glasses... however the phone every so