Referencing External components

I have two files in my project:
Project/main.mxml
Project/com/layout.mxml
(Main is an application and layout is a itemRenderer inside a
HorizontalList container.)
How do I resize the layout.mxml VBox height relative to the
Main.mxml container height from inside of Main.mxml?
Flex won't let me assign an ID to the root container of
layout.mxml, and trying to reference it through com.layout.height
gives me a "Call to a possibly undefined method through a reference
with static type Class" error.
I tried setting the height of layout.mxml using
parentApplication.id.height, which worked until I updated the
height of main.mxml and the layout.mxml remained unchanged. Flex
mentioned the height not being bindable. What a pain.
Hopefully this simple question has a simple answer.
Thanks!

I have two horizontal lists stacked vertically on top of each
other with a bar between them for resizing their respective
heights. The default is 50% / 50%, but I figure some people might
want to see more of the top section, or vice versa.
Inside of the top horizontal list I am using an itemRenderer
to parse an XML file into pretty columns of data. Problem is that
the itemRenderer VBox doesn't update when you resize the horizontal
lists, so it gets cropped instead of scaling. Because I am using
justified text, it appears as though I have to use fixed heights
instead of percentages.
This is the resize function inside of the main.mxml
application:
if (globals.resize == true) {
box1.height = contentMouseY - resizer.height / 2;
I would like to add one more line to resize the content that
goes inside of box1 (layout.mxml) if possible. I'm just not sure
how to call properties from other mxml files. Especially when I
can't assign an ID to the root container.
Something like:
if (globals.resize == true) {
box1.height = contentMouseY - resizer.height / 2;
layout.height = box1.height;
If I set the height inside the layout.mxml file to
height="{parentApplication.box1.height}" it doesn't update when I
resize the boxes.
Perhaps I could add an event inside the application that goes
off during a resize and a listener in the layout to pick up the
changes as the user moves their mouse, but it seems like there
should be a simple / elegant way of doing it within one
function.

Similar Messages

  • SharePoint2013 referencing external JS file in page layout not working

    Hi,
    I have created a custom page layout. In that custom page layout I have many HTML markup and controls like Dropdowns, hyperlinks (hrefs) etc. 
    Clicking on hyperlink hides or shows a div. The HTML markup and controls shows up fine when I create a page from page layout.
    The issue I am having is the JavaScript to hide or show div is in external JS file, which I am referencing in the page layout as below:-
     <SharePoint:ScriptLink name="~sitecollection/Style Library/Scripts/my.js"
     runat="server" />
    But when I click on “hyperlinks (hrefs)” the script in external js file doesn’t fire.
    I also tried using
    <script src="../../mysite/Style%20Library/Scripts/my.js"></script>
    I even tried below:-
    <script type="text/javascript" language="javascript" src="</script">https://sharepoint.com/mysite/Style%20Library/Scripts/mys.js"></script>
    <SharePoint:ScriptLink id="ScriptExternalJs" runat="server" Name="~SiteCollection/Style Library/Scripts/my.js" OnDemand="false" LoadAfterUI="true" Localizable="false" ></SharePoint:ScriptLink>
    But nothing seem to be working, I am able to refer an external CSS file but
    not JS file within the pagelayout under "PlaceHolderAdditionalPageHead" section.
    Any idea what's wrongs?
    Thanks,

    Hi,
    Please try to use the following statement:
    <link id="Link1" href="<% $SPUrl:~SiteCollection/Style Library/Scripts/my.js%>" runat="server" type="text/script" />
    More information is here:
    http://microsoft-techies.blogspot.com/2014/03/how-to-add-styles-and-javascript-files.html
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

  • Java - referencing external jar and class files

    When compiling (loadjava) a Java class, how can an externally referenced '.jar file' be resolved please? Using '-resolve' doesn't do the job in this case.
    Many thanks.

    I think I've seen an option for this with manifest files (or was it something that had to do with the java plug-in). There was something about the version and only download a new version if it was newer than the one on your local computer. This version thing is something you define in the manifest file at least. Take a look at jar and manifest files, there might be something there.

  • Referencing external jars

    hi,
    1. how does oracle resolve references to external classes/libraries at the time of loading a class?
    2. Would Oracle JVM understand and load jars placed in the classpath or do they have to be loaded to a schema?
    3. I tried loading my libraries to my schema but i get errors while it tries to resolve. I get ORA-29534: referenced object xxx is not found. even though that class is part of same jar (I combined all the jars into a single jar to avoid conflict)
    4. What is the best way to load jar files.
    Any help in resolving these issues would be of great help
    Thanks and Regards
    Ashwin

    Ok I am back with another problem. I seem to be getting a ClassCastException when i try to execute my java class.
    The error is being thrown when its trying to un-marshall the xml. here is a snapshot of the error i received
    java.lang.ClassCastException at javax.xml.parsers.SAXParserFactory.newInstance
    at
    javax.xml.bind.helpers.AbstractUnmarshallerImpl.getXMLReader(AbstractUnmarshalle
    rImpl.java:82)
    at
    javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerIm
    pl.java:139)
    at
    javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerIm
    pl.java:186)
    I have a message type defined as TestType in my XSD. I the java sources using xjc (jaxb compiler) to generate source files.
    when I try to unmarshall the input xml, which I receive as a string, hence i use a ByteArrayInputStream to read the xml data and passing that to the unmarshaller as below
    ByteArrayInputStream biStream = new ByteArrayInputStream(inXml.getBytes());
    unmarshaller.unmarshal(biStream);
    The error is being thown in the unmarshall(biStream) line.
    Any pointers would be helpfull
    Thanks
    Ashwin

  • Referencing external .as files

    I've got an .fla with a couple of .as files that go together.
    But there's nothing in the .fla that references the .as files. No
    include, not a scrap of script that says those .as files
    correspond. But it runs. This can't be, but I'm telling you there
    is no actionscript in this .fla. WTF?

    Why do you want to create a new library?
    You don't mention, but I guess you're using a 'managed' library and need more space. If this is the case, then all you need to do is go menu : File/Relocate Masters. Choose your external HD and wait until it has finished moving them. This will also work for referenced files.
    FWIW, there have always been 2 schools of thought about where metadata should be stored. The 'convenience' school and the 'safe' school. When Apple introduced Aperture 1.0, they were firmly in the 'safe' school, because keeping metadata in an image file's header can damage the file, rendering it unreadable. However, most photographers don't care about vague ideas of what might happen, maybe, in the future and they wanted their metadata to be a part of the file. So in Aperture 2, Apple enabled this.
    So now you have the choice. As it happens, personally, I have seen files corrupted by metadata, but I still keep mine in the file.

  • Referencing External Data in an InfoPath Form

    Hi all,
    I am using SharePoint 2013, Designer 2013 and InfoPath 2013.
    I am working on a a system that allows us to book a field support analyst for a particular site at my company on a given day. I have built a custom list that holds all the data and an InfoPath Form form logging and editing requests and this works perfectly.
    At Present the site location field is free text which means that we have the potential for two people to call the same site 2 different things. I toyed with the idea of having a separate list in SP with all the site locations on but we would need to keep updating
    this as new offices are opened and closed, so I took the view that I would link the site into our external support system that is the master list for all offices. This is an SQL DB. I have been able to set up the External Content Type and successfully create
    an External Read Only List in the Site Collection that is displaying all the info I want. I have even been able to create an InfoPath Form from this list for reviewing the full site information.
    The next stage was to add a drop down list to the request page that looks up the site name in the External List and records the choice in the request list. I can create the column in the Request List that looks up the site name in the external list but I
    can add this to my InfoPath form for editing.
    I am so close but I cant get there...
    Thanks in advance for your assistance.
    Rich

    Thanks for the reply. I am trying to call data from an external SQL DB but save it to an SP List. i.e. my site list is in SQL DB but the appointment is in an SP list

  • Referencing external files from flash in Dw

    I am working on a web page that has an embedded .swf, the
    flash movie reads an xml file which describes some photos and then
    displays a slide show with the photos and their captions. It works
    fine when I play .swf in Dw, but when I preview it in Firefox
    within Dw, it doesn't work, i.e. just a blank area. When I open the
    .swf file with firefox in the directory where I first created it,
    it works fine in the browser. However, when I try to open the file
    in the Dw site with Firefox it doesn't open.. The referencing used
    in the Dw copy is "/flash files/XML/slideshow1.xml" and the
    reference to the pictures in the XML file is /flash
    files/mainslideshow/filename.jpg
    I don't understand why it works in Dw but not Firefox. This
    has been "bugging" me for a couple of days now so any help would be
    greatly appreciated. Thanks

    eizzor wrote:
    > bregent thanks for the reply. No all the files are
    within the Dw site. The site structure is:
    > Site
    > Css
    > flash files
    > .fla
    > .swf
    > XML
    > .xml
    > mainslideshow
    > .jpg
    Not that I actually know what is going on here, but I do
    notice that you
    are using spaces in folder names - "flash files".
    Never a good idea.
    Harvey

  • Best practices for referencing external video across multiple computers

    I have made a .swf that references an external .f4v .  The swf plays fine on my own computer, but does not play on a colleagues computer, or another computer which we tested.  The file is not for upload to web , it is for local playback.  I assume this is a file path issue, but I have tried many different things including specifying a path and then recreating the same directory structure on the other computer.  What am I missing?  The f4v file can playback on the colleagues computer (I did install ffdshow , although another tested mp4 also plays back fine) but not the .swf.  Please , any help would be greatly appreciated!
    Thank you!

    This could be a security context issue, is it possible on your own machine you have allowed access to that file or folder containing the F4V file, maybe using the global-security-settings in flash player? Have a read of the following just in case:
    http://www.adobe.com/products/flashplayer/articles/localcontent/

  • Best Pratice of Error Handling calling multiple external components

    I have used EJBs in my question, but it applies to any component/service that is exposed.
    If I have EJB1 calling EJB2, what is the standard approach to handling an error received from EJB2? Does EJB1 simply pass it back or wrap its own error around it?
    I use the term error to include exceptions & all information that would be used for debugging & used by the caller.
    If we allow the errors from EJB2 to be returned to the caller of EJB1, then the caller of EJB1 must be aware of those errors.
    If EJB1 wraps the errors from EJB1, then the caller of EJB1 only needs to know about errors returned from EJB1.
    This can be extended a little and EJB1 calls multiple ejbs. Some of EJBs may be external EJBs or have the possibility of returning an error from a 3rd party tool.
    What should be returned if EJB3 can return the same error as say EJB4? If (for some reason) the caller needs to know exactly when the problem occurred it would imply that additional information needs to be attached to the original error.
    What would be a 'best practice' approach to returning the errors to the original caller?

    I have used EJBs in my question, but it applies to
    any component/service that is exposed.
    If I have EJB1 calling EJB2, what is the standard
    approach to handling an error received from EJB2?It depends on the context.
    Does EJB1 simply pass it back or wrap its own error
    r around it?
    I use the term error to include exceptions & all
    information that would be used for debugging & used
    by the caller.
    If we allow the errors from EJB2 to be returned to
    the caller of EJB1, then the caller of EJB1 must be
    aware of those errors.
    If EJB1 wraps the errors from EJB1, then the caller
    of EJB1 only needs to know about errors returned from
    EJB1.
    Caller?
    EJBs are in a layer. For application programming layers will seldom return errors (plural) to other layers.
    Within a layer handling depends on the context.

  • Web Gallery Pages Contain Garbage if Referencing External Scripts

    Like many, I've been customizing the very limited web gallery templates that ship with Aperture, but in addition the many annoyances mentioned elswhere (generation of non-compliant HTML, deletion of certain content, reformatting, altering the DOCTYPE, etc.) I've encountered a serious problem that makes rich customization a chore.
    Adding a script tag that references the Google Maps API causes Aperture to generate garbage in certain web gallery pages containing the tag.
    Placing
    <script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&key=ANYKEY"></script>
    into the HEAD element (with any api key, including an invalid one) causes the element to be replaced with
    <SCRIPT type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&key=ANYKEY"></SCRIPT><SCRIPT src="http://maps.google.com/mapfiles/maps2.70a.api.js" type="text/javascript"></SCRIPT><STYLE type="text/css" media="screen">.gmnoscreen{display:none}</STYLE><STYLE type="text/css" media="print">.gmnoprint{display:none}</STYLE>
    in most pages, and causes all of the second detail page (that's right, only the second page!) to be replaced with
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <HTML><HEAD><STYLE type="text/css" media="screen">.gmnoscreen{display:none}</STYLE><STYLE type="text/css" media="print">.gmnoprint{display:none}</STYLE><STYLE type="text/css" media="screen">.gmnoscreen{display:none}</STYLE><STYLE type="text/css" media="print">.gmnoprint{display:none}</STYLE><STYLE type="text/css" media="screen">.gmnoscreen{display:none}</STYLE><STYLE type="text/css" media="print">.gmnoprint{display:none}</STYLE></HEAD></HTML>
    which results in a blank page.
    The styles gmnoscreen and gmnoprint come from Google, so apparently, the code that generates the web pages from the template actually reads the Google Map API file, triggering side effects that write into (and spoil) the page being generated.
    Sadly, I've found no clever workaround for this bug. Aperture strips out SSIs (along with all HTML comments) so conditioning inclusion of the script tag on being on the server won't work, and substituting a page (that's only) on the server that redirects to the Google URL fails (probably because of some limitation of the Google API). The only workaround I've found is to generate pages with a place holder for the bug-triggering script (actually just the src attribute will do) that is then replaced in the files generated on the server (which is easy enough to do with BBEdit).
    Note that inclusion of the offending script also causes some misbehavior in Aperture itself when previewing the pages.
    Has anyone had a similar experience?
    Any suggestions on a better way to prevent the script tag from being read by Aperture when it generates the pages?
    This would seem to be a frank bug in the Aperture web gallery page generation code, which should simply be copying all script tags to the server files unchanged -- certainly without traversing the src url and thus executing any code they contain.

    It's hard to imagine what the designers intended then. No interactive web pages? Almost any code included in or referenced by the templates can result in serious and hard to detect bugs.
    For example if I have an element containing
    ... id="someid" class="styleA"...and have
    document.getElementById('someid').className='styleB';somewhere in code that executes on load, then the Aperture-generated files will change the element to read
    ... id="someid" class="styleB"...
    This is clearly a bug that needs to be fixed. The underlying model of what Aperture is doing certainly is not meant to include execution of code in page templates as part of he page generation process. Such code is only intended to run when the page is built in the client's browser.
    I also don't buy the notion that this isn't really such a big problem since one can always use the features of a code editor like BBEdit to repair the problem in generated pages on the server. Such problems (as the above example illustrates) can be very hard to detect in the first place, and, more importantly that can't possibly be the model of "workflow" that Apple intends, since it means that every time I make photo related changes in Aperture (e.g. simply rearranging the photos in my gallery, or changing a caption) I have to run a development tool to fix the damage that such an update will do to the code in the generated web pages. They're hardly "templates" if their products need to be fixed every time they're used.

  • Referencing external classes in the classes loaded into ORACLE8i

    Hi
    If I have to load a .class file into oracle8i and if it references another class XYZ.class file in the path /export/home/user what should I do to resolve during the loading. What happens if XYZ.class imports from a test.jar.
    Thanx

    Any external class references from classes loaded in ORACLE 8i must also be loaded into the database. The classes loaded into the db must be transitively closed. All external class reference must be either in the CORE Java api's (provided by Oracle) or must be loaded with the class in question.

  • Referencing external classes

    I have a java.jar file its and Instant Messenger program I want the jar file to referance external class files from the same directory that way it can allow people to submit updates and patches and reference them even when they arent in the same jar file.
    Sorry for grammer submitting this from my iPod Touch :)

    The classpath needs to reference the directory that contains the class files for your program to use them.

  • Unable to create variables referencing external schema

    I'm stumped with this one. Any help will be appreciated.
    I'm trying to create a variable to hold the wsse:Security element and not having any luck.
    I imported the WS-Security schema from http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd into my project schemas.
    Next, under process variables I created a new variable called WSSecurityHeader and set it to type Element, clicked the Browse Elements icon next to it, and picked the Security element from the imported project schema. So far so good.
    Now, when I try to expand the newly created variable I get Exception: Problem building schema! http://docs.oasis-open.org/wss/2004/01/XMLSchema.dtd
    No clue where it is picking up the URL for XMLSchema.dtd and incidentally this URL does not exist.
    I've tried using other elements from the schema such as UsernameToken and nothing seems to work.

    Hi Nizam,
    I have forwardes the issue to the concerned persion and will soon update you on the same.
    Dhaval

  • External components / forms / Paypal

    I have a simple question hopefully. I'd like to create a link in an htmldb app to a payment system. I am looking at Paypal where a button can be copied and pasted to a web site but this fails on my page for some reason. The code supplied is just a form & I have copied this below. I am just placing this as it is within a region in my app (appid 19585 page 3)
    <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
    <input type="hidden" name="cmd" value="_xclick">
    <input type="hidden" name="business" value="emailaddress">
    <input type="hidden" name="item_name" value="£5 topup">
    <input type="hidden" name="amount" value="5.00">
    <input type="hidden" name="no_note" value="1">
    <input type="hidden" name="currency_code" value="GBP">
    <input type="hidden" name="lc" value="GB">
    <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but23.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
    </form>

    You CANNOT put a form inside a form in HTML. HTML DB opens it's own form (view source). Yours needs to be outside of this form (before or after).
    I haven't done this, but if it were me, I would write some javascript to set the form elements in this form with values from your HTML DB items, then look into posting this form asyncronously with XmlHttpRequest or put it in a hidden iFrame and post it with JavaScript. You can then call doSubmit('MAKE_PAYMENT') which will post your html db form as usual.
    No matter what you do, you can't nest forms, so fix that first.
    Tyler

  • Referencing Swing Components

    Hello..
    My project consists of a GUI class(GUIClass.java) and another class(Business.java) that i wish to code the rest of the business logic into.
    How can i reference a Swing component in the GUI class from the Business.java class.
    Say i want to call jTextArea1.setText() from the business class how do i go about it.
    Thanks in advance.
    PS: Both my classes are in the same package

    You need to have a method in your GUI class that has access to the private text area field. In your Business class, you need an instance of the GUI class to call the method.
    ... in your GUI class:
    public void setTheText(String someText) {
    // do it
    }... in your Business class:
    GUI guiObj = new GUI();
    guiObj.setTheText("My new home is a text area.");If you are going to have a GUI class and a separate business logic class, you will only need one instance of the GUI class to use inside your entire Business class. It should be created initially and passed to any method that needs to access GUI objects.

Maybe you are looking for

  • Cisco AP 1131AG Web Interface Problem

    Hello, I purchased two Cisco access points (model AIR-AP1131AG-A-K9) from a seller on eBay. The Access Points power up fine and are able to get an IP address (I can see the AP's MAC address on my router), but it won't let me connect to the web interf

  • Can't Make Airport Connection to Network

    Just set up new wireless network with new cable modem (Motorola) and wireless router (Netgear) booth provided by cable company. Have gotten iMac and iPhone to connect to the network without a hitch but cannot get the G4 with internal airport card to

  • International characters not showing up in certain apps?

    I'm using Dreamweaver CS3 and international characters aren't showing up. There are blank spaces where they used to be. The characters are still there, it's just that they appear as blank spaces (I can copy and paste them and see them elsewhere). Thi

  • Toplink app works without oc4j,fails with security excp. in oc4j[SOLVED]

    OS: Windows XP jdk version: 1.5.0.04 (installed normally with windows installer, no tampering) JDeveloper version: 10.1.3.2.0 (base installation) I'm new to JDeveloper and I'm working on SRDemo application from online ADF tutorial under JDeveloper. A

  • No batches/stocks were found - determination is performed online MFBF

    Hi Gurus, Can anybody please help me why we are getting this message in MFBF. When the user is trying to turn in production for material A in MFBF, and when they hit post with correction in the home screen of MFBF, in the next screen the system gives