Can't set public Object in HTTPService result listener

Hello.
I am using a data object class.  The class is based on a class that contains the HTTPService calls.  I want to return the event.results to the local instance of the class by setting a public Object = the results Object. However, the public object is null after the HTTPService event result listener function is finished.
It is easier to see than to describe:
In the main application. i make an instace of my activity class:
myactivity:activity = new activity() ;
now, I invoke the getdata method:
myactivity.getdata() ;
The getdata() method fails at runtime, because it tries to reference the results object.
See the base class and the activity class below.
BASECLASS: (just the main parts are listed here):
public class transferObject
        public var baseurl:String ;
        public var dbresult:Object =new Object();
        public var service:HTTPService ;
        public function transferObject()
        geturl("ghost") ;
        public function geturl(db:String) : void
                baseurl = "https://xyzzy/" ;
        public function getHttpService(methodname:String):void {
                service = new HTTPService();
                service.url = this.baseurl + methodname;
                service.channelSet ;
                service.method = "POST";
                service.addEventListener("result", httpResult );
                service.addEventListener("fault", httpFault);
                service.send();
           public function httpResult(event:ResultEvent):void {
                dbresult = event.result ;
//DBRESULT IS THE OBJECT I WANT TO REFERENCE IN THE DERIVED CLASS
             //Do something with the result.
            public function httpFault(event:FaultEvent):void {
                var faultstring:String = event.fault.faultString;
                Alert.show('Error sending data: '+faultstring+' '+event.fault);
HERE IS THE DERIVED CLASS:
package dataObjects
    public class activity extends transferObject
    import mx.controls.Alert ;   
[Bindable]
public var event_id:String ;
[Bindable]
public var description:String ;
       public function activity()
            super();
        public function getdata():void
            getHttpService("eventually.sendtest") ;
          this.event_id = dbresult.result.activities.activity.getItemAt(0).event_id ;
----> THE LINE ABOVE FAILS AT RUN TIME BECAUSE THE DBRESULT OBJECT IS NULL
THANK YOU FOR ANYHELP YOU CAN PROVIDE

Sorry, but parameters of a ServeletRequest can not be modified. Look at the javadocs on ServeletRequest and you will see that "getParameterMap" returns an immutable Map. JSF is simply wrapping that method call with their own "getRequestMap" method. Setting an attribute, request.setAttribute(name, object), is how you pass things using the request to servlets, jsps, etc. on down the line. Just get the attribute instead of the parameter where you need it. Set your "parameter" in the attributes, down the line, check the attribute first, if it exists, use it, otherwise look for the parameter.

Similar Messages

  • How can I set the Object Name to the file name on import?

    All-
    I've been manually typing the filename into Aperture's Object Name metadata field. Is there a way to do this automatically? I use metadata presets to fill in many other fields on import but haven't found a way to set metadata fields on a file-by-file basis.
    Perhaps there's a way to do this with the thousands of images already in my library as well...
    Thanks,
    Andreas

    Here's the cleaned-up version:
    tell application "Aperture"
    set selectedImages to the selection
    repeat with i in selectedImages
    set tName to name of i
    set value of IPTC tag "ObjectName" of i to tName
    end repeat
    end tell
    Some other related bits, which you can probably work out how to put into the above script:
    Find out the AppleScript names of the IPTC tags (but only tags which have a value for that image), the names will be listed in the 'result' pane in the Script Editor:
    tell application "Aperture"
    set selectedImages to the selection
    get name of every IPTC tag of item 1 of selectedImages
    end tell
    The same for EXIF tags:
    tell application "Aperture"
    set selectedImages to the selection
    get name of every EXIF tag of item 1 of selectedImages
    end tell
    And for any custom tags you have set up. If you haven't set up any custom tags (one of my main reasons for going with Aperture) this will just return camera and picture time zones:
    tell application "Aperture"
    set selectedImages to the selection
    get name of every custom tag of item 1 of selectedImages
    end tell
    Finally, keywords:
    tell application "Aperture"
    set selectedImages to the selection
    get name of keywords of item 1 of selectedImages
    end tell
    To grab the first keyword name try 'name of keyword 1 of...' etc.
    To grab the parent keywords for hierarchical keywording stuff try experimenting with 'get parents of keywords of'. The keywords seem to be read-only from AppleScript, so a magic script that added all parent keywords doesn't seem to be possible.
    Ian

  • Can I set public permissions for the Training Catalog?

    We want to have all users be able to get into the Training Catalog and self enroll. We have over 7,000 employees with no distribution list for all people. How do I set permissions for all employees to see the training catalog and self enroll?

    Ah, support strikes again. The Training catalog is not, and cannot be set to publicly viewable. This permission setting is only available to objects in the Content Library.
    If you go to the Training Tab and then Training Catalog you will see an option to Set Permissions for the Training Catalog. Select that and you will be able to add any individual or group from the list on the left to the list on the right to give them view permissions. There will be no "Make Publicly Viewable" option.
    If an individual is not listed in the right hand list (or a member of a group on the right hand list), then they will get the Not Authorized message.

  • Can you set arraycollection objects to certain states?

    hey guys.. so in my application, i need to setup rules and permissions for certain users...
    so basically my applicaion initially displays a login screen, on login success its going to get a variable from the server which says if the user has all or video access
    the way i have my "login success" component setup is i have an array collection and i have states
    basically if the user has "all" access then the user shoudl be able to see everythign in that array collection. and if the user has "video" access the the user shoudl onlly see the video option in the list
    the code i have is
         <fx:Declarations>
              <!-- Place non-visual elements (e.g., services, value objects) here -->
              <s:ArrayCollection id="webCoreSourceData">
                   <fx:Object label="Content Group" stackId="contentGroup" />
                   <fx:Object label="Images" stackId="images" />
                   <fx:Object label="Image Renderer" stackId="imageRender" />
                   <fx:Object label="Videos" stackId="videos" />
                   <fx:Object label="Flash Objects" stackId="flashObjects" />
                   <fx:Object label="Story Editor" stackId="storyEditor" />
                   <fx:Object label="Tag Management" stackId="tagManagement" />
                   <fx:Object label="Image and Video Format" stackId="format" />
                   <fx:Object label="Rules And Permissions" stackId="rulesAndPermissions" />
              </s:ArrayCollection>
         </fx:Declarations>
         <s:states>
              <s:State name="all" />
              <s:State name="videoUpload" />
              <s:State name="imageUpload" />
              <s:State name="contentGroup" />
              <s:State name="flashObjects" />
         </s:states>
            <list dataprovider="webCoreSourceData" />
    i need to set each one of these arraycollection objects to a certain state, so when i set "currentState=videoUpload" then only video displays in the list component
    and when i set my "currentState="all"" then i want to be able to all the objects in the arraycollection
    any help is greatly appretiated!! thank you...

    Hi,
    There are a few things you can do, one is to filter the array on change of state you could have it that your dataprovider is different for each state then you do something like below. This might give you some sort of direction anyway..
    David
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
       xmlns:s="library://ns.adobe.com/flex/spark"
       xmlns:mx="library://ns.adobe.com/flex/mx">
    <fx:Script>
    <![CDATA[
    import mx.events.FlexEvent;
    ]]>
    </fx:Script>
    <s:states>
    <s:State name="State1"/>
    <s:State name="ImageState"/>
    <s:State name="VideoState"/>
    <s:State name="OtherState"/>
    </s:states>
    <fx:Declarations>
    <s:ArrayCollection id="Videos">
    <fx:Object label="Video1" />
    <fx:Object label="Video2" />
    <fx:Object label="Video3" />
    <fx:Object label="Video4" />
    </s:ArrayCollection>
    <s:ArrayCollection id="Images">
    <fx:Object label="Image1" />
    <fx:Object label="Image2" />
    <fx:Object label="Image3" />
    <fx:Object label="Image4" />
    </s:ArrayCollection>
    <s:ArrayCollection id="OtherStuff">
    <fx:Object label="OtherStuff1" />
    <fx:Object label="OtherStuff2" />
    <fx:Object label="OtherStuff3" />
    <fx:Object label="OtherStuff4" />
    </s:ArrayCollection>
    <s:RadioButtonGroup id="radiogroup1"/>
    </fx:Declarations>
    <s:List id="myList" x="163" y="85" width="271" height="386"
    dataProvider.VideoState="{Videos}"
    dataProvider.ImageState="{Images}"
    dataProvider.OtherState="{OtherStuff}"/>
    <s:Button y="15" label="Video" x="160" click="currentState='VideoState'"/>
    <s:Button y="15" label="Image" x="240" click="currentState='ImageState'"/>
    <s:Button y="15" label="Other" x="320" click="currentState='OtherState'"/>
    </s:Application>

  • Can I pass an Object THROUGH to a LISTENER?

    I created a class called FuncSelect(), whose constructor takes a JDBCClass object as an argument.
    public FuncSelect( JDBCClass dbApp) {
    }Passing in this object allows FuncSelect() to reference JDBCClass's Session object and various methods.
    FuncSelect implements a listener, which in turn calls method postUpdate(), which needs to reference the dbApp.Session object -- however, I'm getting hung up trying to figure out how pass dbApp through to the listener:
        class OKListener implements ActionListener {
            public void actionPerformed(ActionEvent e ) {
                postUpdate() ;  // <--- need to pass dbApp to this method!!!!
        }Confused? Again need to pass dbApp object as follows:
    FuncSelect(JDBCClass dbApp) --> OKListener( ActionEvent e, JDBCClass dbApp) --> postUpdate(JDBCClass dbApp ).
    Do I need an abstract class for this? Any samples out there?
    Thanks for any assistance.

    There's nothing that says that your listener can't have more than just an actionPerformed method. Add a method (or a constructor) to your listener that accepts a JDBCClass object just like the FuncSelect class does.
    class OKListener implements ActionListener {
      private JDBCClass dbApp = null;
      public OKListener() { super(); }
      public OKListener (JDBCClass dbApp) {
        super();
        this.dbApp = dbApp;
       public void actionPerformed(ActionEvent e ) {
       postUpdate(dbApp) ;  // <--- need to pass dbApp to this method!!!!       
    }

  • Set Date object to 4:00 pm

    Hi
    How can I set date object to 4:00pm current day.
    I will have to find difference in milliseconds long value starting from 1st january 1970 till today 4:00 pm.
    But how, can I find this value.
    Thanks

    Will below code snippet give me 4:00pm time for current day !
      DateFormat dfm = new SimpleDateFormat("HH:mm:ss");
      Date pm4 = dfm.parse("16:00:00");

  • Access Subform - Can the Subforms Source Object be defined by an SQL SP result set?

    Hi Guys,
    I can't clearly answer this question with a yes or no.
    I have an Access Sub Form that I am populating with a record set from a Store Procedure. Fairly early on I discovered that for this to work correctly the Source Object for the Sub Form Control must be set first, and most examples (including a working version
    of my own) achieve this by defining an Access Query and setting the Source Object to this.
    What I would really like to do is define the Source Object using the results of a SQL Store Procedure using ONLY code within VBA.
    Now before anyone starts providing alternatives "why don't you just..."  I'm noting now that I have a semi complex solution that makes most non-VBA based approaches ineffective. While it does work at present with an Access Query I'm needing
    to make the result set more dynamic meaning in future I will not know how many columns will be returned or the name of them, only the SP will have this information.
    Thanks in advance!

    Well after much trial and error I've got something which does what I want, although I'm not thrilled that I couldn't do this via my existing ADODB connections, in any case example provided below;
        Dim db As DAO.Database
        Dim qdf As New DAO.QueryDef
        Set db = CurrentDb()
       'qryMyTest refers to a dummy Access query (non pass through). 
        With db.QueryDefs("qryMyTest")
            .Connect = CurrentDb.TableDefs("tblSomeTestSQLTable").Connect
            .SQL = "exec sp_MyTestSP"
            Me.subfrmTest1.SourceObject = "Query.qryMyTest"
        End With   
        Set qdf = Nothing
    I've also marked your response Alphonse as an answer as it lead me onto the right path.

  • How to set XML.ignoreWhitespace = false; in HttpService /Result?

    Please ask these kind of questions on flexcoders or the Adobe Flex Forums.  This is for development of the SDK itself.<br /><br />Matt<br /><br /><br />On 11/17/08 12:56 AM, "venubwal" <[email protected]> wrote:<br /><br />A new discussion was started by venubwal in<br /><br />Developers --<br />  How to set XML.ignoreWhitespace = false;  in HttpService /Result?<br /><br />I want to carry/preserve Leading & trailing spaces<white spaces> in event's result....<br />I am using service as :<br />_webService = new HTTPService();<br />_webService.url = serviceUrl;<br />_webService.method = "POST";<br />_webService.resultFormat = "e4x";<br />......<br />...Again i am checking it as -in<br />private function serviceResultHandler(event:ResultEvent):void<br />        {<br />        stopExecution();<br />        var doc:XMLDocument = new XMLDocument();<br /> doc.ignoreWhite = false;<br />        XML.ignoreWhitespace = false;<br />doc.parseXML(event.result as XML);<br />       Alert.show(event.result.toString(),"....serviceResultHandler...");<br /><br />But, i am not able see L&T spacesin alert() where I can see L&T spaces in Servlet/Java side which assigned as metaResponse<br />as....<br />      OutputStream writer = response.getOutputStream();<br />      OutputStreamWriter outputStreamWriter = new OutputStreamWriter(writer,"UTF-8");<br />JaxbSerializationUtil.serializeObjectToWriter(outputStreamWriter, metaResponse);<br /><br />________________________________<br />View/reply at How to set XML.ignoreWhitespace = false;  in HttpService /Result? <a href=http://www.adobeforums.com/webx?13@@.59b70bd4><br />Replies by email are OK.<br />Use the unsubscribe <a href=http://www.adobeforums.com/webx?280@@.59b70bd4!folder=.3c060fa3>  form to cancel your email subscription.

    By Using XML.ignoreWhitespace = false; <br />I am able to Store/Carry/Save L&T white spaces in XML and i can retrive values with whitespaces...<br /><br />It is in case of loading from Java<DB> to Flex.<br /><br />But the actual problem is with xmlObject.toString()/toXMLString()<br />is not able to carry whitespace, while it should carry as parameter to Java Servlet..so that it can be get using request.getParameter() [..then it is serializing/deserializing]<br /><br />So, how i can preserve the L&T whiteSpaces on XML.toString()/toXMLString() method.<br /><br />OR else<br />How we can set Http request attribute in Flex, so that we can use ( AnY_Object)request.getAttribute()...

  • Can you set object style to Fit to Content?

    Hi all,
    I'm setting up a document for an exhibition showguide and before I get too bogged down, I could do with some help.
    Each exhibitor gets a text entry, with a logo alongside. There will be a few hundred exhibitors in total.
    To make things as easy as possible (I hope) I've made a anchored image frame to hold the logos (40mm wide x 40mm tall), which is anchored to the Company Name. This should mean that the logo stays with the correct entry at all times.
    Once I've put my text in, I will have a couple of hundred empty image frames into which I can drag and drop the logos. I've set the 'Fitting on Empty Frame' to Fit Content Proportionally so that the logos all fit nicely.
    The problem is that, after I have placed all the logos into the document, I want to make all the anchored logo frames change from Fit Content Proportionally, to FIt Frame to Content, so that the frame will shrink around any logos that are less than 40mm tall.
    I can't find a way of doing this.
    Is there a way to select all anchored objects, so that I can change the Fit setting in one hit?
    Or, is there a way to set the object style to Fit Frame to Content?
    I feel that I should be able to automate this, but the process/solution is eluding me.
    Cheers
    Colin

    As far as I know, the only way to do this would be by script after the images have all been placed. You should ask over in scripting.

  • Error -10006 can't set object or data to object or data

    Hi
    Tripped up again by a silly error, I am trying to update an item in a record list but keep getting error -10006
    Code below simplified but still produces the error, all help gratefully received.
    set filePath to "/Users/Ours/Documents/Text File.txt"
    set recordList to every paragraph of (read filePath) -- get all records
    set AppleScript's text item delimiters to ","
    set (text item 1 of item 1 of recordList) to "Ninth"
    message is :
    tell current application
      read "/Users/Ours/Documents/Text File.txt"
      --> "First,Second,Third
    Result:
    error "Can’t set text item 1 of \"First,Second,Third\" to \"Ninth\"." number -10006 from text item 1 of "First,Second,Third"

    You can't set text items directly like that. first convert the text to a list of text items, alter the list, then convert it back to text:
    set filePath to "/Users/Ours/Documents/Text File.txt"
    set recordList to every paragraph of (read filePath) -- get all records
    set {oldTID, AppleScript's text item delimiters} to {my text item delimiters, ","}
    set tempList to text items of recordList
    set item 1 of tempList to "Ninth"
    set recordList to tempList as text
    set AppleScript's text item delimiters to oldTID

  • Can't use SecKeyRef and similar functions, when "Compile sources as" is set to "Objective c  "

    Hi, need to access SecKeyRef funcion and some other similar ones, but i can't access them, when my compiler option "Compile sources as" is set to "Objective c++". When it is set to "According to a file type", i dont get any errors with those funcions, but my old code starts to get errors. What should i do? I have tryed everything and still no luck...
    I'm using xcode 4,6 and app is for iOS6.

    I got my problem fixed. I was getting errors, with some failas that were importing <cmath><limits> etc. I renamed their extensions to .mm and set compile sources as to "According to a file type".
    Now wait a second. So if my apps target is iOS6.1 , apple will no longer accept my app? I didn't heard nothing about it...

  • Can't set search results to open in new tab

    I have tried to set google search to open results in a new tab but it continues to open in the same window as the search. I am using windows vista ultimate x64 and Firefox 4.01.

    I do not know of any way to specify only some bookmarks to open in a new tab. You could middle-click on a bookmark to make it open in a new tab.
    There are add-ons that can make all bookmarks open in a new tab, such as:
    * [https://addons.mozilla.org/en-US/firefox/addon/13784/ Open Bookmarks in New Tab]
    * [https://addons.mozilla.org/en-US/firefox/addon/1122/ Tab Mix Plus]
    * [https://addons.mozilla.org/en-US/firefox/addon/59961/ Tab Utilities]
    * [https://addons.mozilla.org/en-US/firefox/addon/62581/ Tab Utilities Lite]
    * [https://addons.mozilla.org/en-US/firefox/addon/14439/ Tabberwocky]
    All but the first of those will add many other tab browsing features. There will be other tabbed related add-ons that can open all bookmarks in a new tab, you can find them by searching https://addons.mozilla.org/

  • Can I set a destination object with command line

    I have installed sun java system message queue 3.5 with sp1. Course of I can not run admin console, I want to know if I can set destination object with command.
    Thanks

    all admin console functions are supported through the
    command line administration tools
    To change attributes on a destination administered
    object, use imqobjmgr
    http://docs.sun.com/source/817-3727/adminobj.html#wp14381
    To create and administer physical destinations on the broker
    use imqcmd
    http://docs.sun.com/source/817-3727/brkrmgmt.html#wp19759

  • How can I set my folio to 'public'  (created in 'Digital Publishing Suite' folio-builder & producer)

    Hi guys,
    I have created a book in Indesign and published it Folio Builder and put it online with Folio Producer.
    Now I would like to have my client and a group of reviewers to view it online on their tablets, but they can't. I have invited them using the 'share' menu, they created an adobe ID, downloaded the viewer app, but they still can't.
    My feeling is that it is because I can not set my folio to be published 'public' (please see screenshot).
    Now my question is why can't I set the folio to 'public'?
    I am a Adobe creative cloud member.

    You need a DPS Professional or an Enterprise Account to publish as Public, With Adobe Creative Cloud workflow, you can create an app by using 'Create App' command from Folio Builder Panel.
    Now to share the folio with reviewers, just share the folios with the Adobe id's using the Share button (Two figures) in Folio Producer. Your reviewers will need to download Adobe Content Viewer from App store, login with their id's and then they can download and check out the folio.

  • Can not set OARG.cstAllcAcc field value with CustomsGroups Object

    Can not set OARG.cstAllcAcc field value with CustomsGroups Object, please open this field in this Object because it is a key field related to financial system.

    I guess, it should work; instead of html:submit, try with button.

Maybe you are looking for

  • Ipad 4 cannot restore Os 6.1 error (-1)

    Dear all, When restoring my ipad 4 32gb wifi + cellular from 6.0.1 to 6.1, it always apears the msg unkown error occurred (-1). When restore to 6.0.1 with Shift restore it occurred error 3194. I tried another computer but it doesn t help. Now my ipad

  • SSAS Tabular - return number of days in given month using month's start date?

    Is there a way to return the number of days in a month by providing just the month date or month start date? We have a time table, but it is at monthly (not daily) granularity. So I can't just count rows between start/end of month. I need to be able

  • Modify Crystal financial statements in 8.81

    I've been asked to modify the Crystal P&L. I was shocked to see that it doesn't even reference OACT in the Field Explorer. Almost all the fields are PLD__Items. If I try to browse the field data, Crystal goes looking for an xml file. Has anyone ever

  • Constrain File to Course

    Hi, I'm using a click box to link to a file and the file is opening in a separate window where it shuts down the course which would cause the user to have to log back in.   Can anyone tell me what I need to change in the properties to have the file o

  • Stopping labview loop when terminating teststand

    Hi, If I have a labview step which is called from teststand, which is in a loop, what property can I query (or does one exist), where I can conditionally exit my labview loop when the "terminate" button is pushed in teststand?  I see there are "termi