Jsf 2.0 datatable grid

Hi
I would like to display a list in a grid format instead of rows of data. With jsf 1.2, the tag <t:datatable> provided this feature, but that is not compatible with 2.0
Is there any other option?
thanks

Hi,
thank you for answer. Problem is not related with displaying value. If I do it :
<h:dataTable value="#{userBean.list}" var="item">
          <h:column>
               <h:outputText value="#{item}" />
          </h:column>
     </h:dataTable>I get this output :
string: String
list:
Tom
Andy
So everythink seems to be OK ! but .. If I look at tomcat console, I see output:
[INFO] UserBean:26 - getString
[INFO] UserBean:21 - getList
[INFO] UserBean:21 - getList
[INFO] UserBean:21 - getList
And this is my problem...
Any advice ?
Regards,
Slawek

Similar Messages

  • JSF 1.2 DataTable management during view creation

    Hi all, I have a question on how JSF 1.2 manages DataTable exactly. Consider this table (suppose that tableList.persone has 3 items):
    <h:dataTable id="tablePersone" value="#{tableList.persone}" var="item">
    <h:column>
              <f:facet name="header">
              <h:outputText value="STATO" />
              </f:facet>
              <h:inputText value="#{item.stato}" />
         </h:column>
         <h:column>
              <f:facet name="header">
              <h:outputText value="CODICE" />
              </f:facet>
              <h:inputText value="#{item.codice}" />
         </h:column>
    </h:dataTable>
    I read that jsf iterates over the items of the list during the render response phase, in fact, "item" is not available when the view is built.
    Does it means that jsf does not duplicate the content of the table for each item in the list when creating the tree component?
    In the table above, each row has 2 inputText. If jsf does not create a couple of inputText objects for each row, how jsf handles all the 6 request parameters when the form is submitted (in particular during the apply request values phase).
    Thanks a lot,
    Nico

    I could be really mean right now in my answer.
    I did not even have to post anything, i choose to use MyFaces 1.2.1 and scraped JSF 1.2_06 SUN RI out of my projects lib folder.
    Sorry dude that's the reality, the exceptions the SUN RI threw does not help me in trying to work on real life applications.
    You know i have read that Sun RI implementation is probably best out there since work began on the 1.2 spec way before Apache MyFaces started, hence potentially less buggy.
    I picked up the latest code from SUN RI and encountered at least 3 exceptions that are very low level and hard to mitigate.
    While without any JSF pages modifications i plugged in MyFaces 1.2.1-Snapshot and not a single NullPointerException or a failure.
    I just want to reflect here on this situation because i have been always defending SUN and it's work against other packages
    but my situation with upgrading from 1.1 to JSF 1.2 really puts a dent in my conviction
    specially where UI is such a risky business for us developers in the Web industry.
    this Forum probably is taking me longer then if i just logged the issue against RI.
    But my point is that when such frameworks are being developed they should be tested against real large applications under many industry problems.
    I am after getting this point across, because right now i don't care if you these exceptions are being fixed i dumped your packages anyway.
    Now i know MyFaces have their own problems, but at this moment they are not my issues, my project works using their implementation and that's the story .

  • Jsf 2 nested datatable rerender issue

    Hi All,
    I'm struggling with a nested datatable rerender issue, which I can't seem to solve.
    Here's the situation: I have this datatable which iterates over serverinstances. For each serverinstance, I then iterate over it's urls. This all works fine.
    Now I want to add a new url for that serverinstance, so under the datatable, there's an input form.
    When submitted, the url is added to the serverinstance and updated (via backing bean).
    The only problem is, that the (nested) datatable is not rerendered. I can see the update working fine, because the url is added in the database.
    If I do the same thing in a one-level, unnested datatable, it works fine. I suppose the nesting is the problem here.
    Here's the (simplified) code:
              <h:form id="appurlform">
    <h:dataTable var="serverinstance" value="#{_AddUrls.app.sortedServerInstance}" >
    <h:column>
    <h:dataTable var="_appurl" value="#{serverinstance.appUrl}">
    <h:column><h:outputText value="#{_appurl.appurl}"/></h:column>
    </h:dataTable>
    </h:column>
    </h:dataTable>
    </h:form>
    <h:form id="newappurlform" prependId="false">
    <h3><h:outputText value="New Monitored Url"/></h3>
    <table>
    <tr>
    <td>Url: </td>
    <td>
    <h:inputText id="newappurl_url" value="#{_AddUrls.newAppUrl.appurl}"/>
    </td>
    </tr>
    </table>
    <h:commandButton id="submitappurl" value="Add Url"
    onclick="jsf.ajax.request(this, event,
    {execute:'newappurl_url',
    render:'appurlform'}); return false;"
    actionListener="#{_AddUrls.addAppUrl}">
    </h:commandButton>
    </h:form>

    Hi All,
    I'm struggling with a nested datatable rerender issue, which I can't seem to solve.
    Here's the situation: I have this datatable which iterates over serverinstances. For each serverinstance, I then iterate over it's urls. This all works fine.
    Now I want to add a new url for that serverinstance, so under the datatable, there's an input form.
    When submitted, the url is added to the serverinstance and updated (via backing bean).
    The only problem is, that the (nested) datatable is not rerendered. I can see the update working fine, because the url is added in the database.
    If I do the same thing in a one-level, unnested datatable, it works fine. I suppose the nesting is the problem here.
    Here's the (simplified) code:
              <h:form id="appurlform">
    <h:dataTable var="serverinstance" value="#{_AddUrls.app.sortedServerInstance}" >
    <h:column>
    <h:dataTable var="_appurl" value="#{serverinstance.appUrl}">
    <h:column><h:outputText value="#{_appurl.appurl}"/></h:column>
    </h:dataTable>
    </h:column>
    </h:dataTable>
    </h:form>
    <h:form id="newappurlform" prependId="false">
    <h3><h:outputText value="New Monitored Url"/></h3>
    <table>
    <tr>
    <td>Url: </td>
    <td>
    <h:inputText id="newappurl_url" value="#{_AddUrls.newAppUrl.appurl}"/>
    </td>
    </tr>
    </table>
    <h:commandButton id="submitappurl" value="Add Url"
    onclick="jsf.ajax.request(this, event,
    {execute:'newappurl_url',
    render:'appurlform'}); return false;"
    actionListener="#{_AddUrls.addAppUrl}">
    </h:commandButton>
    </h:form>

  • JSF issue in DataTable while rendering in input text

    <tr>
    <td><textarea name="test:0:_id6" cols="25" rows="5">&#8212 test</textarea></td>
    </tr>
    but the value for this textarea is: &#8212 test
    my question is why the value &#8212 test is rendered as &#8212 test.

    Hi Ram,
    Based on the dataset and query you posted, I did a test but it works fine in both SQL Server Management Studio (SSMS) and Query Designer in Business Intelligence Development Studio
    (BIDS). In the Query Designer of BIDS, I got the following result without the additional strings <Expr> and </Expr>
    NoteID
    Comments_Concatenated
    100
    Text 1,Text 2
    101
    Text 3,Text 4
    Since it generates 2 data fields NoteID and Comments_Concatenated, could you please specify them to the Detail Data row of a table to see if the works fine when the report is rendering?
    If it the additional string still exists, please post and screenshot and the version of your Reporting Services.
    Thanks,
    Tony Chain
    Tony Chain [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Datatable wackiness - JSF trying to read a non-existant field from a bean

    I am having a very strange problem in JSF. I currently have one links page with four commandLinks in it, and one JSF page witha datatable in it, and an IBM <hx:pagerDeluxe> in it to page through the data. Each command link fires off a different action, as shown below:
         <h:commandLink action="UM02">
              <h:outputText value="UM02" />
         </h:commandLink>
         <h:commandLink action="UM03">
              <h:outputText value="UM03" />
         </h:commandLink>          ..........etc ........
    My Navigation rules all point to one JSP file, but with a different param appended to the URL:
              <from-view-id>/index.jsp</from-view-id>
              <navigation-case>
                   <from-outcome>UM02</from-outcome>
                   <to-view-id>/jsp/mappings/listViewUM02.jsp?tbl=UPD_MAP_UM02</to-view-id>
              </navigation-case>
              <navigation-case>
                   <from-outcome>UM03</from-outcome>
                   <to-view-id>/jsp/mappings/listViewUM02.jsp?tbl=UPD_MAP_UM03</to-view-id>
              </navigation-case>     So as you can see, I have one JSF file to display a list from any given table name. I also dynamically populate the dataTable through my code, by reading through a list of columns for each table, and creating a "UIColumn":
              while( itr.hasNext() ){
                   String fieldName = (String) itr.next();                                                  
                   ValueBinding vb = FacesContext.getCurrentInstance().getApplication().createValueBinding("#{var." + fieldName + "}");
                   HtmlOutputText header = new HtmlOutputText();               
                   header.setValue(fieldName);               
                   UIColumn col = new UIColumn();
                   UIOutput out = new UIOutput();
                   out.setValueBinding("value", vb);
                   col.setHeader( header );
                   col.getChildren().add(out);               
                   dataTable.getChildren().add(col);               
              }          And that dataTable is shown in the JSF page. So i can go back to the main links page, click on another table name, and it will populate the datatable with the correct columns, data, etc. The problem happens when I go to one table, say UM02, and hit ">" on the pager, to go to the next page, which works, THEN i go back to the links page, and hit "UM03" and the first page displays fine. When I try to go to the next page, I get an error saying that the backing bean UM03Bean does not have field "subProductCd". Basically, values from the old dataTable objects are being used for smoe reason when I page. Not sure why this is happening.
    My datatable is defined like this:
         <h:form id="dataTableForm"><h:dataTable id="dataTable1" border="0" cellpadding="2"
              cellspacing="0" columnClasses="columnClass1"
              headerClass="headerClass" footerClass="footerClass"
              rowClasses="rowClass1, rowClass2, rowClass3"
              styleClass="dataTableEx" width="70%" rows="10"
              value="#{TestAction.list}" var="var"
              binding="#{TestAction.listDataTableUI}">
              <f:facet name="footer">
                   <hx:panelBox styleClass="panelBox" id="pagerbox">
                        <hx:pagerDeluxe styleClass="pagerDeluxe" id="deluxe1" for="dataTable1"/>                              
                        <h:commandLink action="home">
                             <h:outputText value="Back Home"></h:outputText>
                        </h:commandLink>
                   </hx:panelBox>     
              </f:facet>
         </h:dataTable>
         </h:form>

    BalusC wrote:
    It is comparing the selected value against the List<SelectItem> returned by getSetoresOrigem() as it is during the apply request values phase of the form submit request.Ok. That's what I supposed JSF was doing.
    BalusC wrote:
    If the selected value isn't in there, then you will get this error.I can understand this, but is this right? As I said, the old value isn't really there because I changed the list values to new ones. But the new value (the value of fSetorOrigem ) corresponds to a value that exist in the new list items, so a valid value. So JSF is not considering that I also changed the list, not just the value. It is comparing the new value with the old list, not the new one. Acting like this JSF is making the page looks like a static HTML page, not a dynamic one. If I can't change the list and the value, what's the point of that? In my point of view I'm not doing anything wrong, I'm not violating any JSF rules.
    Marcos

  • JSF dataTables - Problem during retrieving data from bean

    Hi, Below is the Stack Trace got on displaying data using JSF datatables.
         This error occurs somtimes and is not very frequent.We are using jboss seam, jboss-4.0.5.GA server and Hibernate.
         Anyone knows about this problem and how it can be resolved?
         Thanks in advance
         javax.faces.el.EvaluationException: Cannot get value for expression '#{loc.companyName}'
              at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:402)
              at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:1075)
              at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:508)
              at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:433)
              at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGridRendererBase.java:216)
              at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRendererBase.java:98)
              at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:536)
              at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:495)
              at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:363)
              at org.apache.myfaces.shared_impl.taglib.UIComponentBodyTagBase.doEndTag(UIComponentBodyTagBase.java:54)
              at org.apache.jsp.menu_jsp._jspx_meth_h_panelGrid_0(menu_jsp.java:225)
              at org.apache.jsp.menu_jsp._jspx_meth_f_subview_0(menu_jsp.java:118)
              at org.apache.jsp.menu_jsp._jspService(menu_jsp.java:87)
              at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
              at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
              at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
              at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
              at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
              at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
              at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
              at org.apache.jsp.finish_005fregistration_jsp._jspx_meth_h_form_0(finish_005fregistration_jsp.java:263)
              at org.apache.jsp.finish_005fregistration_jsp._jspx_meth_f_view_0(finish_005fregistration_jsp.java:139)
              at org.apache.jsp.finish_005fregistration_jsp._jspService(finish_005fregistration_jsp.java:93)
              at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
              at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
              at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
              at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
              at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
              at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
              at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
              at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:416)
              at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
              at org.jboss.seam.jsf.SeamViewHandler.renderView(SeamViewHandler.java:59)
              at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at com.kmedia.filter.RequestFilter.doFilter(RequestFilter.java:184)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
              at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
              at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
              at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
              at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
              at java.lang.Thread.run(Thread.java:595)
         Caused by: java.lang.NullPointerException
              at org.jboss.mx.loading.RepositoryClassLoader.findClass(RepositoryClassLoader.java:620)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
              at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:464)
              at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:405)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
              at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
              at org.jboss.seam.jsf.SeamApplication11.getPropertyResolver(SeamApplication11.java:197)
              at org.apache.myfaces.el.ELParserHelper$MyPropertySuffix.evaluate(ELParserHelper.java:532)
              at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145)
              at org.apache.commons.el.BinaryOperatorExpression.evaluate(BinaryOperatorExpression.java:154)
              at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:383)
              ... 70 more
         10:23:55 Servlet.service() for servlet jsp threw exception
         Also check the JSF page, Backing bean, and VO
         JSF page
         <h:dataTable value="#{finishedRegistrationBean.list}" var = "loc" >
                        <h:column>
         <f:facet name="header">
                        <h:outputText value="#{displaymessages.registrationDate}" />
                        </f:facet>
                        <span class="bodylighttext"> <h:outputText value="#{loc.registrDate}" /> </span>
                                                                                                   </h:column>
                        <h:column>
                        <f:facet name="header">
                        <h:outputText value="#{displaymessages.companyName}" />
                        </f:facet>
                        <span class="bodylighttext"> <h:outputText
                        value="#{loc.companyName}" /> </span>
                        </h:column>
                        <h:column>
                        <f:facet name="header">
                             <h:outputText value="#{displaymessages.Address}" />
                             </f:facet>
                        <span class="bodylighttext"> <h:outputText
                        value="#{loc.address}" /> </span>
                        </h:column>
                        <h:column>
                        <f:facet name="header">
                        <h:outputText value="#{displaymessages.Action}" />
                        </f:facet>
                        <h:commandLink target="_blank"
                        action="#{finishedRegistrationBean.viewFinishedRegistrationPage(loc)}">
                        <h:graphicImage value="images/view_icon.gif"
                        alt="#{displaymessages.info_tooltip_view}"
                        width="17" height="17" style="border:0" />
                        </h:commandLink>
                        </h:column>
    </h:dataTable>
    Backing bean
                        @Name("finishedRegistrationBean")
                        public class FinishedRegistrationBean {
                             @In
                             private User user;
                             @In
                             private FacesMessages facesMessages;
                             private List<FinishedRegistrationVO> list;
                             public FinishedRegistrationBean() throws KMException {
                                  filterFinishedRegistration();
                             public void filterFinishedRegistration() throws KMException
                             list = new ArrayList<FinishedRegistrationVO>();
                             finished_list = userDAO.searchFinishedRegistrationDetails(country_code,uniqueID, companyName, user.getUserName());
                             public void setList(List<FinishedRegistrationVO> list) {
                                  this.list = list;
                             public List<FinishedRegistrationVO> getList() {
                             return list;
    FinishedRegistrationVO
         public class FinishedRegistrationVO {
              private String uniqId;
              private String companyName;
              private Date registrDate;
              private String address;
              public String getCompanyName() {
                   return companyName;
              public void setCompanyName(String companyName) {
                   this.companyName = companyName;
              public String getAddress() {
                   return address;
              public void setAddress(String address) {
                   this.address = address;
              public String getUniqId() {
                   return uniqId;
              public void setUniqId(String uniqId) {
                   this.uniqId = uniqId;
              public Date getRegistrDate() {
                   return registrDate;
              public void setRegistrDate(Date registrDate) {
                   this.registrDate = registrDate;
         }

    Could you please post your
    -HBM
    -faces-config.xml

  • I want use an ArrayList into a DataTable in JSF application, but the JSP gi

    jsf code
    <h:dataTable value="#{EmpBean.lDocumentos}" var="TBean" id="TablaDoc">
    <h:column>
    <f:facet name="header">
    <h:outputText value="N�mero"/>
    </f:facet>
    <h:outputText value="#{TBean.numero}"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Revisi�n"/>
    </f:facet>
    <h:outputText value="#{TBean.revision}"/>
    </h:column>
    </h:dataTable>
    Entity Bean for Table
    public class TBean {
    String numero = "";
    String revision = "";
    /** Creates a new instance of EmpBean */
    public TBean() {
    public void setNumero(String _numero) {
    numero = _numero;
    public String getNumero() {
    return numero;
    public void setRevision(String _revision) {
    revision = _revision;
    public String getRevision() {
    return revision;
    faces config file
    <managed-bean>
    <description>Input Value Holder</description>
    <managed-bean-name>TBean</managed-bean-name>
    <managed-bean-class>emp.TBean</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>
    Bean refer by jsf
    public class EmpBean {
    ArrayList lDocumentos = new ArrayList();
    /** Creates a new instance of EmpBean */
    public EmpBean() {
    TBean ob1 = new TBean();
    ob1.setNumero("ee");
    ob1.setRevision("rr");
    lDocumentos.add(ob1);
    public ArrayList getBranchList() {
    return getAllbranchList();
    public ArrayList getLDocumentos() {
    return lDocumentos;
    public void setLDocumentos(ArrayList _lDocumentos) {
    lDocumentos = _lDocumentos;
    IM getting the following error
    javax.servlet.ServletException: javax.servlet.jsp.JspException: Error getting property 'lDocumentos' from bean of type emp.EmpBean
    pls replay
    Thanks

    #{EmpBean.lDocumentos}I don't see the EmpBean in the faces-config?
    Anyway, this is not the way to use datatables and you're using the confusing name "bean" for an ordinary data wrapper object. Also you assigned var="TBean", which makes it even more confusing.
    Check http://balusc.xs4all.nl/srv/dev-jep-dat.html how to use datatables.

  • JSF datatable to get multiple row values

    I want to get values of SelectBooleanCheckbox and SelectOneMenu in jsf bean from datatable for multiple rows?

    You can find an example here: http://balusc.blogspot.com/2006/06/using-datatables.html

  • How to create a grid like the sample of "profit Centre - Report" use sdk ?

    hi
    in the grid of "profit Centre - Report", it has a button,if you click it ,it can show the detaildata. it can implement many levels "Expand " and "Collaspe",but it's not implemented by group! i want to know how to implement it by ui dpi or udo .
    thanks!

    Hi,
    You need:
    - to know the relevant queries
    - to make copies (use GetAsXML) from the relevant system forms to mimick the standard functionality
    - to do it via UI API (use Grid and DataTable - then you don't need DI API at all)
    Here's some more information on DataTable / Grid:
    The UI sample no. 19 shows you how to load data into the Grid - via the DataTable...
    You can find an enhanced version of the sample (showing you how to get linked buttons, combo boxes etc) in the Education area on SAP Service Marketplace (SMP): http://service.sap.com/smb/education
    Or just try these links (need SMP user account for that...) to download the sample from the Archive of "Live Expert Sessions" (includes a few more things):
    http://service.sap.com/~sapidb/011000358700006282762006E.zip
    That's the link to the PDF for the session:
    http://service.sap.com/~sapidb/011000358700006282742006E.pdf
    ...and that's the recording:
    http://service.sap.com/~sapidb/011000358700006280182006E.wrf
    HTH,
    Frank

  • Displaying Map object fields in DataTable

    I am trying to create a shopping cart app. The ShopCart bean has a Map property:
    Map shoppingItems = new Hashtable();In addition to the getter setter method, the bean has a addShoppingItem() method that adds a Product object to the Map.
    public void addShoppingItem(String index,Product item)
             shoppingItems.put(index,item);                 
           }The Product class has fields, such as id, name, price and getter/setter methods. The index argument passed to addShoppingItem() is the id field of the value of the Product object.
    I am now desperately trying to display information of all Product objects added to the Map in a datatable.
    Is this possible? Please help.

    It should be possible - you will need something like
    JSP/JSF code
    <h:dataTable id="cart"
    value="#{shoppingCart.products}"
    var="product" first="0" >
    <h:column >
    <f:facet name="header">
    <h:outputText value="product code" />
    </f:facet>
    <h:inputText id="productCode" value="#{id}" />
    </h:column>
    In your Backing bean code you will need a
    Map getProducts() method
    NOT the above definetely works whenreturning a List
    I have seen people say it also works with a Map - but haven't tried it myself - so am not 100% sure
    Post up your code & someone will help you out

  • Ability to programmatically control a JSF tag outside the JSP?

    Hi All,
    I created my own JSF component (a small grid) and I would like to know if it's possible to programatically control it outside my JSP.
    For example let's say that I have the following snippet of code in my JSP:
    <mytag:grid id="grid1"/>
    Is it possible to access "grid1" in my controller (or somewhere else) and do something like that:
    grid1.addcolumn ("column1") --> my UI component has an addColumn method.
    grid1.addcolumn ("column2")
    // loop through the column and set the width
    for (int i=0; i<grid1.columns.count;i++) {
    grid1.columns.width="200px"
    Thanks for your help and Happy Thanksgiving!!!

    It is also possible to create a web application with Faces
    independent of JSP. We (the Faces team) have done some prototypes
    in this area. For example, you can programmatically do something
    like this for rendering:
    // Render the response content for an individual component
    protected void renderResponse(FacesContext context,
    UIComponent component) throws IOException {
    component.encodeBegin(context);
    if (component.getRendersChildren()) {
    component.encodeChildren(context);
    } else {
    Iterator kids = component.getChildren();
    while (kids.hasNext()) {
    renderResponse(context, (UIComponent) kids.next());
    component.encodeEnd(context);
    In one of our prototypes we've also used XUL (in replace of JSP) to
    describe a Faces page.
    Cheers,
    -roger

  • RadioButton Inside Datatable, Getting Undefined Error

    Hello,
    I have a JSF page with datatables and in each row I have radiobutton.
    I would like to deselect radiobutton when user select the next row radiobutton.
    To achieve this I have the following code.
    function radioButton(radio) {
        var id = radio.name.substring(radio.name.lastIndexOf(':'));
        var el = radio.form.elements;
        for (var i = 0; i < el.length; i++) {
            if (el.name.substring(el[i].name.lastIndexOf(':')) == id) {
    el[i].checked = false;
    radio.checked = true;
    And in my jsf page I am calling the javascript like
    <h:selectOneRadio valueChangeListener="#{dataBean.setSelectedItem}"
                    onclick="radioButton(this);">
                    <f:selectItem itemValue="" />
                </h:selectOneRadio>The issue I am having is I am getting the following error
    radio.name is undefined
    var id = radio.name.substring(radio.name.lastIndexOf(':')); How can I resolve this issue?
    Thanks

    That's a Javascript question and this is a Java forum. Locking this thread.

  • What is main differnce between matrix and grid how we can use it ?

    hey experts,
    we are developed one form,in that we choosen matrix we we
    are pressing tab it's showing related form like item master data
    then after we choosen ir's not storing data in perticular cell.
    (data is not binding) here how we can dind data (Item Code)
    plase give advise. could you send me sample code.
    regds,
    sampath.

    ok, because i have a good mood i post the samples how to fill it with datatables
    GRID:
    oForm.DataSources.DataTables.Add("MyDataTable")
    oForm.DataSources.DataTables.Item(0).ExecuteQuery("select CardCode, CardName, DocDate, DocNum, DocTotal, DocStatus from OINV ORDER BY CardCode")
    oGrid.DataTable = oForm.DataSources.DataTables.Item("MyDataTable")
    oGrid.CollapseLevel = 2
    oGrid.AutoResizeColumns
    MATRIX:
    frm.DataSources.DataTables.Add ("MyDataTable")
    frm.DataSources.DataTables.item("MyDataTable").ExecuteQuery ("SELECT U_Code FROM [@B1C_TEST]")
    frm.Items.item("mtxList").Specific.Columns.item("ColCode").DataBind.Bind "MyDataTable", "U_Code"
    frm.Items.item("mtxList").Specific.Clear
    frm.Items.item("mtxList").Specific.LoadFromDataSource
    frm.Items.item("mtxList").Specific.AutoResizeColumns
    well thats it,
    i hope you're happy - if yes reward me
    David

  • Put data directly into DataTable or dot net object ?

    Currently, I just create an OLEDB connection, run a query on it and load the result set into a SSIS object. I don't know what this Object really is. After that, I load this Object into a DataTable in my C# code. Instead of doing all this, is there a way
    to directly load this result set into a data table ? Also, is there a way to get the number of rows in the result set from the object itself ? Right now, I load it into a data table and then get the number of rows as myDataTable.Rows.Count;
    Thanks.

    Hi,
    If you use ADO.NET connection, you will get ADO.NET
    DataSet object.
    SSIS Tasks Components Scripts Services | http://www.cozyroc.com/
    Thanks. I think that a query returns only one DataTable/Grid. So, it seems that one DataTable instead of a collection of DataTables (ie DataSet) should be sufficient. Then why does SSIS return a DataSet ? 

  • Html outputlink  in datatble

    Hi, in JSF,in a datatable i am using <h:outputLink> for a column..
    and i am using some events for security purpose..
    For example
    <h:commandButton id="btn4grpnam" value="Group Name"
         action="masterfaqsublist" event="faq.addgroup"
         styleClass="submitBtn"/>
    if user have access to next page where this particular command button leads to,the command button will be displayed..or else button won't get displayed..
    the same i tried to use for <h:outputLink> (if user have acces label will be displayed with hyperlink or else simply label will get displayed)
    <h:outputLink id="faq_html_id" event="faq.update"
         value="masterfaqadd.jsp">
    but it is not working... is event attribute does not support for outputlink????
    and if inplace of <h:outputlink> if i use <h:commandlink> its working
    with event but the problem is <h:commandlink is not supporting actions.
    can anybody suggest alternate???????
    thanks in advance,
    saranya

    Use the rendered attribute.
    But: "h:commandlink is not supporting actions". It supports.
    What is the problem? <h:commandLink action="masterfaqadd.jsp"> should work.

Maybe you are looking for

  • Shutterfly to iphoto?

    hi, i have TONS of photo albums saved on shutterfly, that i want to transfer to my mac. I was using shutterfly back on my pc, but now i really want all pics to be stored in one place - iphoto. how can i get shutterfly pics to my iphoto library?

  • (BUG with) -  Targeted Adjustment Tool

    The Targeted Adjustment tool will stop functioning after I use the magnifier. When I attempt to use the tool, it only functions as a magnify glass. When I quit Lightroom and relaunch it, it restores the Targeted Adjustment tool back to a functioning

  • Bar-code reader for "numbers"?

    Hi there, is there a bar-code Reader that works with "numbers"? I would like to scan products for price comparison while I'm shopping for my business. 

  • Complex Boolean Expressions in FrameMaker

    I have a complex document set with multiple conditions to support brand and output, and now I want to add roles. Prior to the roles, I had it set up with the following conditions: BrandA BrandB Help PDF BrandA Help BrandA PDF BrandB Help BrandB PDF e

  • Helping reverting back to 1.3.1

    Ever since I updated to 1.3.1 my phone goes offline like every 30 seconds or so. Can some tell me how to revert back to 1.3.1 to then i could update to 1.3.5 again. Im hoping that something just got screwed up in the update. I downloaded thw WebOS 1.