Assigning httpservice result in an array

Hi all,
I have been trying to call a httpservice and trying to assign
the result in an array as shown below
quote:
Code:
var grade:Array=userRequestReload.lastResult.servicelo
cations as Array;
// this is not working
For the corresponding code the httpservice tag used is:
quote:
Code:
<mx:HTTPService id="userRequestReload" useProxy="false"
method="POST" fault="defaultFault(event)"
result="reloadComboData()" />
I an not able to get the desired outcome. I tried setting the
resultFormat to array also but couldnt succeed.
Hope to get help soon.
Thanks

That question is generalizable to all of the resultFormats
that take XML and convert it to something, like the default
"object'. That conversion is a gray box, and you have little or no
control over it. Reading the doc on the "array" format is not
enlightening.
If you are getting xml from a data source, I advise using
e4x, so that you can control what the heck happens to your data.
Tracy

Similar Messages

  • 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()...

  • (HTTPService - result="" - to ArrayCollection) -  a question for super expert ;)

    Firstly look at my example then you will read the question:
    Look at example below - I'm using HTTPService component to retrieve data from SQL database
    (read_record.php is generating nice and tidy xml file with my data)
    <!-- (A) read  -->
    <!-- =================== HTTP SERVICE (read_record) ============================ -->
        <mx:HTTPService id="readTimed"
            url="http://www.pudelek.pl/SCRIPT/A/read_record.php"
            result="patient(event)">
        </mx:HTTPService>
    Then 'result' is calling a function patient() which task is to assign 'event.result'
    to ArrayCollection called 'A_patient_dp'  (this ArrayCollection is a data provider
    for a specific data grid)
    private function patient(event:ResultEvent):void {
        trace("A - PATIENT - loaded...")
        trace(event.result.patient.patient)
        A_patient_dp = event.result.patient.patient
    Everything looks great here, data grid shows all the data from xml file generated
    by read_record.php
    and now is my problem :
    I don't want to display all the data, I want HTTPService to retrieve only particular data
    which are described by variable {parametr} - this var is generated by my application
    I've dond it this way:
    <!-- (A) MAP POSITIONING -->
    <!-- =================== HTTP SERVICE (read_record) ============================ -->
        <mx:HTTPService id="readRequestA"
            url="http://www.pudelek.pl/SCRIPT/A/A_send_read_record.php"
                useProxy="false"
                method="POST">
            <mx:request xmlns="">
                <idstaff>{parametr}</idstaff>
            </mx:request>
        </mx:HTTPService>
    I'm looking into source of 'A_send_read_record.php' in the internet browser and I see
    exact data tree (filtered) which I need.
    The problem here is : how to call function patient(event:ResultEvent) and give it
    data from the event to be assigned to ArrayCollection - like in first example.
    Thanks for all the ideas !!

    If this post answers your question or helps, please mark it as such.
    Greg Lafrance - Flex 2 and 3 ACE certified
    www.ChikaraDev.com
    Flex / AIR Development, Training, and Support Services
    <mx:HTTPService id="readRequestA"
    url="http://www.pudelek.pl/SCRIPT/A/A_send_read_record.php"
    useProxy="false" result="patient(event)" method="POST">
      <mx:request xmlns="">
        <idstaff>{parametr}</idstaff>
      </mx:request>
    </mx:HTTPService>

  • Assigning a value to an array cell populated [BULK]

    Hi all,
    I've got a problem in assigning a value to an array populated with BULK COLLECT INTO .
    I can reproduce the problem with this
    CREATE TABLE TEST_TABLE (
    value1 NUMBER,
    value2 NUMBER
    INSERT INTO test_table VALUES(1,1);
    INSERT INTO test_table VALUES(1,1);
    INSERT INTO test_table VALUES(1,1);
    INSERT INTO test_table VALUES(1,1);
    INSERT INTO test_table VALUES(1,1);
    INSERT INTO test_table VALUES(1,1);
    INSERT INTO test_table VALUES(1,1);
    INSERT INTO test_table VALUES(1,1);
    INSERT INTO test_table VALUES(1,1);
    INSERT INTO test_table VALUES(1,1);And this is the PL/SQL anonymous block that gives me problems:
    DECLARE
      SUBTYPE t_rec IS TEST_TABLE%ROWTYPE;
    TYPE records_table IS TABLE OF t_rec;
      elist RECORDS_TABLE;
      CURSOR table_cursor IS SELECT * FROM TEST_TABLE WHERE rownum <= 20;
    BEGIN
      OPEN table_cursor;
      FETCH table_cursor BULK COLLECT INTO elist;
        FOR j IN 1..elist.COUNT
        LOOP
          elist(j)(1) := elist(j)(1) +1;
        END LOOP;
      CLOSE table_cursor;
    END; The error is
    ORA-06550: line 13, column 7:
    PLS-00308: this construct is not allowed as the origin of an assignment
    ORA-06550: line 13, column 7:
    PL/SQL: Statement ignored
    06550. 00000 -  "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error.
    *Action:So it doesn't compile because of this line of code:
    elist(j)(1) := elist(j)(1) +1;
    Why doesn't it work?
    If I try to do this, works perfectly:
    DECLARE
    TYPE v_num_table
    IS
      TABLE OF NUMBER;
    TYPE v_2_num_table
    IS
      TABLE OF v_num_table;
      v_nums V_2_NUM_TABLE := V_2_NUM_TABLE();
    BEGIN
      v_nums.EXTEND;
      v_nums(1) := v_num_table();
      v_nums(1).EXTEND;
      v_nums(1)(1) := 1;
      v_nums(1)(1) := v_nums(1)(1) +1;
      dbms_output.put_line(v_nums(1)(1) );
    END;Edited by: user10396517 on 2-mar-2012 2.35

    Variable "elist" is a collection of record, so you access an individual field of a given collection element by specifying the field name, not its position :
    DECLARE
      SUBTYPE t_rec IS TEST_TABLE%ROWTYPE;
      TYPE records_table IS TABLE OF t_rec;
      elist RECORDS_TABLE;
      CURSOR table_cursor IS SELECT * FROM TEST_TABLE WHERE rownum <= 20;
    BEGIN
      OPEN table_cursor;
      FETCH table_cursor BULK COLLECT INTO elist;
        FOR j IN 1..elist.COUNT
        LOOP
          elist(j).value1 := elist(j).value1 + 1;
        END LOOP;
      CLOSE table_cursor;
    END;Your second example is different as you're dealing with a collection of collections.

  • APP-PAY-07270 Message Error on Assignment Process Results

    Hi everybody !!
    I have encountered an error that it's very strange (almost for me...) and I'd like to someone help me understand what's going on. When I try to open de menu Assignment Process Results the following message appears, but in fact, I have defined the Bank Key Flexfield.
    APP-PAY-07270: This legislation has no bank keyflex structure defined. You cannot create payment methods for this legislation, because no bank keyflex structure has been defined for it. Your System Administrator should install the keyflex structure by loading the startup data for your current legislation.
    I guess there is something that I didn't do previously. Thanks in advance for any sort of help.
    Regards !!

    Hi Guru,
    Did you check -
    Error Saving A Salary Basis - pay_us_emp_dt_tax_rules.Insert_fed_tax_row (Doc ID 302878.1)
    Cheers,
    Vignesh

  • Prevent Mutiplues Retry Payroll Run at Assignment Process Results -disable

    Hi
    I would like to know how I can disable the "Retry checkbox" at Assignment Process Results form.
    We need to prevent the users form do multiple retries to their payroll run , also I know that if the user delete the queried payroll does this will roll his related payroll run data or not , and if that true how I can prevent that also .
    Thanks
    Bassem

    thanks
    so , how i can prevent that .
    and i need also to make users have (query/read)only privileges.
    bassem

  • How to execute a string formula and assign the result to a number field

    How to execute a string formula and assign the result to a number field
    Hi,
    we have a function that returns a string like this:
    '(45+22)*78/23'
    After we should calculate this string and assign the value to a numeric block field
    Example:
    k number(16,3);
    k:=fun1('(45+22)*78/23'); where fun1 execute and translate to number the string.
    Does exist a function like fun1 ??
    How can we do ?
    Regards

    Hello,
    this is the code that does the job:
    SQL> set serveroutput on
    SQL> DECLARE
    2 ch VARCHAR2(20) :='22+10' ;
    3 i NUMBER ;
    4 BEGIN
    5 EXECUTE IMMEDIATE 'select ' || ch || ' from dual' INTO i;
    6 dbms_output.put_line ('i = ' || TO_CHAR(i));
    7 END ;
    8 /
    i = 32
    Procédure PL/SQL terminée avec succès.
    SQL>
    just you have to do is to create a small stored function that take the string to calculate and return the number result
    Francois

  • Httpservice result strange

    When my HTTPService result comes back the 'event.result'
    variable always has an '\r\n\r\n' sequence at the beginning.
    How do I get rid of this ?
    I am simply feeding the httpService with an echo from a php
    script eg. echo "messageHere";
    Thanks for any advice.

    \r\n means, "carriage return followed by a new line". You've
    probably got some extra line breaks in your PHP script. You can get
    rid of them in flex using StringUtil.trim(event.result), but if you
    have whitespace characters you care about at the beginning or end
    of your event.result, you will lose them.

  • How can I multiply all values of a 4-element array with all of its inverse values resulting to an array having all 16 products?

    I'm quite new to LabVIEW (v.8.0) and I'm trying to figure out the easiest way to have a 4-element array multiplied by its inverse values resulting in a 16-element array
    Array 1 values = 1, 2, 3, 4
    Array 1 inverse values = 1, 0.5, 0.33, 0.25
    Resulting array = (1, 0.5, 0.33, 0.25, 2, 1, 0.66, 0.5, 3, 1.5, 1, 0.75, 4, 2, 1.32, 1)
    Any advice would be appreciated. Thanks!
    Solved!
    Go to Solution.

    Attachments:
    mo.doc ‏27 KB

  • How can I display all results of a array element in a TS2.0 NumericArrayMeasurement in a single report line?

    TestStand2.0 generates for each result property ( data, limits, status...) of each array element in a NumericArrayTest an extra line in the test report.
    How can I change this to display all result properties of one array element in a single line?
    How can I reduce the spaces between the property name and its value in the report?
    How can I delete the message: "Measurement[x]" and display only the Measurement Alias (named in the Edit Limits menu)?
    This means I like to change my report from:
    Measurement[0] (ADC1):
    Data: 5000
    Status: Passed
    Measurement[1] (AD
    C2):
    To:
    ADC1: Data: 5000 Status: Passed
    ADC2: ...

    Hi,
    What you can do, is use the Override Callbacks for Modify the Report that is Generated.
    Also you can also change the report sequence 'reportgen_txt.seq' to achieve the desired affect. If you go for modifying the report sequence then copy this to the User folder and then make your changes.
    In the Resources Library you can find simple examples were the report has been modified by either using the Override Callbacks or by modifying the actual sequence.
    One other item in the Report Options you will have to set the 'Select a Report Generator for Producing the Report Body' control to use the Sequence instead of the DLL.
    Hope this helps
    Ray Farmer
    Regards
    Ray Farmer

  • How to get dynamic query results from an array/structure

    I have an edit page that is set up to display phone number fields from the user stored in our database. The properties for the phone number fields are set by a structure of arrays. My problem is that when a user has more than 1 phone number in my database, my structures correctly show this on the form by displaying 2 phone numbers. The problem I am having is that when it shows multiple phone numebrs, it always shows the first result and just repeats it as opposed to dropping the 2nd or 3rd phone number in their respective fields.
    array and structure code below:
          <!--- Mobile --->
          <cfset mobile = StructNew()>
          <cfset mobile.dynamic = false>
          <cfset mobile.dynamicLabel = '+ Add'>
          <cfset mobile.fields = ArrayNew(1)>
    <cfif #checkuserv.recordcount# GT '0'>   
          <cfset mobile.fields[1] = StructNew()>
          <cfset mobile.fields[1].required = false>
          <cfset mobile.fields[1].label = 'Phone Number 1'>
          <cfset mobile.fields[1].displayIcon = false>
          <cfset mobile.fields[1].voice = true>
          <cfset mobile.fields[1].voiceChecked = true>
          <cfset mobile.fields[1].toolTip = "Please choose if you would like to receive a text or voice call on this number">
    </cfif>
    <cfif #checkuserv.recordcount# IS '2'>    
          <cfset mobile.fields[2] = StructNew()>
          <cfset mobile.fields[2].required = false>
          <cfset mobile.fields[2].label = 'Phone Number 2'>
          <cfset mobile.fields[2].displayIcon = false>
          <cfset mobile.fields[2].toolTip = "Please choose if you would like to receive a text or voice call on this number">
          <cfset mobile.fields[2].voice = true>
          <cfset mobile.fields[2].voiceChecked = true>
    </cfif>
    <cfif #checkuserv.recordcount# IS '3'>     
          <cfset mobile.fields[3] = StructNew()>
          <cfset mobile.fields[3].required = false>
          <cfset mobile.fields[3].label = 'Phone Number 3'>
          <cfset mobile.fields[3].displayIcon = false>
          <cfset mobile.fields[3].toolTip = "Please choose if you would like to receive a text or voice call on this number">
          <cfset mobile.fields[3].voice = true>
          <cfset mobile.fields[3].voiceChecked = true>
    </cfif>
    Here is the code for my fields that call the array info:
    <!--- Voice 1 --->      
            <cfloop index="i" from="1" to="#ArrayLen(mobile.fields)#">
                <cfif i EQ 1 OR NOT mobile.dynamic OR form.mobileDisplayed GTE i>
                    <cfparam name="form.areacode_#i#" default="">
                    <cfparam name="form.prefix_#i#" default="">
                    <cfparam name="form.suffix_#i#" default="">
                <div class="fieldBlock phoneBlock" id="phoneBlock#i#">
                    <label for="areacode_#i#">
                        <cfif mobile.fields[i].required><span>*</span></cfif>
                        <cfif mobile.fields[i].displayIcon><img src="/images/sm_phone.jpg" /></cfif>
                        #mobile.fields[i].label#:
                    </label>
                    <div class="inputBlock">
                        <input type="text" maxlength="3" onKeyUp="numTyped(this, 'prefix_#i#', 3, event)" name="areacode_#i#" id="areacode_#i#" class="areacode" value="#trim(left(checkuserv.sub_user_number, '3'))#" />
                        <input type="text" maxlength="3" onKeyUp="numTyped(this, 'suffix_#i#', 3, event)" name="prefix_#i#" id="prefix_#i#" class="prefix" value="#trim(mid(checkuserv.sub_user_number, "4", '3'))#" />
                        <input type="text" maxlength="4" name="suffix_#i#" id="suffix_#i#" class="suffix"  value="#trim(mid(checkuserv.sub_user_number, "7", '4'))#" />
                        <cfif StructKeyExists(mobile.fields[i], "voice") and mobile.fields[i].voice>
                            <div class="voice" id="voice#i#">
                                <input type="radio" value="0" name="voice_#i#"<cfif Not StructKeyExists(mobile.fields[i], "voiceChecked") or Not mobile.fields[i].voiceChecked> checked="checked"</cfif> />
                                <label>Text</label>
                                <input type="radio" value="1" name="voice_#i#"<cfif StructKeyExists(mobile.fields[i], "voiceChecked") and mobile.fields[i].voiceChecked> checked="checked"</cfif> />
                                <label>Voice</label>
                            </div>
                        </cfif>
                        <cfif StructKeyExists(mobile.fields[i], "toolTip") and mobile.fields[i].toolTip neq "">
                            <div class="toolTip" id="toolTip_#i#" title="#mobile.fields[i].toolTip#" onClick="alert('#mobile.fields[i].toolTip#')">?</div>
                        </cfif>
                    </div>
    <!--- This number was invalid or if geocoding failed, and they've picked a carrier to override, display the carrier override dropdown--->
                    <cfif ListFindNoCase(invalidMobileIndexList, i) or ( showMap and IsDefined("form.carrierOverride" & i) )>
                        <div id="carrierOverrideBox#i#" class="carrierOverrideBlock">
                            <label>Carrier:</label>
                            <div class="inputBlock">
                                <select name="carrierOverride#i#" id="carrierOverride#i#">
                                    <option value="-1">-- Pick your carrier --</option>
                                    <cfloop query="carriers">
                                        <!--- 1111 is voice, 0 is NONE, don't display  --->
                                        <cfif Not ListFindNoCase("0,1111", carriers.carrier_id)>
                                            <option value="#Trim(carriers.carrier_id)#"<cfif IsDefined("form.carrierOverride" & i) and form["carrierOverride" & i] eq Trim(carriers.carrier_id)> selected="selected"</cfif>>#Trim(carriers.carrier_title)#</option>
                                        </cfif>
                                    </cfloop>
                                </select>
                                <a href="http://www.inspironlogisticscontact.cfm?account_id=#account_id#&carrierOverride=1"
                                       title="Carrier help"
                                       onClick="window.open('http://www.inspironlogisticscontact.cfm?account_id=#account_id#&carrierOverride=1','#accou nt_id#','width=500,height=800,scrollbars=no,screenX=100,screenY=100,top=100,left=100,resiz able=1'); return false;"
                                      >?</a>
                            </div>
                        </div>
                    </cfif>
                    <cfif mobile.dynamic AND i EQ form.mobileDisplayed AND i LT ArrayLen(mobile.fields)>
                    <div class="dynamicAddBlock dynamicAddMobileBlock" id="dynamicAddmobile_#i#">
                          <a href="javascript: submitAddField('mobile')">#mobile.dynamicLabel#</a>
                    </div>
                    </cfif>
                </div>
                </cfif>
            </cfloop>
            <cfif mobile.dynamic>
                <input name="mobileDisplayed" id="mobileDisplayed" value="#form.mobileDisplayed#" type="hidden" />
            </cfif>
            <input name="carrierOverrideActive" id="carrierOverrideActive" value="<cfif carrierOverrideActive>1<cfelse>0</cfif>" type="hidden" />
    I have been stuck on this for days, finally turning to the forum today with a few different issues. I hate trying to work within the framwork of other peoples code.
    I use coldfusion 8

    I broke the chunk of code away from the page and am now getting teh phone numbers in the right spots, but I am still getting a coldfusion error.
    Element 2 is undefined in a Java object of type class coldfusion.runtime.Array.
    Here is my code...
    <cfset invalidMobileIndexList = "">
    <cfset showMap = false>
    <cfset carrierOverrideActive = false>
    <!--- Voice 1 --->       
            <cfloop index="i" from="1" to="#ArrayLen(mobile.fields)#">
    <!------>            <cfif i EQ 1 OR NOT mobile.dynamic OR form.mobileDisplayed GTE i>
                    <cfparam name="form.areacode_#i#" default="">
                    <cfparam name="form.prefix_#i#" default="">
                    <cfparam name="form.suffix_#i#" default="">
                <div class="fieldBlock phoneBlock" id="phoneBlock#i#">
                <label for="areacode_#i#">
                        <cfif mobile.fields[i].required><span>*</span></cfif>
                        <cfif mobile.fields[i].displayIcon><img src="/images/sm_phone.jpg" /></cfif>
                        #mobile.fields[i].label#:
                    </label>
                    <cfoutput query="checkuserv" ><div class="inputBlock">
                        <input type="text" maxlength="3" onKeyUp="numTyped(this, 'prefix_#i#', 3, event)" name="areacode_#i#" id="areacode_#i#" class="areacode" value="#trim(left(checkuserv.sub_user_number, '3'))#" />
                        <input type="text" maxlength="3" onKeyUp="numTyped(this, 'suffix_#i#', 3, event)" name="prefix_#i#" id="prefix_#i#" class="prefix" value="#trim(mid(checkuserv.sub_user_number, "4", '3'))#" />
                        <input type="text" maxlength="4" name="suffix_#i#" id="suffix_#i#" class="suffix"  value="#trim(mid(checkuserv.sub_user_number, "7", '4'))#" />
                        <cfif StructKeyExists(mobile.fields[i], "voice") and mobile.fields[i].voice>
                            <div class="voice" id="voice#i#">
                                <input type="radio" value="0" name="voice_#i#"<cfif Not StructKeyExists(mobile.fields[i], "voiceChecked") or Not mobile.fields[i].voiceChecked> checked="checked"</cfif> />
                                <label>Text</label>
                                <input type="radio" value="1" name="voice_#i#"<cfif StructKeyExists(mobile.fields[i], "voiceChecked") and mobile.fields[i].voiceChecked> checked="checked"</cfif> />
                                <label>Voice</label>
                        </cfif></div></cfoutput>
                        <cfif StructKeyExists(mobile.fields[i], "toolTip") and mobile.fields[i].toolTip neq "">
                            <div class="toolTip" id="toolTip_#i#" title="#mobile.fields[i].toolTip#" onClick="alert('#mobile.fields[i].toolTip#')">?</div>
                        </cfif>
                    </div>
                    <!--- This number was invalid or if geocoding failed, and they've picked a carrier to override, display the carrier override dropdown--->
                    <cfif ListFindNoCase(invalidMobileIndexList, i) or ( showMap and IsDefined("form.carrierOverride" & i) )>
                        <div id="carrierOverrideBox#i#" class="carrierOverrideBlock">
                            <label>Carrier:</label>
                            <div class="inputBlock">
                                <select name="carrierOverride#i#" id="carrierOverride#i#">
                                    <option value="-1">-- Pick your carrier --</option>
                                    <cfloop query="carriers">
                                        <!--- 1111 is voice, 0 is NONE, don't display  --->
                                        <cfif Not ListFindNoCase("0,1111", carriers.carrier_id)>
                                            <option value="#Trim(carriers.carrier_id)#"<cfif IsDefined("form.carrierOverride" & i) and form["carrierOverride" & i] eq Trim(carriers.carrier_id)> selected="selected"</cfif>>#Trim(carriers.carrier_title)#</option>
                                        </cfif>
                                    </cfloop>
                                </select>
                                <a href="http://www.inspironlogistics.com/wens/contact.cfm?account_id=#account_id#&carrierOverride= 1"
                                       title="Carrier help"
                                       onClick="window.open('http://www.inspironlogistics.com/wens/contact.cfm?account_id=#account_id#&carrierOverride= 1','#account_id#','width=500,height=800,scrollbars=no,screenX=100,screenY=100,top=100,left =100,resizable=1'); return false;"
                                      >?</a>
                            </div>
                        </div>
                    </cfif>
                    <cfif mobile.dynamic AND i EQ form.mobileDisplayed AND i LT ArrayLen(mobile.fields)>
                    <div class="dynamicAddBlock dynamicAddMobileBlock" id="dynamicAddmobile_#i#">
                          <a href="javascript: submitAddField('mobile')">#mobile.dynamicLabel#</a>
                    </div>
                    </cfif>
                </div>
                </cfif>
            <cfif mobile.dynamic>
                <input name="mobileDisplayed" id="mobileDisplayed" value="#form.mobileDisplayed#" type="hidden" />
            </cfif>
            <input name="carrierOverrideActive" id="carrierOverrideActive" value="<cfif carrierOverrideActive>1<cfelse>0</cfif>" type="hidden" /><!------>
           </cfloop>

  • 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.

  • Using HTTPService results for WebService

    Here's the deal.  I am using an HTTP request to get the Session Variables that I need to use in a Web Service.  How do I time it so that the resutls from the HTTP request are used in the Web Service request?  Do/Can I bind them?  Do I need to set a trigger to wait for the HTTPService to return and then run the Web Service?
    Thanks in advance.

    Note: The only solution I've found so far is to put the web service call in the results function after the HTTPRequest returns with a positive result.

  • HTTPService results cached in IE

    Hi,
    I am embedding flex in a web application. I am using
    HttpService to send request and get data to be displayed. I don't
    want flex to cache my results as when I send the same request
    again, it returns data from the cache and not the new set which
    might have changed.
    Thanks!

    If you use "POST" instead of "GET", the result should not get
    cached. Try that first.
    If that does not work for you, append a unique string to the
    HTTPService url before invoking send. The will always prevent
    caching

  • Assigning a result to two variables

    I am trying to assign a string result from a step to two seperate variables, namely Step.Result.ReportText, and a local or file global. I can do this with a post expression, but it would be convenient just to do it with an expression tied to the output of a vi.  I haven't been able to find any expression syntax that works. Does anybody know if this is even possible?
    I need the expression to do the following:
    Assign the output of a vi to Step.Result.ReportText
    And
    Assign the output of the same vi to FileGlobal.XXX
    Any hints?

    rimfire44 wrote:
    Jigg,
    I want to use the content of the Step.Result.ReportText in a post step callback, but as soon as I step into the callback the step properties for the calling step go out of scope and are not accessible. The file global gets around that, so if I could have assigned the desired text to both spots in one fell scoop it would have saved me a little time. Looks like a post expression is the way to go.
    You could try PreviousStep.Result.ReportText
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

Maybe you are looking for