4 Replies Latest reply on Dec 18, 2008 6:55 AM by joblini

    strange error on navigation

    wespe

      Error message:



      /requestList.xhtml: Property 'id' not found on type org.jboss.seam.web.IdentityRequestWrapper

      What should I check about this one at all?
      I've absolutely no idea what this is related to..


      The page to be loaded is just simple seam-gen stuff..


      Any ideas? Should I post some code? If yes then which part? I really have no idea.. :)

        • 1. Re: strange error on navigation
          gonorrhea

          post requestList.xhtml and the backing JavaBean/SFSB

          • 2. Re: strange error on navigation
            wespe

            requestList.xhtml:


            <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
            <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:s="http://jboss.com/products/seam/taglib"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:rich="http://richfaces.org/rich"
                template="layout/template.xhtml">
            
            <ui:define name="body">
            
                <rich:panel>
                    <f:facet name="header">requestList</f:facet>
            
                    <div class="results">
            
                        <h:outputText value="No request exists"
                                   rendered="#{empty requestList.resultList}"/>
            
                        <h:dataTable id="requestList" var="req"
                                  value="#{requestList.resultList}"
                               rendered="#{not empty requestList.resultList}">
                            <h:column>
                                <f:facet name="header">Id</f:facet>
                                #{request.id}
                            </h:column>
                            <h:column>
                                <f:facet name="header">Name</f:facet>
                                <s:link id="req"
                                     value="#{req.name}"
                               propagation="none"
                                     view="/request.xhtml">
                                    <f:param name="requestId"
                                            value="#{req.id}"/>
                                </s:link>
                            </h:column>
                        </h:dataTable>
            
                    </div>
            
                </rich:panel>
            
                <div class="actionButtons">
                    <s:button id="done"
                           value="Create request"
                            view="/request.xhtml"/>
                </div>
            
            </ui:define>
            
            </ui:composition>



            RequestList.java:



            package org.domain.sense.session.request;
            
            import org.jboss.seam.annotations.Name;
            import org.jboss.seam.framework.EntityQuery;
            import org.domain.sense.entity.Request;
            
            @Name("requestList")
            public class RequestList extends EntityQuery<Request>
            {
                public RequestList()
                {
                    setEjbql("select request from Request request");
                }
            }


            • 3. Re: strange error on navigation
              wespe

              Ok, I see it now....


              Btw.. the EL expression


              #{request}



              is taken already?

              • 4. Re: strange error on navigation
                joblini

                var="req", so, #{request.id} should be #{req.id}.


                Yes, request is an implicit object, here is a list, reference


                Implicit Objects
                
                The JSP expression language defines a set of implicit objects:
                
                    *
                
                      pageContext: The context for the JSP page. Provides access to various objects including:
                          o
                
                            servletContext: The context for the JSP page’s servlet and any web components contained in the same application. See Accessing the Web Context.
                          o
                
                            session: The session object for the client. See Maintaining Client State.
                          o
                
                            request: The request triggering the execution of the JSP page. See Getting Information from Requests.
                          o
                
                            response: The response returned by the JSP page. See Constructing Responses.
                    *
                
                      In addition, several implicit objects are available that allow easy access to the following objects:
                          o
                
                            param: Maps a request parameter name to a single value
                          o
                
                            paramValues: Maps a request parameter name to an array of values
                          o
                
                            header: Maps a request header name to a single value
                          o
                
                            headerValues: Maps a request header name to an array of values
                          o
                
                            cookie: Maps a cookie name to a single cookie
                          o
                
                            initParam: Maps a context initialization parameter name to a single value
                    *
                
                      Finally, there are objects that allow access to the various scoped variables described in Using Scope Objects.
                          o
                
                            pageScope: Maps page-scoped variable names to their values
                          o
                
                            requestScope: Maps request-scoped variable names to their values
                          o
                
                            sessionScope: Maps session-scoped variable names to their values
                          o
                
                            applicationScope: Maps application-scoped variable names to their values
                
                JSP 2.1 provides two EL resolvers to handle expressions that reference these objects: ImplicitObjectELResolver and ScopedAttributeELResolver.
                
                A variable that matches one of the implicit objects is evaluated by ImplicitObjectResolver, which returns the implicit object. This resolver only handles expressions with a base of null. What this means for the following expression is that the ImplicitObjectResolver resolves the sessionScope implicit object only. Once the implicit object is found, the MapELResolver instance resolves the profile attribute because the profile object represents a map.
                
                ${sessionScope.profile}
                
                ScopedAttributeELResolver evaluates a single object that is stored in scope. Like ImplicitObjectELResolver, it also only evaluates expressions with a base of null. This resolver essentially looks for an object in all of the scopes until it finds it, according to the behavior of PageContext.findAttribute(String). For example, when evaluating the expression ${product}, the resolver will look for product in the page, request, session, and application scopes and will return its value. If product is not found, null is returned.
                
                When an expression references one of the implicit objects by name, the appropriate object is returned instead of the corresponding attribute. For example, ${pageContext} returns the PageContext object, even if there is an existing pageContext attribute containing some other value.
                Operators
                
                In addition to the . and [] operators discussed in Value and Method Expressions, the JSP expression language provides the following operators, which can be used in rvalue expressions only:
                
                    *
                
                      Arithmetic: +, - (binary), *, / and div, % and mod, - (unary)
                    *
                
                      Logical: and, &&, or, ||, not, !
                    *
                
                      Relational: ==, eq, !=, ne, <, lt, >, gt, <=, ge, >=, le. Comparisons can be made against other values, or against boolean, string, integer, or floating point literals.
                    *
                
                      Empty: The empty operator is a prefix operation that can be used to determine whether a value is null or empty.
                    *
                
                      Conditional: A ? B : C. Evaluate B or C, depending on the result of the evaluation of A.
                
                The precedence of operators highest to lowest, left to right is as follows:
                
                    *
                
                      [] .
                    *
                
                      () (used to change the precedence of operators)
                    *
                
                      - (unary) not ! empty
                    *
                
                      * / div % mod
                    *
                
                      + - (binary)
                    *
                
                      < > <= >= lt gt le ge
                    *
                
                      == != eq ne
                    *
                
                      && and
                    *
                
                      || or
                    *
                
                      ? :
                
                Reserved Words
                
                The following words are reserved for the JSP expression language and should not be used as identifiers.
                
                and
                     
                
                or
                     
                
                not
                     
                
                eq
                
                ne
                     
                
                lt
                     
                
                gt
                     
                
                le
                
                ge
                     
                
                true
                     
                
                false
                     
                
                null
                
                instanceof
                     
                
                empty
                     
                
                div
                     
                
                mod
                
                Note that many of these words are not in the language now, but they may be in the future, so you should avoid using them.