Reference Variable syntax??

I have a large table that I want to filter on any field. I have the dataProvider array and the fieldname in a variable.  Can anyone point me in the right direction on how to set up a dynamic filter, all I can find are static item.arrayLabel in a filterFunction  where item is the dataProvider and arrayLabel is the "column" (item.city or item.state versus item[fieldName] where fieldname can be "data" or "label").  My ultimate goal is to eliminate [object Object] from the list if there are any NULL items in the database for that fieldname.  All help is appreciated.

Thanks Gordon,  it seems my syntax was correct but my logic failing.  My filterFunction was (item[fieldName]!="" || item[fieldName]!=null) instead of &&  I had no confidence in the syntax. Hate it when I doubt myself
Thanks again. This is going to be a pretty slick SQL generator for reporting once complete. Here we are selecting the WHERE criteria for the fields included in the report.  My previous question (unanswered) instead of rendering ComboBox for each row, only fields with lookup tables would have had a ComboBox and these other potentially null fields were going to render TextInputs - but never could get that working with dynamic dataProviders.  This may be a better solution, just need to make the non-lookup ComboBoxes editable.
Thanks again.

Similar Messages

  • Passing a reference / variable to a Custom Component

    Hi, I was wondering if someone could help me.
    It seems like a very simple problem but I cant for the life
    of me seem to work out a solution.
    I have created a Custom Component that extends from the
    UIComponent that consists of a “rev counter” style
    clock face etc….
    I want to use this component multiple times within my
    application – however feed it different data so for example
    each “rev counter” on the page will be displaying
    different data etc…..
    I want to be able to reuse my component and not have to
    create a new component every time I add a “rev counter”
    to my application, therefore I need some way of passing a reference
    / variable to the component (maybe from the <mx /> tag where
    I declare it in the MXML code ??? )
    <mx:Application ….
    xmlns:comps="components.*" …..>
    <comps:RevCounterComp id=”” (add something
    here to reference???) />
    </ mx:Application>
    Doing this will allow me to reuse my ONE custom component
    MANY times feeding it different data (different data provaiders for
    each instance of the single component)
    Hope this makes sense???
    Any help / advice is much appreciated,
    Thanks,
    Jon.

    Jon,
    jmryan's suggestion is the preferred way to go. This way you
    can use the simple MXML syntax that you described in your post.
    If your custom component is defined in ActionScript, you can
    use setters or the creationComplete event to update the component
    when the values are passed in from the tag (they are set *after*
    your constructor runs).
    Even easier, if your component is defined in MXML, you can
    add [Bindable] to your public field and then bind directly to it in
    the custom component's MXML code.
    - Peter

  • Many Reference variables to declare

    I have many reference variables and was wondering if I can declare them on one line:
    private String city;
    private String county;
    private String lastname;
    private String firstname;
    ...Is this a good way to do it?
    private String city,county,lastname,firstname;

    You can, it's perfectly valid syntax. But it's not recommended; read the Sun code conventions for Java: http://java.sun.com/docs/codeconv/html/CodeConventions.doc5.html#2991
    People on the forum help others voluntarily, it's not their job.
    Help them help you.
    Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
    (Yes I know it's on JavaRanch but I think it applies everywhere)
    ----------------------------------------------------------------

  • Difference between reference variable and object ?

    I am getting confused with reference variable and object ?
    1. int a; // is a variable
    2. Car c = new Car(); // is a object of car type
    Suggest me what are the difference between the two.....

    jverd wrote:
    Shelby wrote:
    Something about an interned string literal?_
    I remember something from class about the way Java treats strings that contain the same data. yawmark
    posted a link for me that cleared up my confusion. thanks yawmark.
    >>
    Can you actually point back to the original reference?Not clear what you're asking here. Nothing points to references. References point to objects.
    Goodness, correct wording is as important as getting the syntax right, isn't it? ;-} What I was trying to ask is if it is possible to point back to the same String once you change the pointer on the variable?
    And you answered my question succintly with the rest of your post. thanks jverd
    >
    String str = "abc";
    str = null;'At this point, we've lost the reference to the original String object. However, at runtime, the VM will still be maintaining it in the constant pool. For any non-constant-pooled object, as we're writing our code, we'd have no way to refer to that object again. In this case, we are able to refer to the same object later in our code by simply using the same string literal. "abc" elsewhere in our code will cause the VM to give us a reference to that same pooled String. Same goes for Integer, etc. in the range -128..127.
    However, it's not good design to rely on this. If your design requires you to later point to "the same object" (as opposed to any object of a compatible type and holding the same contents), then you should explicitly maintain a reference to it. In the case of Strings, you really shouldn't care whether it's the same object or not. All you care about is the character sequence that defines the String's state.

  • Not able to Pass Reference Variables to Deferred task

    Hi All,
    I am not able to Pass the reference variables to Deferred task, With the following code, I am getting null values (for the passed refs) in Deferred Task.
    Code is as:
    <Action id='1' name='Set Deferred Task Action' application='com.waveset.session.WorkflowServices'>
    <Argument name='op' value='addDeferredTask'/>
    <Argument name='type' value='User'/>
    <Argument name='name' value='$(empId)'/>
    <Argument name='authorized' value='true'/>
    <Argument name='task' value='WF_User Deferred Task'/> // Task defination
    <Argument name='date'>
    <Date>2008-11-19T14:50:18.840Z</Date>
    </Argument>
    <Argument name='taskDefinition'>
    <block trace='true'>
    <defvar name='usrObject'> // This is the variable I am passing to 'WF_User Deferred Task'
    <new class='com.waveset.object.GenericObject'/>
    </defvar>
    <invoke name='setAttributes'>
    <ref>usrObject</ref>
    <map>
    <s>accId</s>
    <ref>empId</ref>
    <s>updStatus</s>
    <ref>newStatus</ref>
    </map>
    </invoke>
    </block>
    </Argument>
    </Action>
    <Transition to='End'/>
    Please suggest me.
    Thanks,
    Ravi.

    yeah, you don't have your usrObject available in the deffered task however all variables that you put inside the usrObject are avialble. Like <ref>accId<ref> and <ref>updStatus</ref>. If you still need them organized hierarchically, you might try to add one more level to the object before passing it to addDefferedTask
                <block>
                  <defvar name='objWrapper'>
                    <new class='com.waveset.object.GenericObject'/>
                  </defvar>
                  <defvar name='usrObject'>
                    <new class='com.waveset.object.GenericObject'/>
                  </defvar>
                  <invoke name='setAttributes'>
                    <ref>usrObject</ref>
                    <map>
                      <s>accId</s>
                      <s>yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy</s>
                      <s>updStatus</s>
                      <s>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</s>
                    </map>
                  </invoke>
                  <invoke name='setAttributes'>
                    <ref>objWrapper</ref>
                    <map>
                      <s>usrObject</s>
                      <ref>usrObject</ref>
                    </map>
                  </invoke>
                  <ref>objWrapper</ref>
                </block>I hope you ve got the idea. Cheerz.

  • ABAP field symbols and PERL reference variables to unnamed arrays.

    Rob -
    Please do NOT delete this post even though it contains this link:
    ABAP field symbols and PERL reference variables to unnamed arrays.
    to a question I posted in the Scripting Languages forum.
    It's a question that should be of interest to ABAP programmers, and they may miss if they don't frequent the SL forum ...
    Thanks for your forbearance here (in advance, of course) ...
    Best
    djh
    Edited by: Rob Burbank on Jul 11, 2011 1:26 PM

    If interested, please reply in the original thread. We don't want multiple conversations at cross purposes do we?
    Rob

  • Is down casting possible in Java objects(reference variables)?

    I hope, Java up casting and down casting is possible in Java primitive variables like int float and so on.
    My doubt is,Does in object of Java(reference variables) support down casting?

    makpandian wrote:
    the ques i asked here is popped from my mind.We know that.
    But i did not get answer .Because you didn't do any research.
    Than s why i ask this here..That's the wrong approach. Do some research first. Use google, a textbook, a tutorial, the JLS, write some code, etc. etc.
    After spending time and effort doing that, if you still have questions, indicate clearly what you read and what part you didn't understand. The way you're doing it is NOT an effective way to learn, and it's a waste of everyone's time.

  • Invoke a subclass method via Superclass reference variable.

    Hello,
    I need to invoke 'subclass' methods from a superclass reference variable as each subclass has a different
    methods and behaviour.
    My query is
    In the Main, when I invoke product.getProductType(),I get a reference back to the Product.
    I need a reference to the subclass object so that I can invoke methods of that subclass.
    How can I get the required subclass type and invoke methods specific to the subclass?
    Is my design incorrect?
    abstract class Product {
         public abstract Product getProductType();
    class Bond extends Product{
         @Override
         public Bond getProductType(){
              return this;
         // Methods specific to Bond
         public String getBondIssuer(){
         public Long getBondFaceValue(){
    class Option extends Product {
         @Override
         public Option getProductType(){
              return this;
         // Methods specific to Options
    class Main {
         public static void main(String args[]){
              Product product = new Bond();
              product.getProductType();  // Here I  get get a reference back to Product.
                                // What I need is a reference to the subclass type (Bond) so that I can invoke Bond methods
    }

    If your client already knows it has a Bond it should just use that as a reference. If you have general handling functions or classes, you can make them generic so that even if you give them a Product they can return the specific sub class.
    Simplest example:
    Bond james = doSomethingWithAProduct(new Bond());
    public <T extends Product> T doSomethingWithAProduct(T product) {
       return product;
    }

  • Any good article about reference variables casting ...

    Hi,
    I am looking for a good and simple article on the reference variables downcasting (and yes I am searching the Internet too so please do not suggest that).
    Please let me know if you know of any good article or if you can explain it well as I am having hard time to figure out when it is right and when it is used incorrectly.
    Thanks,
    Pritchard

    Casting conversions are "right" when you need a reference of the particular type AND the underlying object is type-compatible with the declared variable.
    "Downcasting" example:
    Object o = new Object();
    String s = (String) o; // BAD! The underlying object is not an instance of String
    Object o = "foo";
    String s = (String) o; // Okay.~

  • Why Java provides Object cloning even if there is Object reference variable

    In both cases original value get changed. What is the difference between these (clonable interface & Object reference variable)

    Cloneable is a way to make a copy of an object, so that you now have two objects, usually with the same state. Assigning the value in one reference variable to another variable (I can only assume that's what you're talking about, as your question is not clear at all) does not create another object.

  • How to create a local object reference variable in teststand sequence file programatically using C#

    I want to create a local object reference variable in a TestStand sequence file programatically using C#.

    Hi,
    Accoring to your reply in this Thread
    http://forums.ni.com/ni/board/message?board.id=330&thread.id=26984
    Just try this example. There you will create a numeric variable during excuting a sequence!
    Hope this is what you are looking for. 
    Please attach all your questions here.
    juergen
    =s=i=g=n=a=t=u=r=e= Click on the Star and see what happens :-) =s=i=g=n=a=t=u=r=e=
    Attachments:
    CTestStandDialog.zip ‏31 KB

  • Should i set null those reference variable object created inside of funtion

    hi,
    I create object inside of a member function . after finish execute that method those variable should set null to be garbage collection or no need ?
       public void sampleFun(){
           Object obj = new Object();
            // some work
         obj = null ;  //// ----------- > this need or not ?
    }after finished that method execution should i set
       obj = null;explicitly or no need ?? plz

    No, there's no need.
    When the reference variable passes out of scope, it ceases to exist, so it doesn't reference the object any more. As soon as an object has no references pointing to it, it is available for garbage collection.
    Your rule of thumb should be: don't do anything about garbage collection unless you know why you're doing it. And even then don't do it unless you can prove you need to.
    Dave.

  • Reference variables inside a remote FM

    Hi,
    Can anyone explain me why I can't use reference variables inside a remote Function Module.
    How can then create a dynamic table.
    And how can I return back a dynamic table?
    Thanks.

    Thanks Thomas.
    Ok, in general we can't use a reference variable because both application or systems are on separate adress-spaces, therefore it's not possible.
    If the kernel was designed for that it could be possible, am I right?

  • Reference Variable Set Within CFDIV

    I've got a .cfm page in which a CFDIV is called near the top.
    Variables are set within the CFDIV file that I then want to
    reference further down the calling .cfm page.
    Does anyone know a way to reference the values of the
    variables set within the CFDIV without using javascript? I'd like
    to reference the variables within a CFIF tags.

    Thanks Gordon,  it seems my syntax was correct but my logic failing.  My filterFunction was (item[fieldName]!="" || item[fieldName]!=null) instead of &&  I had no confidence in the syntax. Hate it when I doubt myself
    Thanks again. This is going to be a pretty slick SQL generator for reporting once complete. Here we are selecting the WHERE criteria for the fields included in the report.  My previous question (unanswered) instead of rendering ComboBox for each row, only fields with lookup tables would have had a ComboBox and these other potentially null fields were going to render TextInputs - but never could get that working with dynamic dataProviders.  This may be a better solution, just need to make the non-lookup ComboBoxes editable.
    Thanks again.

  • Cross Reference incorrect syntax

    Trying to create a partial text cross reference using the suggested code:
    <fullPara delim=”:” includeDelim=”false”/>
    However, InDesign (CC) is giving me an "Incorrect Syntax" message.
    Ideas?
    Thanks.

    @Sandee – after experimenting a bit with all kinds of quotes, I find the syntax for cross references  a bit strange.
    Here is a screen shot from my German InDesign CS5.5 v7.5.3. on OSX 10.6.8.
    It is showing the code for "Full Paragraph and Page Number" by *default*.
    Note the curly opening and closing quotes in German style.
    And note, that there are no quotes around:
    <pageNum />
    The code is still correct, if you are not using quotes at all in this example…
    Uwe

Maybe you are looking for

  • Order Recommndation process with due dates

    Hi, I am having little difficulties with MRP and recommendation I donu2019t  know if there is way I can turn off the lead time on MRP process. The situation is that when I have a blanket purchase order which is due in future and when a new recommenda

  • OpenCL/MacBook Pro/Mac OS 10.8.4

    MacBook Pro 15"/Early 2011 Processor  2.2 GHz Intel Core i7 Memory  8 GB 1333 MHz DDR3 Graphics  AMD Radeon HD 6750M 1024 MB Software  OS X 10.8.4 Premiere Pro CC Am I right in assuming that OpenCL is not working with Premiere Pro CC and OS X Mountai

  • Idoc for HR-CRM integartion

    Hi gurus I got to transfer all Oganizational Units y their position from R3 to CRM by ALE (mesaage type HRMD_ABA), but Person objects has failed. In fact, when PFAL is executed  to transfert all Persons the system send the following mesagges:"IDoc: 0

  • How is the access in INDIA?

    Hi,  The WIFI on the go is really interesting concept. I'm totally in for it. Some qq's before that. I just want to know how is SKYPE WIFI doing in INDIA. I also want to know if you accept INR and what are costs per min for using the WIFI. Can't wait

  • I know this may be very subjective. What book do you recommend to learn Photoshop CC 2014?

    I recently acquired program. Signed up at a local community college to take an on line beginner's course. What reference book do you like?