Insert control text property inside httpservice url

I am trying to insert a DateField.text property inside of the
url field for HTTPService in the script portion. I have
successfully tested with setting the url field with a location and
calling the .send() for results with a button. How do I base the
url off of a variable? Here is my code I am using to call the
HTTPService and this works if I set the full line.
public function changeDate():void {
srv.url = "
http://mydomain.com/temp/2008-03-21.xml";
srv.send();
I am trying to pull the text property from a DateField with
an id of dF. This fails though.What do I need to correct?
public function changeDate():void {
srv.url = "'
http://mydomain.com/temp/' +
{dF.text} + '.xml'";
srv.send();

Ok, thank you for the help. I got it working!
Here was the final function.
public function changeDate():void {
srv.url = "
http://mydomain.com/temp/" +
dF.text + ".xml";
srv.send();
}

Similar Messages

  • Insert variables from script into HTTPService url

    I'm trying to insert values from script into a HTTPService
    url. How do I go about doing this? I tried the code below, but it
    gives an error. Can anybody help?
    <mx:HTTPService
    id="httpCall"
    url="
    http://api.service.com/user/{userName}/list?count={apiCount}&offset={(apiOffset)}&sort={ap iSort}&appkey=1234"
    resultFormat="e4x"
    result="callHandler(event);"
    fault="httpFaultHandler(event);"
    showBusyCursor="true"
    />
    <mx:Script>
    <![CDATA[
    import mx.controls.Alert;
    import mx.rpc.events.FaultEvent;
    import mx.rpc.events.ResultEvent;
    [Bindable]
    private var userName:String = "myName";
    private var apiCount:uint = 10;
    private var apiOffset:uint = 0;
    private var apiSort:String = "desc";

    Set the HTTPService properties in an AS function.
    <mx:HTTPService id="httpCall" resultFormat="e4x" ...
    result="callHandler(event);" ...../>
    private function getUserData():void
    var sURL:String = "
    http://api.service.com/user/"
    _ userName + "/list:;
    var oRequest:Object = {count:apiCount,offset:apiOffset,
    sort:apiSort, appkey:"1234" }
    httpCall.url = sURL;
    httpCall.send(oRequest);
    Tracy

  • Update Text Property Inside Other Containers

    Calling all Flexpertz!!
    Hi , I am trying to update a textarea text property with ActionScript that I have nested inside a vbox, inside a panel, inside a canvas.  While debugging, I notice that the textarea object is null if its nested inside other containers.  But if I allow it to be outside, I can set the text just fine.
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at ....
    Any ideas?

    The following code shows three ways to change the text of the TextArea:
    - In ActionScript in a Button inline "click" handler
    - In ActionScript in a Button "click" handler in a Script tag
    - In ActionScript without using ID
    If this post answered your question or helped, please mark it as such.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
        <mx:Script>
            <![CDATA[
                import mx.core.Container;
                private function setByID():void{
                    myTxt.text = "Set by ID - ActionScript in Script Tag";
                private function setWithoutIDHandler(evt:MouseEvent):void{
                    setWithoutID(evt.currentTarget.parent as Container);
                private function setWithoutID(container:Container):void{
                    for each(var obj:Object in container.getChildren()){
                        if(obj is Container){
                            setWithoutID(obj as Container);
                        }else if(obj is TextArea){
                            TextArea(obj).text = "Set without ID";
    ]]>
    </mx:Script>
        <mx:VBox>
            <mx:Panel>
                <mx:Canvas>
                    <mx:TextArea id="myTxt" text="initial text" width="800"/>
                </mx:Canvas>
            </mx:Panel>
        </mx:VBox>
        <mx:Button label="Set by ID - Inline ActionScript" click="myTxt.text='Set by ID - Inline ActionScript'"/>
        <mx:Button label="Set by ID - ActionScript in Script Tag" click="setByID();"/>
        <mx:Button label="Set without ID" click="setWithoutIDHandler(event);"/>
    </mx:Application>

  • How can I set the caption text of picture controls inside an array or how can I choose which array element is assigned using the array elements caption text property.

    I have 8 picture controls inside an array and I would like to set the caption text of these controls.
    I have used the property node of the array and used the array elements property caption text to set the text.
    The problem is however that I set the same text to all the picture controls inside the array.
    My question is how to set caption text of specific elements (Picture control) that I have so far only been able to access using the array elements caption text property.

    Some more help
    1 You could use the caption of the array and place it in front of the selected picture and update that using property nodes.
    2 Like Norbett said if you use a cluster of pictures then their caption can be updated individually.
    Here is a an example that demonstrates the above
    David
    Attachments:
    Modify the Captions Of Pictures.vi ‏83 KB

  • Httpservice url property problem

    hello everyone
    I need to include non latin characters in my httpservice url property. It points to a file. (http://www.myurl.com/nonLatinCharactersInFilename.xml)And its giving me errors.
    When I check the error, the url appears like so: http://www.myurl.com/??????????????????.xml
    Im using these character set everywhere in the code and there are no problems except when im sending the httpservice call.
    I also have same characters in the result event. and theres no prpblem with that.
    Any ideas how I can include these file names in the url property? or is there another way?
    In my app the user clicks a list (of file names with non latin characters) and an http service is sent to load the corresponding file to a richEditableText component.
    every thing except the non latin character part works fine
    any help in the right direction will be appreciated.
    thanx

    Hello,
    I am not shure, but I think you have to use a webserver, with
    a folder directing to your desktop. Then you can use something like
    that:
    http://localhost/Desktop.
    Otherwise you can try file:///C://Documents and
    Settings/[username]/Desktop/flex/...xml
    I hope this will help

  • Dynamic HTTPService URL

    How about when i wanted my HTTPService url to become dynamic
    that it gets from an external text file or xml file. Here is an
    exampl...
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    xmlns:remoting="com.oreilly.
    programmingflex.rpc.*" layout="absolute"
    initialize="initializeHandler(event)">
    <mx:Script>
    <![CDATA[
    private function initializeHandler(event:Event):void {
    textService.send( );
    private function resultHandler(event:Event):void {
    textArea.text = String(textService.lastResult);
    ]]>
    </mx:Script>
    <!--<mx:HTTPService id="feedRequest" url="ip.txt"
    result="resultHandler(event)" useProxy="false"/>-->
    <mx:HTTPService id="textService" url="
    http://yourdomainname.com/ip.xml"
    result="resultHandler(event)" />
    <mx:TextArea id="textArea" width="500"/>
    <mx:VideoDisplay id="vid"
    source="{textService.lastResult.subscribers.thevideo}" width="450"
    height="338" x="20" y="75" />
    </mx:Application>
    As you can see my HTTPService URL points to a file named
    ip.txt, the file includes my database URL where i will get my files
    to be played in my VideoDisplay. Is there anybody who can help me
    with this stuff. any reply would be very much appreciated.
    thanks!!!

    Are you asking if you can make the URL property of the
    HTTPService that points to the textService dynamic?
    You can bind the property to some local variable that is
    dynamically built:
    <mx:HTTPService id="textService" url="{someXMLFilePath}"
    result="resultHandler(event)" />
    The someXMLFilePath variable can be built in the
    initializeHandler ( or where ever you want).

  • Field Text Property Not Found

    I have a Director MX 2004 based training course that is
    periodically getting the following error:
    property not found: #text
    This training program was developed in Director 6.5 and
    updated last year to MX 2004. The training program had been running
    without error for six years prior to the update. I didn't update
    the script that is causing the error until after receiving the
    error reports.
    After getting the error report I was able to reproduce the
    error while running in MX 2004 and the error said:
    Script error: Property not found
    set the text of member "IN" = tempIN & sp &
    pretempIN
    #text
    I checked the debugger and the local variables were all valid
    and nothing seem out of place. The field cast member "IN" exists
    and the member's sprite is static in the score (i.e., it's not
    being dynamically created).
    Since I couldn't figure out what the problem was I updated
    the field update scripts to the new syntax:
    member("INText", "Internal").text = tempIN & sp &
    pretempIN
    I also changed the name of the cast member thinking that the
    name "IN" may be causing the problem. There are no other cast
    members of the same name. Unfortunately, I'm still getting the same
    error. There are other field member sprites that are getting
    updated successfully before this line of code but for some reason
    this particular field member sprite is causing the error, even
    after changing the name of the member. I've since moved my text
    formatting script to the frame script in the score where the field
    members are located and tried preloading the member but neither of
    those changes helped.
    This error is very sporadic and I've only been able to
    reproduce it few times on my local machine, and not since I updated
    the script syntax and the field name, but my client is still
    encountering the error. I checked that my client's program file
    installation is up-to-date and they're running the newest
    executable.
    Any ideas of what might be causing the problem? I'm
    stumped...
    Mark

    quote:
    You seem to be using #field member and #text member
    interchangably. They're
    not the same type of member and they have different
    properties.
    Actually, I'm not. It's a field member. The member's name
    "INText" probably led you to believe it's a text member. I changed
    the member's name from "IN" to "INText" as I thought perhaps the
    "IN" may be causing the problem. The member has always been a field
    member. I'm not formatting the field or anything like that, I'm
    only replacing the field contents. I don't use Director much
    anymore, other than this project, but having used both 7.5 and MX,
    I assumed that I could access the text property of a field using
    the member("myField", "castName").text syntax as per the docs.
    As for the concatenation, the variables are all strings so it
    shouldn't really matter. The real problem is that the field
    member's text property can't be found, not what I'm putting into
    it. And the fact that it only happens occasionally is what I can't
    figure out. Since I encountered the error myself inside of Director
    and was able to run the debugger I was able to see all of the
    variables in the debugger and check for the field member and its
    properties in the Message window and everything looked okay.
    quote:
    To double check the member coflickt issue (director always
    operates on the first occurance of a member name
    It's definitely the only member using the name "INText",
    plus, I checked all cast libs and it's a unique name.
    When I originally converted the movie I do recall that I had
    another cast member named "IN", the original name of the field
    member, when I converted the movie. I can't remember the type of
    member it was but I'm pretty sure it wasn't a field. Perhaps the
    movie still has some kind of reference to that not field member and
    may point to it occasionally, even though I've since renamed the
    original field cast member to "INText".
    Mark

  • WPF TextBox insert new text

    When inserting a number in my textBox and then another number, for ex. 6 and then 3 I see: 63.
    but i want that when I insert 6 and then 3 to see only: 3. 
    i mean, that every Key comes instead of the one before and not added.
    what should i do?

    Handle PreviewKeyDown and set the Text property to empty string.
    private void TextBox_PreviewKeyDown(object sender, KeyEventArgs e)
    TextBox tb = sender as TextBox;
    tb.Text = string.Empty;
    You probably also want an if round that so if tab or enter is pressed you don't lose the old string.
    Hope that helps.
    Recent Technet articles: Property List Editing;
    Dynamic XAML

  • Disable wrapping of words in static text component inside gridpanel

    Hi
    I'm using static text components inside gridpanel. Now I noticed that in several cases the text, if consisting of several words, is broken into several lines both in the designer and at runtime.
    Question: is there a way to tell a static text component to never wrap the text into several lines?
    thanks, Peter

    Hi Peter,
    Check if the width of the gridpanel has been set. In case the width property has a fixed value then the static text component would wrap the text content to fit the width of the gridpanel.
    For example, below are the steps I followed:
    1. Drag and drop a gridpanel
    2. Drag and drop a staticText onto the gridpanel
    3. In the text property of the staticText enter the following sentence "This is a static text in a gridpanel which has only one column"
    4. It can be seen that the entire sentence is in one line
    5. Now select the gridpanel and click on the ... button next to style property to open up the style dialog
    6. Click on Position
    7. Under size, set the width to 100 px
    8. Click on OK
    9. As can been the sentence is now displayed over 5 lines
    Hope this helps
    Cheers
    Girish

  • Is there a way to auto-insert some text into a new ticket in Spiceworks?

    In our old ticketing system, it automatically inserts some text (Issue Impact, Procedure, etc) into every ticket, and we'd like to do the same in Spiceworks.
    Is there any way to do this? If so, how?
    Thanks in advance!
    This topic first appeared in the Spiceworks Community

    So I am working on a function that accepts pipeline input from Get-Aduser or Get-Mailbox. The goal is to bind the userprincipalname of and AD user to the -Identity parameter:Powershellfunction Test-AliasBinding { [CmdletBinding()] param ( [Parameter(Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Alias('UserPrincipalName')] [string] $Identity ) $Identity}I can pipe Get-Mailbox to this just fine since it's output already includes an Identity property. However, binding does not work if I use Get-ADUser and pipe it to the function:
    PowershellPS c:\> get-aduser matt | Test-AliasBindingTest-AliasBinding : Cannot bind argument to parameter 'Identity' because it is an empty string.At line:1 char:22+ get-aduser matt | Test-AliasBinding+ ~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidData: (CN=Matthew McNa...C=domain,DC=com:PSObject) [...

  • Photoshop CS5 insert specific text in part of save as dialogue box

    Hi,
    I have a large number of images to export as web-images.
    I have an action in Photoshop (CS5 sadly) that works just fine.
    However I need to rename them.
    I select part of the name and overwrite with the new text and press enter and it continues.
    In a perfect world I would be able to select one of, say 3 different optional texts to be inserted over the selected text.
    Is that possible to do in an actionscript?
    In a bit less perfect world, I would be able to pause the action - select the text and maybe add a few characters - and kick the action to insert the text and move on.
    Example:
    Original names have no real name structure.
    Original name could be
    100000-10_xxx_13.jpg
    100000-xx-17h.jpg
    100000_00.jpg
    Wanted name structure
    100000-10-12300-xxx-xxx-01.jpg
    Is this possible? A pointer would be nice. :-)
    /K

    First of all actionscript exists it a Flash feature I do not think you meant that.  Photoshop has action support and has script  stpport.  Actions can use scripts and scripts can use actions.   Actions can only use logic by using scripts.  Actions can also be made interactive by turning on step dialogs.  For example you could add a text layer "Copyright John Smith © 2014" step then turn on the make text layer step dialog. When the step is played the text "Copyright John Smith © 2014"  will be  added and be displayed in text edit mode all highlighted you can edit the text and click on the commit text check mark in the tool option bar to commit your text change or accept the text as recorded.
    Action have some control over save file names but not much.  For good naming of output files you need to use Batch or a  Photoshop script.  Scripting is programming which most likely you do not have the required education and skill set to do.   However Photoshop ships with some canned scripts and other can be downloaded from the web to help you process your images.  I would highly recommend searching for and a download for Installing Image Processor Pro plug-in script .  It is better then the Image Processor Script that ships with Photoshop.
    Image Processing scripts can save and resize images file of your  images. These scripts dialog provide you with all the options you need to save the file types you need with the save option that you set and you can have these scripts include actions you create to to do custom processing.  You actions only need to deal with things you want to do to the image. File handling and image sizing will be done for you using your options set in the scripts dialog. With Image Processor Pro you cane even encapsulate the dialog setting by recording using the Image Processor Pro.
    As long as man exists this will be a less then perfect world we make mistakes and learn from them .  A perfect world would be boring there would be nothing to do.....

  • Text input inside webpage didn't work when address bar had been touched or input, motorola xoom JB

    After touch address bar,either input a web site or just touch, text input inside a web page is impossible. The only way I can input text into a web page is to open a web by using the most visited page. Not possible whenever using address bar.

    I found this post on linux forums which say It's a HAL related problem.
    "rmmod ehci_hcd" made it work for some of these guys Which one of them explains It's a data speed issue. Cables.., 2.0 1.0, that sort of things. Read it, I bet you'll get more out of it, It's old though.
    Try removing the module, plugging the drive, check dmesg, and mount manually.
    Last edited by Ekimino (2010-05-20 01:23:54)

  • How to edit a text file inside jar

    Hi all;
    I have a code that created text file and put this file to other jar archive.
    How can I edit this text file inside jar, add string to this file ?
    Thanks,

    Unpack the jar, edit the file, repack the jar.

  • In SSRS , after exporting report in excel,wrap text property for cell and freeze column for SSRS table header not working in Excel

    I am working no one SSRS my table headers are freeze cangrow property is false and my report is working perfect while rendering data on RDL and i want same report after exporting in Excel also , i want my table header to be freeze and wrap text property
    to work after exporting in my report in excel but its not working ,is there any solution ? any patch ? any other XML code for different rendering ? 

    Hi Amol,
    According to your description, you find the wrap text property and fix column is not working after exporting into Excel. Right?
    In Reporting Services, when exporting to excel file, it has limitation for textbox.
    Text boxes are rendered within one Excel cell. Font size, font face, decoration, and font style are the only formatting that is supported on individual text within an Excel cell.
    Excel adds a default padding of approximately 3.75 points to the left and right sides of cells. If a text box’s padding settings are less than 3.75 points and is just barely wide enough to accommodate the text, the text may wrap in Excel.
    In this scenario, it supposed to be wrap text unless you merge cells. If cells are merged, word-wrap does not work correctly. If any merged cells exist on a row where a text box is rendered with the
    AutoSize property, autosize will not work. For the Fix Data Property, it can't be working in Excel. These are features when exporting to Excel. We can't change it because it's by design.
    Reference:
    Exporting to Microsoft Excel (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • How to customize the content set in text as part of tag cq:text property="text"/

    We use the tag <cq:text property="text"/> to get the content, which is set in the jcr property "text".  Text was set in Richtext component and it has hyper link.
    Now, we have to customize the text.
    Example:-
    Actual Text in 'text' property:-
    <p>Click <a data-action="Hyperlink" data-upc-tooltip-type="none" href="/content/www-abc-healthcare-ch/en/offer.html">here</a> for the link</p> <p></p>
    After customization in 'text' property:-
    <p>Click <a data-action="Hyperlink" data-upc-tooltip-type="none" href="/content/www-abc-healthcare-ch/en/offer">here</a> for the link</p> <p></p>
    i.e .html has been removed.
    I tried customizing and set back to text attribute using <c:set var="text" value="<CustomizedText>" /> but even after that tag <cq:text property="text"/> retrieves the old content i.e with .html
    Please suggest how to override text content, so that the tag <cq:text property="text"/> will print customized text.

      Which version of cq? Is Strict Extension Check enabled at  http://<host>:<port>/system/console/configMgr/com.day.cq.rewriter.linkchecker.impl.LinkCheckerTra nsformerFactory
    Thanks,
    Sham

Maybe you are looking for

  • Select-options restrict possible entries

    Hi I use select options like in this example select-options: so_matnr for mara-matnr. In my report,when running, if pressing f4 for possible entries i only want to have material 123 and 234 for example,and not the whole list of materials.How can i re

  • Deactivate all Services together in sicf

    Hello friends Is there a possibility to deactivate in transaction sicf all services (including all subtrees)? In our system unfortunately all services are active. We want to deactivate them all. When I deactivate a supertree the subtrees are implicit

  • Level attributes

    Hi, i want to create level attributes in AWM. I see the definition of level attributes and dimension attributes in the below link: http://docs.oracle.com/cd/A97630_01/olap.920/a95295/designd6.htm how do i create a level attribute in AWM? pls help

  • Learning from Scratch!

    Hello Forum Mates I want to learn Oracle Dba, I have installed Oracle 10g(10.2.0) on OEL5. Can anyone let me know the Concepts in a Sequence wise. i followed couple of documents and Sam Alapati too but they are confusing, please take your time and le

  • Print Control

    Dear Experts In FBCJ Cash Journal after posting transaction when i m trying to print payment advice for the same(from downside Print Receipt button which is beside Follow on Document button),this takes me to next screen with warning message that syst