t:dataTable does it need the value attribute?

In this Post: http://forum.java.sun.com/thread.jspa?forumID=427&threadID=679591
..."jsweetland" writes this snippet:
<h:dataTable var="item" value="#{myBean.items}" border="1">
   <h:column>
      <f:facet name="header">
         <f:verbatim>Name</f:verbatim>
      </f:facet>
      <h:outputText value="#{item.name}"/>
   </h:column>
   <h:column>
      <f:facet name="header">
         <f:verbatim>Description</f:verbatim>
      </f:facet>
      <h:outputText value="#{item.description}"/>
   </h:column>
</h:dataTable>my question is why do we need another bean for the dataTable tag ---
<h:dataTable var="item" value="#{myBean.items}" .....>
Can't we directly create list items and use them as values inside the column tag? in other words in our example above can we make do with only the "item" bean and get rid of the "myBean" ?

Hello,
I don't see your point, I only see one bean, "myBean", where do you see "antother bean"? How do you want to iterate over items, rows in the dataTable? Where do you get information about current row from in actions?
Regards,
Thorsten

Similar Messages

  • Assigning a String Value to the value attribute of html:file

    Hi,
    we facing a problem while assigning a value to the VALUE attribute of file tag
    <html:file property="fileupload" size='25' value="sample.xls" onchange="callsheet()" />
    can anyone help me out plzzz,

    Two points -
    1) Java is not Javascript or HTML; you would do better to find a more appropriate forum.
    2) When you take this to a better forum, you need to describe the problem.

  • About passing the values attributes of UI components

    Hi,
    I have a question related to passing the values attributes of UI components from JSF to a baking bean.
    Assume I have inputText and I need to pass its value to the data model via an application module. So, this will be done as follows:
    <h:inputText value= "#{bindings.MyValue.inputValue}";
    I need also to pass this value to a managed bean. Therefore I used EL class prepared by Steve Muench available at:
    http://radio.weblogs.com/0118231/stories/2006/12/18/sourceForMyFavoriteElHelperClass.html
    So, in the JSF page will be as follows:
    <h:inputText value="#{myBean.myValue}";
    In managed bean:
    String myValue;
    public String get MyValue () {
    return EL.getAsString("#{bindings.MyValue.inputValue }");
    public void set MyValue t(String value) {
    EL.set("#{bindings.MyValue.inputValue }",value);
    Then when I want to use myVlaue in the managed bean just I use this line:
    myVlaue = get MyValue ();
    I tried to use the same steps to pass the value of selectOneMenu but I always get errors such as cannot be cast to java.lang.String.
    But I achived this by binding the value of selectOneMenu to a HtmlSelectOneMenu attribute in the managed bean as follows:
    In JSF page:
    <h:selectOneMenu value="#{bindings.TaskView1TaskName.inputValue}"
    binding= "#{projectBean.selectOneChoice1}">
    In managed bean:
    private HtmlSelectOneMenu selectOneChoice1;
    public void setSelectOneChoice1(HtmlSelectOneMenu selectOneChoice1) {
    this.selectOneChoice1 = selectOneChoice1;
    public HtmlSelectOneMenu getSelectOneChoice1() {
    return selectOneChoice1;
    Then I can used the selectOneChoice1 value as follows :
    somenu= getSelectOneChoice1();
    somenuValue = (Integer)somenu.getValue();
    task= taskName(somenuValue);
    this works with me. Now what is the different between this way and using EL class
    And how can I use EL class to pass the value of selectOneMenu to the managed bean
    Thank you
    Waheed

    they are look like:
    <list id="TaskView1TaskName" IterBinding="TaskView1Iterator"
    ListOperMode="0" StaticList="true">
    <AttrNames>
    <Item Value="TaskName"/>
    </AttrNames>
    <ValueList>
    <Item Value="value1"/>
    <Item Value="value2"/>
    <Item Value="value3"/>
    </ValueList>
    </list>
    and TaskName is String

  • I am looking for a english to spanish voice translation app that does not need the internet.

    I am looking for a english to spanish voice translation app that does not need the internet. All the ones I find need the internet which have no value in a rural area. Google makes one for the Android but I need it for the Iphone4s. Thanks Steve

    See How to call Adobe Acrobat 9 APIs to OCR the PDFs through .NET reply 4.

  • In a purchase order for 3 GR's Quantity does not equal the value

    Hi,
    I have found the difference in one purchase order, there have been 3 GRs where the Qty does not equal the Value.  How has this happened?
    Any guesses why the difference has come.
    Thanks&regards,
    Veena

    Hi Vishal,
    In po history for agt 3 Gr's  Quantity does not equal the values. I hope the difference is Movement types. But exactly where to check this movements i am not getting.
    Can you tell me this which T.code.
    Tx,

  • ME23n , Does not shows the values correctly in print preview

    Hi,
    When viewing a PO using ME23n , it does not shows the values correctly in the print preview.
    For example;
    This is the vendor & its address.  (check attached image img1.jpg)
    ZERANDIB BUSINESS APPLIANCES
    Number-122/A
    PO BOX 41,112,REID AVENUE
    COLOMBO-04
    When displaying the print preview, it shows only some parts of the above address
    Shows only; (check attached image img2.jpg)
    ZERANDIB BUSINESS APPLIANCES
    PO BOX 41,112,REID AVENUE
    These values are getting from a table called LFA1. I have checked that table & in that table all the values exists correctly.
    I have noted issue is with, having only a single word. (If address or name having only a single word, that is without spaces, it will not going to show in the print preview) -
    In the above example, it is not showing Number-122/A and  COLOMBO-04 (Its a single word. No spaces there)
    If its like --> Number - 122/A   &  COLOMBO - 04 ,  then it will display in the print preview correctly (where there are spaces after - mark)
    check img3.jpg
    If its having more than one word, then it will display correctly in the print preview.  As below;
    ZERANDIB BUSINESS APPLIANCES
    Number - 122/A
    PO BOX 41,112,REID AVENUE
    COLOMBO - 04
    If its 2 or more words, it shows correctly.
    If its 1 word, then its not showing!
    Why it is happening like that? Any ideas how to resolve this issue?
    regards.
    zerandib

    It turns out that this problem went away after the program crashed.  Everything seems to be working well now.

  • The report does not accept the value for apps.fnd_profile.value('USER_ID')

    Hi,
    I followed the below note and added a report to my SSHR menu.
    How To Add A Report To A 11i Self Service Menu [ID 334847.1]
    In my report , I have a condition in the query
    and a.created_by =apps.fnd_profile.value('USER_ID')
    When the report is submitted as a request , it works fine., however the same report when called from the self service page does not accept any value for apps.fnd_profile.value('USER_ID') .
    Is there a workaround to handle this problem.
    regards

    hi,
    I had already tried the option apps.fnd_global.USER_ID too.
    However it does not accept the value for apps.fnd_global.USER_ID.
    We want to call the reports in SSHR using oaf and at the same time the records that are pending for approval created by the employee should only be visible.
    regards
    Maya

  • Hi, I have quick question about use of USEBEAN tag in SP2. When I specify a scope of SESSION for the java bean, it does not keep the values that I set for variable in the bean persistent.Thanks,Sonny

     

    Make sure that your bean is implementing the serializable interface and that
    you are accessing the bean from the session with the same name.
    Bryan
    "Sandeep Suri" <[email protected]> wrote in message
    news:[email protected]..
    Hi, I have quick question about use of USEBEAN tag in SP2. When I
    specify a scope of SESSION for the java bean, it does not keep the
    values that I set for variable in the bean persistent.Thanks,Sonny
    Try our New Web Based Forum at http://softwareforum.sun.com
    Includes Access to our Product Knowledge Base!

  • LOV does not return the value (2)

    PPR in general does not work correctly if invalid HTML is generated. One example of an invalid HTML is having an opening <TD> tag immediately following another opening <TD> tag.
    After checking everything else, if LOV still does not return the value, test whether it's not a problem with the invalid HTML by placing the messageLovInput outside of the complicated layout nestings you may have. If it works outside of the layout nestings, look for the possible problems in the layout nestings.

    Hi RamKumar,
    Thanks for your reply.. I have already done that but no luck :(
    Regards,
    Hemanth J

  • GR  Qty value does not equal the value

    Hi,
    In PO,there have been 4 GRs where the Qty does not equal the Value.  How has this happened? 
    Could you please suggest me why the difference has come.
    Thanks in advance,
    Cheers,
    Veena

    Hi,
    Yes.you are right.My suggestion does not work here.
    Mr.Adam has given the perfect solution.
    But the problem is the limitations on availability to
    define Before aggregation as the aggregation property
    for CKF,even in Version older than 7.
    So try to implement the solution given by Mr.Adam with
    reference to version7 in your query even though your
    version is less than version 7.
    With rgds,
    Anil Kumar Sharma .P

  • Can not set the value attribute of a ContextNode

    Hi,
       I am trying to set the value Attribute in a value Node it is a simple way but it gives me java.lang.NullPointerException error on the given line:
    wdcontext.current(ValueNodeName)Element.set(AttributeValueName)
    Thanks in advance
    Best Regards
    Beata

    Like all above suggested do this:
    wdContext.node(ValueNodeName).add(
               wdContext.node(ValueNodeName).create(ValueNode)Element()
    wdContext.node(ValueNodeName).moveLast();
    wdContext.current(ValueNode)Element().setATTR(..);

  • Imqobjmgr does not recognize the value of java.naming.provider.url property

    On Windows, I am running imqobjmgr 4.3
    when I run imqobjmgr -i list.properties, I am getting the following error
    Error [A3052]: imqobjmgr does not recognize the value of java.naming.provider.url property.
    Why is that?
    classpath
    C:\Sun\SDK\imq\lib\jms.jar;C:\Sun\SDK\imq\lib\imq.jar;C:\Sun\SDK\imq\lib\fsconte
    xt.jar;.
    contents of list.properties
    # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    # Copyright 2000-2008 Sun Microsystems, Inc. All rights reserved.
    # The contents of this file are subject to the terms of either the GNU
    # General Public License Version 2 only ("GPL") or the Common Development
    # and Distribution License ("CDDL") (collectively, the "License"). You may
    # not use this file except in compliance with the License. You can obtain
    # a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
    # or mq/legal/LICENSE.txt. See the License for the specific language
    # governing permissions and limitations under the License.
    # When distributing the software, include this License Header Notice in each
    # file and include the License file at mq/legal/LICENSE.txt. Sun designates
    # this particular file as subject to the "Classpath" exception as provided by
    # Sun in the GPL Version 2 section of the License file that accompanied this
    # code. If applicable, add the following below the License Header, with the
    # fields enclosed by brackets [] replaced by your own identifying information:
    # "Portions Copyrighted [year] [name of copyright owner]"
    # Contributor(s):
    # If you wish your version of this file to be governed by only the CDDL or
    # only the GPL Version 2, indicate your decision by adding "[Contributor]
    # elects to include this software in this distribution under the [CDDL or GPL
    # Version 2] license." If you don't indicate a single choice of license, a
    # recipient has the option to distribute your version of this file under
    # either the CDDL, the GPL Version 2 or to extend the choice of license to
    # its licensees as provided above. However, if you add GPL Version 2 code
    # and therefore, elected the GPL Version 2 license, then the option applies
    # only if the new code is made subject to such option by the copyright holder.
    # @(#)list.properties     1.11 07/02/07
    # This property file will list administered objects
    # Version of command file
    # NOTE: This is not the version of the Sun Java(tm) System Message Queue product
    version=2.0
    cmdtype=list
    # If you want to only list a particular type of administered
    # object, uncomment the following line and specify the type.
    # Acceptable values for the type property are: t, q, tf, and qf,
    # where t = topic, q = queue, tf = topic connection factory, and
    # qf = queue connection factory.
    #obj.type=
    # To use the LDAP service provider implementation from
    # Sun Microsystems, uncomment the following two property lines
    # and set the url property correctly.
    objstore.attrs.java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory
    objstore.attrs.java.naming.provider.url=ldap://localhost:389/ou=imqobjmgr,o=sun.com
    # To use the File System service provider implementation from
    # Sun Microsystems on Solaris, uncomment the following two
    # property lines and set the url property correctly.
    # *** Note that the url syntax here is platform specific. ***
    #objstore.attrs.java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory
    #objstore.attrs.java.naming.provider.url=file:///home/foo/imq_admin_objects
    # To use the File System service provider implementation from
    # Sun Microsystems on Windows, uncomment the following two
    # property lines and set the url property correctly.
    # *** Note that the url syntax here is platform specific. ***
    #objstore.attrs.java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory
    #objstore.attrs.java.naming.provider.url=file:///C:/imq_admin_objects
    #objstore.attrs.java.naming.security.authentication=
    #objstore.attrs.java.naming.security.principal=
    #objstore.attrs.java.naming.security.credentials=

    I see you're using Sun Java System Message Queue. There's a forum specific to that product over at [http://forums.sun.com/forum.jspa?forumID=711&start=0|http://forums.sun.com/forum.jspa?forumID=711&start=0] . You could try asking there.
    Nigel

  • HT204150 I have synced an iPhone 4S with iCloud - I now have a 5C to replace it. What happens to my data when I retire the 4S - does it need the original device to save my data?

    I have synced an iPhone 4S with iCloud - I now have a 5C to replace it. What happens to my data when I retire the 4S - does it need the original device to save my data?

    Welcome to the Apple community.
    Once you have restored your new phone from the backup of your old phone and ensured that everything is working correctly, you should first turn off "find my phone" on the old phone and then erase it, before you get rid of it.

  • Does iPhone 6 Plus use standard 1Amp charger or does it need the 2.1Amp charger?

    Does the iPhone 6 Plus use a standard 1Amp iPhone charger or does it need the 2.1Amp charger?

    Bump, I really need help :/

  • For my ipad to recieve imessages does it need the same ID as my Itunes and facetime?

    for my ipad to recieve imessages does it need the same ID as my Itunes and facetime

    See:
    http://support.apple.com/kb/HT3529
    This is the iPhone forum, by the way.
    Regards.

Maybe you are looking for