[JSF 1.2] problem with c:forEach inside h:panelGrid

I have a list of beans that I want to display in table of 3 columns, and let the rows increase according to the size of my list.
The following code works as expected:
<h:panelGrid columns="3">
     <c:forEach items="#{mylist}" var="row">
          <h:outputText value="#{row.name}" />
     </c:forEach>
</h:panelGrid>This also works:
<h:panelGrid columns="3">
     <c:forEach items="#{mylist}" var="row">
          <h:panelGroup>
     Name: <h:outputText value="#{row.name}" />
          </h:panelGroup>
     </c:forEach>
</h:panelGrid>But when I put two outputText components inside the panelGroup I get duplicate ID in view error.
Any suggestions?

I have also seen something similar. Oddly enough, you seem to be able to explicitly specify an id, so something like this usually works:
<h:panelGrid columns="3">
    <c:forEach items="#{mylist}" var="row" varStatus="rs">
        <h:panelGroup>
            <h:outputText id="alabel_${rs.index}" value="Name:" />
            <h:outputText id="avalue_${rs.index}" value="#{row.name}" />
        </h:panelGroup>
    </c:forEach>
</h:panelGrid>However, I agree that this should not be needed if everything was working properly.
Another case I have found that seems to be a bug is a JSF fragment like this:
<h:form id="testForm">
  <h:panelGrid columns="3" columnClasses="rightColumnHeader, leftColumnHeader">
      <f:facet name="header">
     <h:outputFormat value="#{Bundle.listTest_title}" />
      </f:facet>
      <h:outputText value="Index$" />
      <h:outputText value="Index#" />
      <h:outputText value="Value" />
      <c:forEach items="#{testlist}" var="it" varStatus="is">
     <c:out value="${is.index}." />
     <h:outputText value="#{is.index}." />
     <h:outputText value="#{it}" />
      </c:forEach>
  </h:panelGrid>
</h:form>Now the c:out tag manages to output is.index, but the h:outputText tag doesn't. Further testing shows that the varStatus variable is not available at all in #{} expressions, but only in ${} expressions, whereas the var variable is available in both. Seems like a bug, but maybe there is some reason for this behaviour??

Similar Messages

  • Problem with unix "foreach" command

    Hi,
    I am facing a problem with unix command "foreach". I trying to process files using unix foreach command. When running the script with 500 or 1000 files. It is running fine. But when I am trying to the script with 2000+ files. Its throwing an error "Arguments too long".
    below is the syntax I am using in the script:
    foreach name (*)
    end
    Could anybody help me on this issue.
    Thanks in Advance.
    Manasa.

    UNIX/Linux systems expand wildcards onto the command line before invoking the
    individual commands. In effect, the shell rewrites the command line you give
    substituting the wildcard expansion. There is a limit to how long this command
    line can get.
    For example, suppose you have two files ("foo" and "bar") in your directory.
    The line:
    foreach name (*)
      echo $name
    endgets rewritten to:
    foreach name (foo bar)
      echo $name
    endand then the shell starts interpreting your script. So if you have many, many
    files, the rewritten line becomes:
    foreach name (f1 f2 f3 ... f10927)
      echo $name
    endso chances are the "foreach" line simply gets too long. To avoid problems do
    it this way; it avoids any problems based on how many files you have:
    ls | while read name
    do
      echo $name
    doneThis way the shell never exceeds its line length limitations because the
    wildcard is never expanded.
    Cheers

  • Problem with building array inside a case statement

    I have a problem with my build array.
    Iam trying to construct a build array when ever I see a new element in my parent array during run time.
    Using shift registers, search array and If- case structure, inside a while loop. Iam implementing this logic (I dont want to use Event structure).
    Iam able to achieve most part of it, but have a problem with the first element. Except the first element of my parrent array, every thing is appending in to the build array. Can any one look at my vi and suggest me what Iam doing wrong here.
    Thank you
    Attachments:
    debug.vi ‏12 KB

    I think you need to replace the tunnels (carrying the array) in the for loop with a shift register.
    Lynn

  • Problem with EL (forEach) in Facelets + JSF 1.2

    I am trying to upgrade my application from JSF 1.1 to JSF 1.2. However, I have run into a problem that I can't quite grasp.
    I have a backing bean with the following method
    public List<String> getFoos() {
    return foos;
    With JSF 1.1 + Facelets the following EL worked fine
         <c:forEach var="foo"
              items="${page.foos}">
              #{foo}
         </c:forEach>
    However, once I upgraded to JSF 1.2 suddenly this EL resolves to nothing. In fact, my getFoos() method on my backing bean is not even called. I have googled around but I cannot seem to find what changed in JSF 1.2 that would break this.
    If anyone has any ideas, your help is greatly appreciated.
    Thanks,
    Randy

    I have had problems using Java v8 with CUC. I had to go back to Java v7 to use the Media Master bar. Works fine now.
    If that doesn't work you could set up a Greetings Administrator call handler to record the greetings. You could even set up a hidden option to press * (or any digit) from your existing call handler to transfer to the Greetings Administrator call handler. Just need to set an owner for the call handler you want to record the greetings for (Edit/Call Handler Owner), then call the original call handler, press *, put in the username (VM extension), VM password and extension of the call handler you want to record.

  • Problem with Input help inside an adobe interactive forms

    Hi Experts,
    I'm currently implementing a Webdynpro ABAP application containing a Interactive forms.
    I'm using Adobe Live Cycle Designer 8.0, Acrobat reader 9.2, Internet Explorer 7.0
    My problem is that when I click on the "input help" button inside the adobe form, he automatically refresh all the forms UI element with their initial values. Is-it a refresh event included when we pressed the "Input help" button or an other event? How Can I deactivate that action, event?
    Because since he automatically refresh my form data I loose the context current values.
    Thanks in advance,
    Louis

    P740741 wrote:>
    > Hi Norbert,
    >
    > Thanks for reply, yes I use ZCI and I inserted the Webdynpro script  through Utilities.
    >
    > Best Regards,
    > Louis
    strange, but you could compare the version of the zci scripting
    in your form in the hierarchy tab there are variables and the ContainerFoundation_JS script --> the first line
    // DO NOT MODIFY THE CODE BEYOND THIS POINT - xxxxxxxxxxxxxxxxxxxxxxxxxxx - ContainerFoundation_JS gives you the requested information about the scripting version...have a look at this version...
    norbert
    perhaps this note helps:
    Note 999998 - Analyzing errors with Adobe Integration of Web Dynpro ABAP
    --> for debugging!
    A client debug function is available as of SAP NetWeaver Release 7.00 Support Package 19 (or after you implement Note 1287114) and for all Enhancement Packages. Activate this client debug function using the URL parameter "sap-wd-clientDebug=X" (attach it to the URL using "&"). You can then activate the client trace using the key combination <CTRL><ALT><SHIFT>T (move the focus to a Web Dynpro UI element, for example, to an InputField, do NOT move the focus to Adobe Reader). The system opens a new browser window with the trace output. The trace may contain an error entry ("Network Error", and so on). The URL also activates the Adobe document services (ADS) trace. The trace outputs of the ADS are copied to the generated PDF document as an attachment. Open the file "Error.pdf" of the ADS trace: Form errors (for example, script errors) are listed there.
    Edited by: Norbert Prager on Oct 24, 2009 7:31 PM

  • JSF 1.1 - problem with overriding default messages with UTF8 ones

    Hi there,
    I'm stuck with JSF 1.1 for now (creating application that is to run on JBoss 4.0.x) and I've encountered a problem... My web application uses UTF8 encoding - so that's also encoding I need in my message bundle. I've created one - and here goes a problem. I need to put Polish special characters into a properties file of a bundle - so I do it with UTF escape notation:
    javax.faces.component.UIInput.REQUIRED=Warto\u009C\u00E6 dla pola {0} jest wymagana
    some.custom.message.CLOSED=zamkni\u0119taThe thing is - while custom messages are working properly, overriden javax.faces.component.UIInput.REQUIRED message is rendered on a page as four "strange" characters, suggesting that it was first interpreted as UTF, then parsed as some kind of an ASCII (ISO) encoding and then back to an UTF8 page...
    How to fix this?
    TIA,
    Wojtek

    IDE fooled me - it was smarter then I expected and properties editor was showing already decoded values, not raw content of file. It's working properly now

  • Problem with chinese fileNames inside a zipfile

    Hi all
    I have a really strange problem . I needed to create a zip file(English name) and add a chinese file to that Zip . I had done this using java.uti.zip and in the output zip file i am seeing a totally different chiense name than what i had expected . My code looks like this
    String fileName = "������";(Chinese fileName)
    File zipFile = new File("abc.txt");
    ZipOutputStream zipOutStrm = null;
    BufferedInputStream in = null;
    try
    int length = 0;
    byte[] buffer = new byte[2048];
    zipOutStrm = new ZipOutputStream(new FileOutputStream("abc.zip"));
    ZipEntry zipe = new ZipEntry(fileName);
    zipOutStrm.putNextEntry(zipe);
    in = new BufferedInputStream(new FileInputStream(zipFile));
    length = in.read(buffer);
    while(length != -1)
    zipOutStrm.write(buffer, 0, length);
    length = in.read(buffer);
    catch(FileNotFoundException e)
    e.printStackTrace();
    catch(IOException e)
    e.printStackTrace();
    finally
    try
    in.close();
    zipOutStrm.closeEntry();
    zipOutStrm.close();
    catch(Exception e)
    //do nothing ;
    Later i found out from the sun site that there is some encoding issues with the way java does the zip and winZip encoding .
    Can any one let me know how to come out of this ??

    The file name encoding issue with ZIP is basically: The encoding of file names in ZIP-files is not specified and when non-ASCII file names came along each and every zip-utility solved it in a different way, some did not solve it at all, some store it in ISO-8859-1 (= no chinese), some store it in UTF-8 (I think Java does this), others might have other strategies ...
    So if there is a way to not use non-ASCII characters in your zip-files you greatly enhance the portability of your programm.

  • Strange problem with audio (link inside)

    Hello Community, please help me!
    So I started this project where I film everything I do in the year 2014 and stuff.
    Well, this week I began with doing the work in AE, so far so good.
    I'm not finished yet, but I just wanted to try to render and upload it, for testing reasons. (with bad quality though) here's the link: https://vimeo.com/113597439
    So... apparently there's every 11 seconds this clacking sound, I don't know how to get rid of it, it looks like it's a problem I have with AE rendering, because I tried to screencapture it and then convert it with the same software as I did with the AE outcome, it was fine. (but I obviously can't get a HD outcome by screencapturing my RAM-Preview). So it's not my converting tool!
    And I don't know what it is and additionally, the sound is getting delayed, I'm not sure if it's because of the same reason the clacking sound is, because in my RAM-Preview everything is perfectly fine.
    I'm using lossless with Audio checked on.
    I would be super thankful if anybody could help!
    Thanks in advance.

    So I'm not hearing anything funky on my phone when watching the video. I do have one question though, this looks like a bunch of clips strung together with nothing special added to the clips so I'm wondering why you are using AE to EDIT when AE is a compositing and motion graphics application specifically designed to create short shots or sequences. I would do something like this in Premiere Pro. It will take you about 1/10 the time and it will render much faster.

  • Problem with resultset.next inside 817 DB

    I have a java class running inside 817 database.
    I have a prepared statement that gets some records and loops through them and writes a record into another table.
    The SQL statement should produce 3000 records but only 566 get logged in the loop.
    I have looked at/tried everything. NOTHING seems wrong but jus tI dont get alll the records. The datatset is not truncated, records are missing ramdomly throught, ie recs 1-4 are OK then 5,6,7 are missing etc..
    Anyone know what the prb might be, its really weird and driving me nuts
    Rob
    null

    thank you for the pointers.
    For the RS is empty I've done a check with
    if(selectRs.next()!=null), even though
    next() is never suppose to be null, Yeah, you needn't bother with that. It's never supposed to be null, and if it is, there's a bug in the executeQuery method.
    ?so that confuses
    me. I've also put Sys.outs before & after the if
    statement & found it never prints out the System.out
    after the if(rs.next()). & I've stepped
    through with my WAS Debugger as a last restort to see
    what's going on. :$ So you're saying you put a print statement as the first statement right inside if (rs.next()) and it didn't get executed?
    I did do as you suggested with the
    count(*) & it did return a count of 1.You did that in your Java code? Changing only what you're selecting from those couple of columns to count(*), leaving the from and where alone?
    I am catching the SQLException for the try but
    nothing for the
    a_ruleSyntax.equals(current_ruleSyntax).Not sure what you're saying here, and not sure what your catch block looks like.
    I have put a System.out for if the equals returns
    false.
    Do you have any other ideas?Nope, sorry.
    If your answers to my questions above are "yes, that's what I'm doing," then I'm out of ideas, unless there's some exception that you're smothering.

  • Problem with Accordion Widget INSIDE Sliding Panel Widget

    Hello,
    perhaps I should not do this, but I nested an Accordion
    Widget inside a Sliding Panels Widget:
    - There are eight Panels.
    - Each one contains a complete Accordion.
    The sliding works fine, and so does the Accordion animation,
    but the text inside the Accordion Panel Tabs won't move along, when
    a tab is activated. I need to hover the mouse over the accordion to
    make the panel texts appear again.
    Of course, when I un-nest the widgets and move the Accordion
    widget out of the Sliding Panel widget, everything is fine.
    My question is:
    - am I demanding "too much" by nesting the widgets?
    - or should this basically work, and the problem arises from
    rivalling scripts?
    Here is a link:
    Nested
    widgets Test
    The horizontal top menu will activate the sliding panels, but
    as of now only the leftmost menu item contains an Accordion (I know
    the CSS does not look nice yet).
    Is there anything I can optimise to get this to work?
    Thank you so much,
    Greetings, Jensen
    Edit: The problem does NOT occur in Firefox, but in
    Safari.

    Hi John,
    That is the expected behavior if the "Overlap items below" is unchecked. Please refer to the following link http://screencasteu.worldsecuresystems.com/aish/2013-08-21_1947.png. If you don't want the page to wiggle up and down, please check the box shown in the screenshot.
    Regards,
    Aish

  • Powershell 4.0: Problem with error handling inside Eventhandlers - Powershell has stopped working

    Hallo!
    Please see the attached sample code. This code simply show a small WPF-Dialog.
    Test 1 (showing the problem)
    Simply run the program. You will see Powershell crashing "Powershell has stopped working".
    The cause of this is the devision by 0 inside the Eventhandler.
    We would normally expect, that the exception should be handled by the trap.
    Test 2 (showing normal operation)
    Simply remove the comment in line 28 ($i=1/0).
    This activates an exception outside the Eventhandler. Now the Trap will be executed normally.
    --> The exception can be handled by the Powershell Devloper.
    Can anybody help? Why does the Error management via Trap not work inside Eventhandlers?
    Thanks for some assistance and ideas!
    Regards
    Heike
    cls
    Set-StrictMode -Version 4.0
    $ErrorActionPreference = "stop"
    Add-Type -Assemblyname PresentationFramework
    # -- Eventhandler - will be fired during form load -----------------------------------------------------
    $FormLoaded = {
    Write-Host "EventHandler is running..."
    # Problem:
    # All exceptions will crash Powershell.
    # We would normally expect that the Global Trap will be executed!
    # This problem occurs inside of Eventhandlers only!
    # TEST 1 --> Create an Exception (Division by 0) --> Powershell crashes: "Powershell_ISE has stopped working"
    $i=1/0
    # -- End of Eventhandler----------------------------------------------------------------------------------
    # -- Start of Demo-Programm ------------------------------------
    Write-Host "Start Demo"
    # -- TEST 2 ---
    # Write-Host "Test 2: Testing Global Trap"
    # Create an Exception (Division by 0) --> Powershell does not crash --> Global Trap will be executed --> OK
    # $i=1/0
    # XAML-Code for WPF-Dialog
    [xml]$xaml = @"
    <Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Test - " Height="370" Width="657" ResizeMode="NoResize" WindowStyle="ThreeDBorderWindow" WindowStartupLocation="CenterScreen" ShowInTaskbar="False" >
    <Grid Margin="0,0,0,-4">
    <Label Name="CustomerName" Content="Hello World" HorizontalAlignment="Left" Margin="10,2,0,0" VerticalAlignment="Top" Width="596"/>
    </Grid>
    </Window>
    $Form1=[Windows.Markup.XamlReader]::Load((New-Object System.Xml.XmlNodeReader $xaml)) # Load form
    Write-Host "Register Event"
    $Form1.Add_Loaded($FormLoaded)
    Write-Host "Starting ShowDialog"
    $Form1.ShowDialog() > $null
    Write-Host "End of program"
    # Global Trap - all exceptions should be handled here
    trap{
    Write-host "Global Trap is running..."
    Write-host "End of trap - program will be stopped"

    It works fine if you don't try to execute the code while loading and if you use a better exception handling method.
    Add-Type -Assemblyname PresentationFramework
    [xml]$xaml=@'
    <Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Test - " Height="370" Width="657" ResizeMode="NoResize" WindowStyle="ThreeDBorderWindow" WindowStartupLocation="CenterScreen" ShowInTaskbar="False" >
    <Grid Margin="0,0,0,-4">
    <Label Name="CustomerName" Content="Hello World" HorizontalAlignment="Left" Margin="10,2,0,0" VerticalAlignment="Top" Width="596"/>
    </Grid>
    </Window>
    $Form1=[Windows.Markup.XamlReader]::Load((New-Object System.Xml.XmlNodeReader $xaml)) # Load form
    $Form1.Add_Loaded({
    Write-Host "EventHandler is running..."
    Try{
    $i=1/0
    Catch{
    Write-Host "$_"
    $Form1.ShowDialog()
    ¯\_(ツ)_/¯

  • Problem with Spry Panels inside a Table.

    This might be in the wrong section, but I hope someone knows what i'm doing wrong.
    I'm putting together a simple html website with a spry tabbed panel inside a table. I can insert the panel, switch between the different tabs to insert content, but when I preview the page in IE or Firefox all the content is in the first tabbe panel. I can hover over the other tabs but nothing happens when I click on them.
    I am slightly new to dreamweaver so it might just be something i'm overlooking.

    Hi Vinay,
    Check Valery`s great blogs:
    /people/valery.silaev/blog/2005/06/13/master-of-columns-part-i
    /people/valery.silaev/blog/2005/06/20/master-of-columns-part-ii
    For your case this piece of code could be usefull
    private IPrivateTreeTableCV.IEntriesElement currentEntry()
      try
        IWDNodeElement el;
        for
          el = wdContext.nodeEntries().getTreeSelection();
          !( el == null || el instanceof IPrivateTreeTableCV.IEntriesElement);
          el = el.node().getParentElement()
        return (IPrivateTreeTableCV.IEntriesElement)el;
      catch (final WDContextException ex)
        return null;
    Best regards, Maksim Rashchynski.

  • Problems with Runtime.exec inside OC4J in OAS!!! help!!

    Hi all,
    I have a method on my webapplication and the same call a script .cmd on windows and a .sh on unix using Runtime.exec command, inside this script have a call to a java program ie.
    java JMSAdmin < jcajms.txt
    OK, this is fine in OC4J Standalone 10.1.3 in windows and linux but in OAS 10.1.3 the same not run and not throw any error. Its is a BUG ?? limitation ?? OAS ignore a call to another java ??
    please help.
    Tanks

    Normally, you must prepend the command with a call to the command shell (eg /bin/sh).
    But I suspect that this call isn't allowed due to Java EE specification restrictions.

  • Tomahawk for jsf 1.2 problem with customizing treetable component

    hi,
    i've tried many times bu i've got no clue how to set custom icons in the tree. what i want to achieve is to display the server's local file system. however this component doesn't allow to explicit specify what the node type is (a directory or a file). as a result when it finds an empty directory entry, no icon is displayed. i googled a bit and i guess the project's documentation is not sufficient. any help appreciated. ofc if someone knows a better method (or a framework) to do the job, please let me know. thanks
    cheers

    r035198x wrote:
    You could store the value in the session and remove it when you need to use it.Thanks, r035198x. I tried that before and users from other Java forums suggest that I shouldn't do it this way as I am adding more codes than necessary to pass technically a value from one bean to another. Hence, I decided to follow their advice and went and created a generic bean that can be referenced by other beans for pages calculation. Some users also suggest using Dependency Injection (available for JSF 1.2) to try to accomplish the result I want. I've also read about this method in JSF 1.2 spec - but without much example, I'm pretty much in the dark as to how this work. Unfortunately, I've only been on JSF for the last 4 weeks so I'm still a newbie - please excuse any "dumb" questions I have asked on this forum so far...
    What I currently has working for me is moving the method to calculate the pages from mybean1 to mybean2. This means all I have to do now for the other beans (11 remaining) is passed a few parameters to mybean2's method that calculate pages.
    Edited by: icepax on 12/11/2009 18:27

  • JSF 1.2 - Problem with passing page count to bean to create list

    I have this select option:
    <f:verbatim>Pages: </f:verbatim>
    <h:selectOneMenu id="selectPage" value="#{pageList.selectedPage}">
             <f:selectItems value="#{pageList.selectPages}" />
    </h:selectOneMenu>And the backing bean (called mybean2) for this is:
    private int pages;
    public void getPages(int Pages)
         this.pages = Pages;
    // getter methods
    public List<SelectItem> getSelectPages()
         selectPages = new ArrayList<SelectItem>();
            pages++;
            for (int i = 1; i > pages; i++) {
                 selectPages.add(new SelectItem(Integer.toString(i), Integer.toString(i)));
             return selectPages;
    public String getSelectedPage()
             return selectedPage;
    // setter methods
    public void setSelectPages(List<SelectItem> selectPages) {
            this.selectPages = selectPages;
    public void setSelectedPage(String selectedPage) {
             this.selectedPage = selectedPage;
    }The getPages method above gets the page count from mybean1.submit method. Thus, for example, when the submit method returns 30, how am I able to pass this value into the getSelectPages so I can dynamically created the number of pages

    r035198x wrote:
    You could store the value in the session and remove it when you need to use it.Thanks, r035198x. I tried that before and users from other Java forums suggest that I shouldn't do it this way as I am adding more codes than necessary to pass technically a value from one bean to another. Hence, I decided to follow their advice and went and created a generic bean that can be referenced by other beans for pages calculation. Some users also suggest using Dependency Injection (available for JSF 1.2) to try to accomplish the result I want. I've also read about this method in JSF 1.2 spec - but without much example, I'm pretty much in the dark as to how this work. Unfortunately, I've only been on JSF for the last 4 weeks so I'm still a newbie - please excuse any "dumb" questions I have asked on this forum so far...
    What I currently has working for me is moving the method to calculate the pages from mybean1 to mybean2. This means all I have to do now for the other beans (11 remaining) is passed a few parameters to mybean2's method that calculate pages.
    Edited by: icepax on 12/11/2009 18:27

Maybe you are looking for