Flex + Sending ArrayCollection to Server + Request Scope

Hi All,
I have a requirement where I have to send an ArrayCollection
instance containing actionscript instances to server side. Server
side component is java servlet.
Could anyone please tell me how this can be done.
I hav explored flex APIs where I get reference to sending as
key/value. Here this is not feasible as I have a collection of .as
instances and each .as instance is composed of 20 string objects.
I have one idea I can get the whole ArrayCollection on the
server side by request scope, if I can bind the same
ArrayCollection in request scope with some key in mxml page. Can it
be done.
If I am in one jsp page from where I am forwarding to another
jsp, then what I will do is in first jsp, I will write:
request.setAtribute("SomeKey", instance);
In second jsp, I will write
List list = (List)request.getAttribute("SomeKey");
I have no idea of how request.setAttribute is done in mxml
page. Can it be done. Can anyone help me here. If this is not
possible, is there any other way of doing this.
Many Thanks,
Best Regards,
Nazz

Hi,
Thanks for the reply. Apologies for updating you late on
this.
I have downloaded JSON api from here:
JSON API
I have placed the as3corelib.swc file in my WEB-INF/flex/lib
folder, I have imported the JSON class in mxml page using import
com.adobe.serialization.json.JSON;
when I hit the browser, it gives me following error on the
browser:
quote:
1 Error, 1 Exception found.
Error /nazz/SampleJSON.mxml
unable to load SWC as3corelib.swc
Exception flex2.compiler.swc.SwcException$SwcNotLoaded
Here is the stacktrace from the server log:
quote:
12/21 20:07:55 ERROR
unable to load SWC as3corelib.swc
12/21 20:07:55 ERROR
flex2.compiler.swc.SwcException$SwcNotLoaded
at flex2.compiler.swc.SwcCache.getSwc(SwcCache.java:230)
at flex2.compiler.swc.SwcCache.getSwcs(SwcCache.java:174)
at flex2.compiler.swc.SwcCache.getSwcGroup(SwcCache.java:78)
at flex2.compiler.swc.SwcCache.getSwcGroup(SwcCache.java:67)
at
flex2.compiler.CompilerSwcContext.load(CompilerSwcContext.java:52)
at
flex2.server.j2ee.IncrementalCompileFilter.fullCompile(IncrementalCompileFilter.java:186)
at
flex2.server.j2ee.IncrementalCompileFilter.compileMxml(IncrementalCompileFilter.java:113)
at
flex2.server.j2ee.BaseCompileFilter.mxmlToSwf(BaseCompileFilter.java:286)
at
flex2.server.j2ee.BaseCompileFilter.invoke(BaseCompileFilter.java:72)
at
flex2.server.j2ee.RecompileFilter.invoke(RecompileFilter.java:38)
at flex2.server.j2ee.AboutFilter.invoke(AboutFilter.java:48)
at flex2.server.j2ee.MxmlServlet.doGet(MxmlServlet.java:159)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
flex.bootstrap.BootstrapServlet.service(BootstrapServlet.java:85)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:252)
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.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
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:825)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11P rotocol.java:743)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.ja va:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)
Please help.
I'm using flex 2.
Many Thanks,
Best Rgds,
NAZZ

Similar Messages

  • Publishing my flex application in external server (Channel.Security.Error error Error #2048)

    when i publish my flex application in an external server i get that error if my flash builder beta 2 is closed in my system , i did configure an endpoint to the dataservice to point to the external server and if i run my flash builder and any body browser the site it open and they can access the data from my application but if i close my flash builder we have this error all of us
    Send failed
    Channel.Security.Error error Error #2048: Security sandbox violation:
    http://www.dcecrak.com/Maine.swf cannot load data from
    http://localhost:37813/flex2gateway/?hostport=www.dcecrak.com&https=N&id=-1. url:
    'http://www.dcecrak.com/flex2gateway/'
    i created a crossdomain.xml file and put it in the web root , if i try to open the link http://www.dcecrak.com/flex2gateway  it open with blank page this means that every thing is oky , my service-config file looks like that :
    <?xml version="1.0" encoding="UTF-8"?>
    <services-config>
        <services>
            <service-include file-path="remoting-config.xml" />
            <service-include file-path="proxy-config.xml" />
            <service-include file-path="messaging-config.xml" />
        </services>
        <security>
            <login-command class="flex.messaging.security.JRunLoginCommand" server="JRun"/>
            <!-- Uncomment the correct app server
            <login-command class="flex.messaging.security.TomcatLoginCommand" server="Tomcat"/>
            <login-command class="flex.messaging.security.WeblogicLoginCommand" server="Weblogic"/>
            <login-command class="flex.messaging.security.WebSphereLoginCommand" server="WebSphere"/>
            -->
            <!--
            <security-constraint id="basic-read-access">
                <auth-method>Basic</auth-method>
                <roles>
                    <role>guests</role>
                    <role>accountants</role>
                    <role>employees</role>
                    <role>managers</role>
                </roles>
            </security-constraint>
            -->
        </security>
        <channels>
            <!--  CF Based Endpoints -->
    <channel-definition id="dcecrak" class="mx.messaging.channels.AMFChannel">
                <endpoint uri="http://www.dcecrak.com/flex2gateway/" class="coldfusion.flash.messaging.CFAMFEndPoint"/>
                <properties>
                      <add-no-cache-headers>false</add-no-cache-headers>
                            <polling-interval-seconds>8</polling-interval-seconds>
                            <serialization>
                                  <enable-small-messages>false</enable-small-messages>
                            </serialization>
                            <coldfusion>
                                <!-- define the resolution rules and access level of the cfc being invoked -->
                                  <access>
                                        <!-- Use the ColdFusion mappings to find CFCs-->
                                        <use-mappings>true</use-mappings>
                                        <!-- allow "public and remote" or just "remote" methods to be invoked -->
                                        <method-access-level>remote</method-access-level>
                                  </access>
                                  <!-- Whether the Value Object CFC has getters and setters. Set the value of use-accessors to true if there are getters and setters in the Value Object CFC. -->
                                  <use-accessors>true</use-accessors>
                                  <!--Set the value of use-structs to true if you don't require any translation of ActionScript to CFCs. The assembler can still return structures to Flex, even if the value is false. The default value is false.-->
                                  <use-structs>false</use-structs>
                        <property-case>
                            <!-- cfc property names -->
                            <force-cfc-lowercase>false</force-cfc-lowercase>
                            <!-- Query column names -->
                            <force-query-lowercase>false</force-query-lowercase>
                            <!-- struct keys -->
                            <force-struct-lowercase>false</force-struct-lowercase>
                        </property-case>
                            </coldfusion>
                </properties>
            </channel-definition>
            <channel-definition id="cf-polling-amf" class="mx.messaging.channels.AMFChannel">
                <endpoint uri="http://{server.name}:{server.port}{context.root}/flex2gateway/cfamfpolling" class="coldfusion.flash.messaging.CFAMFEndPoint"/>
                <properties>
                    <polling-enabled>true</polling-enabled>
                    <polling-interval-seconds>8</polling-interval-seconds>
                            <serialization>
                                  <enable-small-messages>false</enable-small-messages>
                            </serialization>
                            <coldfusion>
                                <!-- define the resolution rules and access level of the cfc being invoked -->
                                  <access>
                                        <!-- Use the ColdFusion mappings to find CFCs-->
                                        <use-mappings>true</use-mappings>
                                        <!-- allow "public and remote" or just "remote" methods to be invoked -->
                                        <method-access-level>remote</method-access-level>
                                  </access>
                                  <!-- Whether the Value Object CFC has getters and setters. Set the value of use-accessors to true if there are getters and setters in the Value Object CFC. -->
                                  <use-accessors>true</use-accessors>
                                  <!--Set the value of use-structs to true if you don't require any translation of ActionScript to CFCs. The assembler can still return structures to Flex, even if the value is false. The default value is false.-->
                                  <use-structs>false</use-structs>
                        <property-case>
                            <!-- cfc property names -->
                            <force-cfc-lowercase>false</force-cfc-lowercase>
                            <!-- Query column names -->
                            <force-query-lowercase>false</force-query-lowercase>
                            <!-- struct keys -->
                            <force-struct-lowercase>false</force-struct-lowercase>
                        </property-case>
                            </coldfusion>
                </properties>
            </channel-definition>
            <channel-definition id="my-cfamf-secure" class="mx.messaging.channels.SecureAMFChannel">
                <endpoint uri="https://{server.name}:{server.port}{context.root}/flex2gateway/cfamfsecure" class="coldfusion.flash.messaging.SecureCFAMFEndPoint"/>
                <properties>
                    <polling-enabled>false</polling-enabled>
                            <add-no-cache-headers>false</add-no-cache-headers>
                            <serialization>
                                  <enable-small-messages>false</enable-small-messages>
                            </serialization>
                            <coldfusion>
                                <!-- define the resolution rules and access level of the cfc being invoked -->
                                  <access>
                                        <!-- Use the ColdFusion mappings to find CFCs-->
                                        <use-mappings>true</use-mappings>
                                        <!-- allow "public and remote" or just "remote" methods to be invoked -->
                                        <method-access-level>remote</method-access-level>
                                  </access>
                                  <!-- Whether the Value Object CFC has getters and setters. Set the value of use-accessors to true if there are getters and setters in the Value Object CFC. -->
                                  <use-accessors>true</use-accessors>
                                  <!--Set the value of use-structs to true if you don't require any translation of ActionScript to CFCs. The assembler can still return structures to Flex, even if the value is false. The default value is false.-->
                                  <use-structs>false</use-structs>
                                  <property-case>
                            <!-- cfc property names -->
                            <force-cfc-lowercase>false</force-cfc-lowercase>
                            <!-- Query column names -->
                            <force-query-lowercase>false</force-query-lowercase>
                            <!-- struct keys -->
                            <force-struct-lowercase>false</force-struct-lowercase>
                        </property-case>
                            </coldfusion>
                </properties>
            </channel-definition>
            <!--  Java Based Endpoints -->
            <channel-definition id="java-amf" class="mx.messaging.channels.AMFChannel">
                <endpoint uri="http://{server.name}:{server.port}{context.root}/flex2gateway/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
            </channel-definition>
            <channel-definition id="java-secure-amf" class="mx.messaging.channels.SecureAMFChannel">
                <endpoint uri="https://{server.name}:{server.port}{context.root}/flex2gateway/amfsecure" class="flex.messaging.endpoints.SecureAMFEndpoint"/>
            </channel-definition>
            <channel-definition id="java-polling-amf" class="mx.messaging.channels.AMFChannel">
                <endpoint uri="http://{server.name}:{server.port}{context.root}/flex2gateway/amfpolling" class="flex.messaging.endpoints.AMFEndpoint"/>
                <properties>
                    <polling-enabled>true</polling-enabled>
                    <polling-interval-seconds>8</polling-interval-seconds>
                </properties>
            </channel-definition>
            <!--
            <channel-definition id="java-http" class="mx.messaging.channels.HTTPChannel">
                <endpoint uri="http://{server.name}:{server.port}{context.root}/flex2gateway/http" class="flex.messaging.endpoints.HTTPEndpoint"/>
            </channel-definition>
            <channel-definition id="java-secure-http" class="mx.messaging.channels.SecureHTTPChannel">
                <endpoint uri="https://{server.name}:{server.port}{context.root}/flex2gateway/httpsecure" class="flex.messaging.endpoints.SecureHTTPEndpoint"/>
            </channel-definition>
            -->
        </channels>
        <logging>
            <target class="flex.messaging.log.ConsoleTarget" level="Error">
                <properties>
                    <prefix>[BlazeDS] </prefix>
                    <includeDate>false</includeDate>
                    <includeTime>false</includeTime>
                    <includeLevel>false</includeLevel>
                    <includeCategory>false</includeCategory>
                </properties>
                <filters>
                    <pattern>Endpoint.*</pattern>
                    <pattern>Service.*</pattern>
                    <pattern>Configuration</pattern>
                    <pattern>Message.*</pattern>
                </filters>
            </target>
        </logging>
        <system>
            <manageable>false</manageable>
            <!--
            <redeploy>
                <enabled>true</enabled>
                <watch-interval>20</watch-interval>
                <watch-file>{context.root}/WEB-INF/flex/services-config.xml</watch-file>
                <watch-file>{context.root}/WEB-INF/flex/proxy-config.xml</watch-file>
                <watch-file>{context.root}/WEB-INF/flex/remoting-config.xml</watch-file>
                <watch-file>{context.root}/WEB-INF/flex/messaging-config.xml</watch-file>
                <watch-file>{context.root}/WEB-INF/flex/data-management-config.xml</watch-file>
                <touch-file>{context.root}/WEB-INF/web.xml</touch-file>
            </redeploy>
             -->
        </system>
    </services-config>
    and my crossdomain.xml looks like that :
    <cross-domain-policy>
    <site-control permitted-cross-domain-policies="all"/>
    <allow-access-from domain="localhost" to-ports="*" secure="false"/>
    <allow-access-from domain="*" to-ports="*" secure="false"/>
    <allow-http-request-headers-from domain="*"/>
    </cross-domain-policy>
    really its strange only the site works if my flash builder is running , please help

      Thanks all for your attention, i have solved my problem and i think its a bug in the flash builder , the problem was that when you compile the application and you enabling Network Monitoring , the communication of the AMF channels done throw the  http://localhost:37813/flex2gateway/
    and that was the problem if you close the flash builder on your system that getaway dose not exist and on the hosted server there is no such address localhost by this port also so the client application witch is catch in you system try to access your localhost and that cause a security error and the address is also not exist .
    so the solution or we have to compile the project after we disable the Network Monitoring in flash builder .

  • Error by sending a Web Service request

    Hi,
    we generated a WSDL from an outbound-interface and build a web application with it. When we send a Web Service request to SAP-XI from our Web Dynpro client application, we get an error "CALL_CONSUMER_ERROR" (of category "XI_J2EE_MESSAGING_SYSTEM"). We find the following entry in the message-log of the adapter engine:
    Error: Return of synchronous errormessage to the calling application: com.sap.aii.af.ra.ms.api.RecoverableException: java.lang.RuntimeException: Error while silently connecting: org.w3c.www.protocol.http.HttpException: iaik.security.ssl.SSLException: Server certificate rejected by ChainVerifier.
    Error: The Transmission of the message with https://hpsaps01.inveos.com:8001/sap/xi/engine?type=entry failed, because: com.sap.aii.af.ra.ms.api.RecoverableException: java.lang.RuntimeException: Error while silently connecting: org.w3c.www.protocol.http.HttpException: iaik.security.ssl.SSLException: Server certificate rejected by ChainVerifier
    does anybody know, how to solve this problem?
    Greetings
    Hildegard

    Hi Stefan,
    correct certificates are established in the meantime and the error-message in the adapterlog has changed. The errorcode still remains "CALL_CONSUMER_ERROR" of category "XI_J2EE_MESSAGING_SYSTEM".
    Adapter-log:
    Error: Return of synchronous errormessage to the calling application: com.sap.aii.af.ra.ms.api.RecoverableException: java.lang.RuntimeException: Error while silently connecting: org.w3c.www.protocol.http.HttpException: java.net.ConnectException: Connection refused.
    Error: The Transmission of the message with https://hpsaps01.inveos.com:8001/sap/xi/engine?type=entry failed, because: com.sap.aii.af.ra.ms.api.RecoverableException: java.lang.RuntimeException: Error while silently connecting: org.w3c.www.protocol.http.HttpException: java.net.ConnectException: Connection refused
    Are there missing any more permissions or is this another error in the configuration?
    Regards
    Hildegard

  • Passing bean as attribute to servlet in request scope

    Hello,
    I want to pass a bean from a jsp to my controller servlet. As I understood, as long as I can give the bean 'request' scope, then I should be abble to access the bean, as an attribute in the doPost / doGet method of my servlet. However, when I try to get the bean in the servlet, its always null.
    I am aware that request scope beans don't loose their values when passing to other JSP's , but what about passing to servlets?
    I dont want to use a session scoped bean as I believe this should be possible with a request scoped variable.
    <%-- vwLogon.jsp --%>
    <jsp:useBean id="viewBean" class="com.alto.common.ViewBean" scope="request">
         <jsp:setProperty name="viewBean" property="viewName" value="/vwLogon"/>
    </jsp:useBean>
    <html>
    <body>
    <h2>Enter Name</h2>
    <form method="GET" action="controller">
         Enter your name:<input type="text" name="vwLogon_User_txt" value=""/>
         Enter your password:<input type="secret" name="vwLogon_Password_txt" value=""/>
    <input type="submit" name="vwLogon_Logon_Btn" value="Logon"/>
    </form>
    </body>
    </html>
    ------------------------------- controller servlet
    public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
    ViewBean viewBean = (ViewBean)req.getAttribute("viewBean");
    String strURL = new String("");
    if (!(viewBean==null)) {
    strURL = viewBean.getViewName();

    A request/response pair is one communication between the client browser and the web server. A submit form action generates a new request.
    In this instance you have two requests:
    1 - load login page
    2 - submit login page
    The point of being able to give a bean request scope, is so that you can use jsp:forward, or jsp:include to pass on the request, and the bean as well.
    In your case, a session bean is probably called for, as you have 2 request/responses in your session.
    Hope this clears things up a little.
    Cheers,
    evnafets

  • Java.lang.IllegalStateException:  bean  not found in "request" scope

    In jsp,I use javaBean,the statement is following:
    <jsp:useBean id="collectionBean" scope="request" type="view.CollectionBean"/>
    but ,in runtime,there exist following mistakes:
    java.lang.IllegalStateException: bean "collectionBean" not found in "request" scope
         at basicContentSearch.jspService(basicContentSearch.jsp:8)
         [SRC:/basicContentSearch.jsp]
         at com.orionserver[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:349)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:778)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    why?
    Please everyone tell me if you can,thanks a lot.

    I believe, if it is the first time you are referring to the bean, you must use the class attribute rather than type:
    <jsp:useBean id="collectionBean" scope="request" class="view.CollectionBean"/>The type is used to change how the bean is referenced, for instance, in regular Java you might do this:
    // The Type                 The Class
    java.util.List myList = new java.util.ArrayList();In use bean you would do this:
    <jsp:useBean id="myList" class="java.util.ArrayList" type="java.util.List"/>

  • Help with Flex - PHP - and SQL Server

    Good afternoon,
    I have been working on this problem for over a week and am at
    my wit's end. I am trying to create an application that will allow
    me and my fellow statisticians to share code easily. The
    technologies at my disposal are Flex, PHP and SQL Server 2005. The
    web server is IIS. I have downloaded and installed the PHP driver
    for SQL Server 2005 and am able to query the database and generate
    XML. The problem I'm having is that I can't return the XML from PHP
    to Flex.
    If I execute the php code in a web browser and view the
    source, it looks like XML. I can then cut and paste the exact same
    code into an xml file and read it in from the harddisk and the tree
    will populate. Can anyone please help me? I don't have flex builder
    so I it's hard for me to use trace and view what is going on.
    Thanks in advance,
    Eric Graves

    Thanks for the suggestion. I have tried every permutation of
    e4x path notation I can think of. You're right, you're not supposed
    to need the root level as that's supposed to be returned in the
    result. So you should only need to reference first level after the
    root. When I do this and launch the .SWF I get a completely empty
    tree.
    I think the problem lies somewhere in my understanding of
    what format Flex needs returned from a HTTPRequest. It's my
    understanding that it just needs to be XML. As far as I can tell,
    that's what I'm sending it. On the PHP side, does it have to be
    cast a special way? Everything I've seen just shows people using
    ECHO to output the XML data.

  • Avoiding request scope bean clashes for task flow calls

    Hi,
    I have two task flows, Tf1 calls Tf2 using a task flow call activity. The structures of the task flows are as follows:
    Tf1
      Managed Bean: TfBean, request scope
        class Tf1Bean
          has property goTf2Button
      View: View1
        Button bound to #{TfBean.goTf2Button}
          Action -> task flow call to Tf2
    Tf2
      Managed Bean: TfBean, request scope
        class Tf2Bean
          has property testButton
      View: View2
        Button bound to #{TfBean.testButton}
    As you can see both have a request scope bean called TfBean but these are different classes in each. The bean classes have different properties for binding the components on the two pages.
    When I click the button in View1 to navigate I get an error telling me that class Tf1Bean does not have the property testButton. Clearly Tf2Bean is not being instantiated as TfBean already exists for the request.
    I'm guessing this is expected behaviour and it seems logical.
    My question however is what would be good standards or practices to avoid this?
    One way would be a naming convention, however what if I am consuming Tf2 from a library? In this case it would ideally work as a black box and I should not be concerned about it's implementation, specifically names chosen for internal managed beans. Even if it was not a problem initially, the developer of the task flow could add or change the name of a request scope bean introducing a conflict at a later stage.
    Thanks,
    Kevin

    Hi Frank,
    Good to meet you at UKOUG Tech13 yesterday. I changed my test case from request scope to backing bean scope. Unfortunately I still get the same error:
    <RichExceptionHandler> <_logUnhandledException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase RENDER_RESPONSE 6
    javax.faces.FacesException: javax.el.PropertyNotFoundException: The class 'yyy.view.Tf1Bean' does not have the property 'testButton'.
      at com.sun.faces.application.ApplicationImpl.createComponentApplyAnnotations(ApplicationImpl.java:1900)
      at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:446)
      at javax.faces.webapp.UIComponentELTag.createComponent(UIComponentELTag.java:222)
      at javax.faces.webapp.UIComponentClassicTagBase.createChild(UIComponentClassicTagBase.java:506)
      at javax.faces.webapp.UIComponentClassicTagBase.findComponent(UIComponentClassicTagBase.java:744)
      at javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:1311)
      at org.apache.myfaces.trinidad.webapp.UIXComponentELTag.doStartTag(UIXComponentELTag.java:67)
      at oracle.adfinternal.view.faces.unified.taglib.nav.UnifiedCommandButtonTag.doStartTag(UnifiedCommandButtonTag.java:51)
    ...etc.
    What I think is happening, please correct me if I'm wrong...
    Running Tf1, page View1 is displayed.
    Clicking the button on View1 initiates a request and an instance of Tf1Bean is instantiated for the managed bean named TfBean.
    During the request navigation occurs to Tf2 and hence page View2.
    View2 needs a property in TfBean called testButton.
    There is already a managed bean instantiated for this request called TfBean, however this is of class Tf1Bean and does not have the property.
    I have a simple workspace showing this if you want me to send it to you. I am using 11.1.2.4 by the way.
    Thanks,
    Kevin

  • Getting bean from request scope

    Hi,
    I am new to JSF and unfortunately I am running into a problem that I am not entirely sure about. I look in other forums and what I am doing looks right but I am not getting the desired result.
    In my faces-config.xml file I have a managed bean defined as follows:
    <managed-bean>
        <managed-bean-name>LogIn</managed-bean-name>
        <managed-bean-class>lex.cac.tables.RefUsers</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
      </managed-bean>I then have a log on page with a form which contains a user name and password field. The tags are defined as
    <h:inputText immediate="false" value="#{LogIn.username}" /> (for username) and
    <h:inputSecret immediate="false" required="true"
                                   value="#{LogIn.password}" /> (for password)
    When I submit the form the web app navigates to a jsp page which attempts to do validation against a database.
    The first step though is retrieving the object which is suppose to be in request scope.
    I attempt the following but I get back null which causes a NullPointerException. Why can't if find the bean?
    ExternalContext ec = FacesContext.getCurrentInstance().getExternalContext();
    Map params         = ec.getRequestParameterMap();
    params.get("LogIn");  //null is returned hereWhat am i doing wrong? Can someone please help.
    Thanks in advance,
    Alex.

    Something like that:
    FacesContext fc = FacesContext.getCurrentInstance();
    RefUsers LogIn = (RefUsers)fc.getApplication().createValueBinding("#{LogIn}").getValue(fc);
    String username = LogIn.getUsername();
    String password = LogIn.getPassword();

  • Error when other people send me a meeting request

    Dear Microsoft,
    When other people send me a meeting request, they get the error you can see below (it says: "Your message can not be delivered to the following
    people or distribution lists"). The strange thing is that I receive as well the meeting request and I can accept it. However, it is confusing for the people who send me the request, so can you help me to fix te problem? 
    I use Outlook 2010, but I had also this problem with an older version. I have not had this problem always. The problem started when I authorized a colleague
    to look in my calendar (but, if I cancel the authorization it doesn't help, so I really don't understand what is going wrong!).
    I really hope you know a solution of this problem.
    Kind regards,
    Dineke Wolbink 
    The error (in dutch):
    Uw bericht kan niet worden bezorgd bij de volgende personen of distributielijsten:
    19d23aca-f069-4dfb-8f90-47ee2b07317f
    Het e-mailadres van de geadresseerde is niet gevonden in het e-mailsysteem van de geadresseerde. Microsoft Exchange probeert dit bericht niet opnieuw te verzenden. Controleer het e-mailadres van de geadresseerde en probeer dit bericht nog eens te versturen
    of geef de volgende diagnosetekst door aan uw systeembeheerder.
    Diagnostische gegevens voor beheerders:
    Bronserver: CPHUB-ZH01.kpneol.local
    IMCEAEX-_O=KPNEOL_OU=EXCHANGE+20ADMINISTRATIVE+20GROUP+20+28FYDIBOHF23SPDLT+29_CN=RECIPIENTS_CN=*** E-mailadres is om privacyredenen verwijderd ***
    #< #5.1.1 smtp;550 5.1.1 RESOLVER.ADR.ExRecipNotFound; not found> #SMTP#
    Oorspronkelijke berichtkoppen:
    Received: from CPMBS-ZH01.kpneol.local ([169.254.2.62]) by
     CPHUB-ZH01.kpneol.local ([10.94.81.134]) with mapi; Thu, 30 Jan 2014 10:13:10
     +0100
    Content-Type: application/ms-tnef; name="winmail.dat"
    Content-Transfer-Encoding: binary
    From: Dineke Wolbink <hier stond mijn e-mailadres>
    To: 19d23aca-f069-4dfb-8f90-47ee2b07317f
                <IMCEAEX-_O=KPNEOL_OU=EXCHANGE+20ADMINISTRATIVE+20GROUP+20+28FYDIBOHF23SPDLT+29_CN=RECIPIENTS_CN=*** E-mailadres is om privacyredenen verwijderd ***>
    Date: Thu, 30 Jan 2014 10:13:04 +0100
    Subject: hoi
    Thread-Topic: hoi
    Thread-Index: Ac8dm3/BkI5G2ujIRKKYyE6kqe5htgAAAFlQ
    Message-ID: <*** E-mailadres is om privacyredenen verwijderd ***>
    Accept-Language: nl-NL, en-US
    Content-Language: nl-NL
    X-MS-Has-Attach:
    X-MS-TNEF-Correlator: <*** E-mailadres is om privacyredenen verwijderd ***>
    acceptlanguage: nl-NL, en-US
    x-originalarrivaltime: 30 Jan 2014 09:13:04.0347 (UTC)
     FILETIME=[7B5702B0:01CF1D9B]
    kpn-deliveryagentmarker: 1
    x-rcptdomain: syntro.nl
    x-brand: 6aXqz76n4qX03qPpzQ==
    MIME-Version: 1.0

    Hi Dineke,
    You can contact your Exchange administrator to run the following command to check it:
    Get-Mailbox –Identity yourname | Select Name, HiddenFromAddressListsEnabled
    Or you can view your colleague’s Default Global Address List in OWA to check whether you are listed there or not.
    Please check whether there is any transport rule or Outlook rule setting in your mailbox. Also change a new computer and create a new Outlook profile to have a try.
    Best Regards,
    Winnie Liang
    TechNet Community Support

  • How to get detailStamp working in an af:table when using request scope ?

    <af:table var="row" id="t1" value="#{listUsers.users}" summary="Userlist" binding="#{listUsers.ATable}" [...]
    <af:column sortable="false" headerText="Username" id="c13" filterable="true">
    <af:outputText value="#{row.username}" id="ot13"/>
    </af:column>
    <f:facet name="detailStamp">
    <af:panelFormLayout rows="4" labelWidth="33%" fieldWidth="67%" inlineStyle="width:795px" id="pfl1" labelAlignment="start" >
    <af:group id="g1">
    <af:panelLabelAndMessage id="plamNumber" label="Number" for="number">
    <af:outputText value="#{row.address.number}" id="number"/>
    </af:panelLabelAndMessage>
    I feel there is nothing special with this.
    But I've tested with 2 rows in my table and when I disclose rows, I get random results :
    sometimes I get the details related to the row disclosed, but sometimes I get the details of the other row.
    I've read several posts on the subject but none really helpful.
    Another problem ; I've noticed that when I disclose or close a row, getUsers() is called, this method fetch the data from the DB, any way to prevent it ?
    For the second problem, the solution I see would be to : change scope of listUsers to session instead of request, fetch from the DB only when "refresh", not when "detailStamp",
    but I've no clue on how to actually do the "only when part"
    Thanks in advance,
    JP

    Ok when I change the scope of ListUsers to session it's "ok" since I only load the list from the DB once (just like the demo that does not have this problem since the demo does not use the DB)
    When I change the scope for request and that the page is refreshed then the object ListUsers is "recreated" and the data reloaded : that's the expected behavior
    So I prefer to have the scope sets to request
    The problem is that when a user disclose/close a detailstamp and that the scope is set to request,
    then the data is reloaded from the DB
    because apparently this event acts like a "refresh"
    because this event (disclose/close) cause the destruction of what is in the request scope ...
    That's my understanding, probably few mistakes, I'm beginning with ADF/JSF
    It seems that when I load the data from the DB, it's not always in the same order, causing the problem itself probably, which is not ADF related BUT ;
    what I would like to know is how to (elegantly) prevent the event of "disclose/close" to act like a "refresh" ?
    Because even if I fix the "not ADF related problem" (if there is one), loading the list from the DB each time, appears really useless and the DBA won't like me !
    A solution could be to leave the session scope, but then my question would be ;
    *how to know I've to reload from the DB ?"
    I could just "reload it on page load", seems ok to me but
    I'm not sure it's the best, I would like to have your opinion, I've found this article for the "on page load" part ;
    http://groundside.com/blog/DuncanMills.php?title=adf_executing_code_on_page_load&more=1&c=1&tb=1&pb=1
    Thanks,
    JP

  • Validation error while trying to change a value in a request scope bean

    - JBoss 4.2.3.GA
    - JSF 1.2_09-b01-BETA1 (Mojarra)
    - Java 5 Update 17
    Hello, everybody!
    I'm having the following problem in my JSF web application:
    I have a request scope backing bean. The first time this bean is loaded (I check
    this with the ResponseStateManager.isPostBack() method) I fill a list of SelectItem
    instances that are to be displayed in the JSF page in a +<h:selectOneMenu>+ component.
    The list goes, of course, to the +<h:selectOneMenu>+'s +<f:selectItems>+ facet child
    component. In the constructor I also define the value that goes to the value property
    of the +<h:selectOneMenu>+ component. This value is a property in the backing bean, as
    is the list of SelectItem instances. Until now we have something like this:
    The backing bean declaration in faces-config.xml:
    <managed-bean>
        <managed-bean-name>solicitacaoGeral</managed-bean-name>
        <managed-bean-class>br.urca.solicitacoes.web.PaginaSolicitacaoGeral</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    The relevant parts of the JSF page:
    <h:form id="form">
        <h:selectOneMenu value="#{solicitacaoGeral.setorOrigem}" id="foco">
            <f:selectItems value="#{solicitacaoGeral.setoresOrigem}" />
        </h:selectOneMenu>
    </h:form>
    The relevant parts of the backing bean class:
    public class PaginaSolicitacaoGeral
        private final List<SelectItem> fSetoresOrigem = new ArrayList<SelectItem>();
        private Setor fSetorOrigem;
        public PaginaSolicitacaoGeral()
            if (primeiraExibicao()) // First load (!ResponseStateManager.isPostBack())
                // Fill fSetoresOrigem...
                fSetorOrigem = ...
            else // Page submitted
                // Read below...
        public List<SelectItem> getSetoresOrigem()
            return fSetoresOrigem;
        public Setor getSetorOrigem()
            return fSetorOrigem;
        public void setSetorOrigem(Setor setorOrigem)
            fSetorOrigem = setorOrigem;
        private boolean primeiraExibicao()
            String idFerramentaExibicao =
                FacesContext.getCurrentInstance().getViewRoot().getRenderKitId();
            ResponseStateManager gerenciadorEstadoResposta =
                RenderKitUtils.getResponseStateManager(
                FacesContext.getCurrentInstance(), idFerramentaExibicao);
            return !gerenciadorEstadoResposta.isPostback(
                FacesContext.getCurrentInstance());
    }But when the user submits the form and the bean constructor is called again
    (this time the method ResponseStateManager.isPostBack() returns true ),
    in the else block in the constructor above, I need to fill fSetoresOrigem with
    other values and also the fSetorOrigem field because, of course, the fSetorOrigem
    field has to be a valid value that exists in the new fSetoresOrigem list.
    JSF is not complaining about the change to the list items, but it is complaining
    to the change to the fSetorOrigem field (the list value), even though it is a
    valid value present in the list. So I'm getting this error message:
    08:23:54,312 INFO  [lifecycle] WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
    sourceId=form:foco[severity=(ERROR 2), summary=(form:foco: Validation Error: Value is not valid), detail=(form:foco: Validation Error: Value is not valid)]I suppose that JSF is comparing the new value of the field fSetorOrigem with the value
    it has in the view state. As the value is different it is raising the error. That's
    what I suppose. But am I not able the change the value in the postback? I've already
    checked and the value is valid. It corresponds to a value that exists in the list.
    I really need a solution to this problem as I'm stuck with this and can't proceed until
    I find a solution to this. What I am doing wrong and how can I solve this?
    Thank you very much.
    Marcos

    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

  • Have a backing bean in request scope; need to access parameters sent to it

    I have a request scope backing bean in my app, 'projectBean'. This has a property called 'id'.
    /** in request scope in faces-config.xml */
    projectBean {
        id               // set by the param from the previous page
        downloadAction() // activated by commandlink, depends on id
    }There is another backing bean in session scope called 'projectListingBean', which has a dataTable that lists a bunch of projectBeans. In this 'projectListingBean', I can click on any row. That row, when clicked initializes a 'id' parameter, which is then passed to the new 'projectBean'. 'projectBean' then initializes itself based on the id.
    In the jsp page backed by 'projectBean', I also have a link to download something specific to that 'projectBean'. Naturally enough, I have a commandlink with actionBinding to a method in my 'projectBean', downloadXXXAction().
    The problem arises because the downloadXXX() method relies on a 'id'. Remember, this id was orinigally set 2 requests back from the datatable. Since the page backed by 'projectBean' is in request scope, the id is lost, and my method call doesn't work. I tried changing the scope of 'projectBean' to session, but JSF complains that I already setting the 'id' property as a param, I can't set the whole managed bean to something 'higher' like session.
    Of course, the ideal fix to this probelm would be the ability to have beans in page scope, but what other ways (hacks??) are there to get around this?

    Hi, I'm posting some code snippets if it helps with understanding the problem.
    faces-config.xml:
    <!-- PROJECTLISTINGBEAN -->
    <managed-bean>
         <managed-bean-name>projectListingBean</managed-bean-name>
         <managed-bean-scope>session</managed-bean-scope>
         <managed-property>
              <property-name>projectBeans</property-name>
              <property-class>java.util.List</property-class>
              <list-entries>
                   <value-class>
                        com.sun.sleuth.omcmweb.view.bean.ProjectBean
                   </value-class>
              </list-entries>
         </managed-property>
    </managed-bean>
    <!-- PROJECTBEAN -->
    <managed-bean>
         <managed-bean-name>projectBean</managed-bean-name>
         <managed-bean-class>
         </managed-bean-class>
         <managed-bean-scope>request</managed-bean-scope>
         <managed-property>
              <property-name>projectId</property-name>
              <property-class>java.lang.String</property-class>
              <value>#{param.projectId}</value>
         </managed-property>
    </managed-bean>projectlsting.jsp (page backed by projectListingBean)
    <h:dataTable value="#{projectListingBean.projectBeans}"
         var="projectBean" ...>
         <h:column>
              <f:facet name="header">
              </f:facet>
              <h:commandLink action="#{projectListingBean.viewProjectSUmmary}">
                   <h:outputText value="#{projectBean.projectId}" />
                   <f:param name="projectId" value="#{projectBean.projectId}" />
              </h:commandLink>
         </h:column>
    </h:dataTable>projectsummary.jsp (page backed by request scoped projectBean)
    <h:commandLink action="#{projectBean.assessmentAction}" value="..." />
    ...Flow:
    projectlisting.jsp (projectListingBean - session) -param id passed->
    projectsummary.jsp (projectBean - request) -commandLink clicked and id lost-->
    projectSummary.jsp (projectBean - request)

  • Creation of a Managed Bean in Request Scope?

    Is there an easy way to create an instance of a managed bean (configured in faces-config.xml) that was configured to be in the Request scope?
    If a JSP refers to it by id, then it will be there.
    However, when the JSP does not refer to it, it will not be in the request. I find I need to generate it anyway to use it from within another Managed Bean. I can extract out the faces-config information from the application map (available from FacesContext) and build it manually -- but this ties me to a particular JSF implementation (and probably version, too).
    Is there a more standardized way to do this?
    Thanks,
    ken

    BTW -- I mean to do this from within Java code (not jsp), and the page being rendered does not have a direct reference to the request-scoped managed bean via value binding.

  • In JDBC Sender Adapter , the server is Microsoft SQL .I need to pass current date as the input column while Executing stored procedure, which will get me 10 Output Columns. Kindly suggest me the SQL Query String

    In JDBC Sender Adapter , the server is Microsoft SQL .I need to pass current date as the input column while Executing stored procedure, which will get me 10 Output Columns. Kindly suggest me the SQL Query String , for executing the Stored Procedure with Current date as the input .

    Hi Srinath,
    The below blog might be useful
    http://scn.sap.com/community/pi-and-soa-middleware/blog/2013/03/06/executing-stored-procedure-from-sender-adapter-in-sap-pi-71
    PI/XI: Sender JDBC adapter for Oracle stored procedures in 5 days
    regards,
    Harish

  • Command Link in the af:table Component can not Work in the Request Scope

    Actually, the problem is that when we click on the command link, the action method #{overview.goToLinkAction} is not triggered.
    Here is the codes of action method "goToLinkAction" on the backing bean:
    public String goToLinkAction() {
    String linkString = (String) AdfFacesContext.getCurrentInstance()
    .getProcessScope().get("linkString");
    System.out.println("Link String is: " + linkString);
    return "";
    The data object list "listOfTransefer" for af:table is composed first time when the page is initialized.
    public void onPageLoad() {
    this.listOfTransfers = composeListOfTransfers();
    But when the commandlink or commandbutton is clicked to pose the form, this onPageLoad method is ignored by using PagePhaseListener:
    public void beforePhase(PagePhaseEvent event) {
    FacesPageLifecycleContext ctx =
    (FacesPageLifecycleContext)event.getLifecycleContext();
    if (event.getPhaseId() == Lifecycle.PREPARE_MODEL_ID && needReload()) {
    bc = ctx.getBindingContainer();
    onPageLoad();
    bc = null;
    public final boolean needReload() {
    if (!isPostback())
    return Boolean.TRUE;
    else
    return alwaysReload();
    protected boolean isPostback() {
    return Boolean.TRUE.equals(resolveExpression("#{adfFacesContext.postback}"));
    That means the method "onPageLoad()" may not be invoked when the commandlink is clicked.
    Is there any way to resolve this problem without changing the scope of the backing bean to "session"?
    Your response will be very helpful for us.
    Thanks

    Hi,
    if you implicitly say that this works if the managed bean is in session scope then the problems seems to me that one of your evaluation criterias is reset in the request scope, which I think most likely is the needReload() method. Did you add debug statements to the methods to see where exactly it gets stuck?
    Frank

Maybe you are looking for

  • IPod not recognized on USB hub

    What would cause an iPod Nano to charge while connected to a 1.1 USB hub, but not be recognized by Windows or iTunes? My brother connected his Nano to a USB keyboard port, and has lost it's charge. I've been able to get it to charge on my 1.1 USB hub

  • Error Logging

    I have created an error logging procedure for my application and i am using it in all my procedures. WHEN OTHERS THEN sp_log_error(...); RAISE; However, I want it to log the exception only in case the exception has been raised in the current proc and

  • Attachment to email from oracle applications

    We have a requirement to send the report output in pdf format to send to oracle applications users as an attachment to mail. i.e. User should get an email attachment of a report which he request from the submit request window. If any of you know abou

  • Dispatching an event from an itemRenderer

    Hello everybody, I can't find what is the best way to do that with spark. I have a SkinnableComponent that implements IDataRenderer (it owns a button called "addBtn"). I am using it as the itemRenderer of a dataGroup. The skin is a copy of ComboBox s

  • List of billing that has not been cancelled

    Is there a transaction or a way in SAP to show all the invoice that has not been cancelled? for example, a list of all the invoice of one customer that has not been cancelled. Showing only invoice with no reference of S1 cancellation invoice.