Nested Properties in valueRef?

Does anybody know if JSF supports nested properties for valueRef attribute?
It would be something like:
<h:input_text valueRef="userForm.user.name"/>
<h:input_text valueRef="userForm.user.password"/>
I tried it. Seems it doesn't work.

Does anybody know if JSF supports nested properties
for valueRef attribute?
It would be something like:
<h:input_text valueRef="userForm.user.name"/>
<h:input_text valueRef="userForm.user.password"/>
I tried it. Seems it doesn't work.JavaServer Faces supports the EL syntax of JSTL 1.0 and JSP 2.0, so the expressions you use above should work, if "userForm" identifies a bean in some scope (or a <managed-bean> entry in your faces-config.xml file), and this bean has a "getUser()" method that returns a bean with name and password properties.
Craig

Similar Messages

  • JSF EL with nested properties

    I have a problem to use EL to display nested properties.
    suppose I have a beanA, and beanB; beanA contains beanB, and beanB has property propA.
    if I want to display propA, I can use
    <h:outputText value='#{beanA.beanB.propA}'/>
    however if beanA has other beans, and I want to display those beans dynamically, I will take the "beanB.propA" part as a dynamic variable.
    of course I can't use <h:outputText value='#{beanA.beanX.propX}'/>, as beanX.propX is not a static string. I tried <h:outputText value='#{beanA[beanX.propX]}'/> as well, it can't automatically get the second level from beanX.
    anyone can help me?

    I assume you know that the syntax "beanA.propX" is simply a shorthand for 'beanA["propX"]'? So if you know before hand what properties your beanA has, you can dynamically iterate over them like this:
    <c:forEach items="#{'propX,propY,propZ'}" var="propName">
      <h:outputText value="#{beanA[propName]}" />
    </c:forEach>If you don't know the type ahead of time or want to find the properties dynamically, you should probably write a function to return the collection of properties from a given key. A totally general solution is impossible (since the EL-Resolvers are pluggable, and don't always have a determinable set of keys), but the most common cases would be as follows:
    * if the object is a key, return a set of integers 0 .. bean.size() - 1
    * if the object is a map, return the key set (bean.keySet())
    * otherwise use one of the 'java.beans.Introspector.getBeanInfo()' methods, and then the getPropertyDescriptors() method on the resulting BeanInfo to get the list of bean properties.

  • Nested properties & cluster error

    Hi everybody,
    twice the same is not for a long time yet the same in LabVIEW.
    Setting two properties causes the overwriting of the first property.
    This behavior will presumably apply to nested clusters / classes, too.
    Please see attached example vi for closer information.
    Does anybody have any idea or information about that?
    Best regards,
    Michael Theumert
    Attachments:
    NestedProperties&ClustersError.vi ‏15 KB

    Hi Gerd,
    thanks for your quick and friendly answer. Indeed the "long names" format helps to differ the two properties even if the long names are really long.
    As you have already mentioned your solution is only for my example problem.
    I guess you know that this isn't my real problem. It's just a simple demonstration with which I wanted to point out that there seems to be a severe error within LabVIEW. Just think of the properties being diagram axes or NI-DAQ parameters instead of simple colors.
    What i need is a workaround / solution for the main cause.
    Anyhow I appreciate your help.
    Best regards,
    Michael Theumert

  • Nested properties in DataProvider

    I have an ObjectListDataProvider and display the Data with a Table. This works with the hint I found here in the forum. But I have several Beans in this DP and so I want to display the Data from a Bean like this:
    #{currentRow.value['bean.property']}
    but than I get a "Property not found" error-message. Is this not possible? And when it is: how?
    Regards,
    Willi

    Thx for your answer. But this article doesn'T answer my question. My question is that a Dataprovider itself contains Beans hich properties I want to access. In your linked article only normal properties are accessed.

  • Unable to access nested managed bean property in JSF 1.2.9

    In an old version of JSF, namely 1.2-b20-FCS from April/21/2006, I could access nested properties of a managed bean. So I had a managed bean OuterBean, and in JSF I could write
    <h:inputText value="#{outerBean.innerBean1.propertyA"/>
    The Java class OuterBean has a member function
    InnerBean OuterBean.getInnerBean1();
    That is, there is a function getInnerBean1() taking no arguments, and it returns something which in my example above is the class InnerBean.
    Class InnerBean has a member function getPropertyA().
    But in the latest JSF from July/17/2008, this nested stuff is not working.
    Simple access like #{outerBean.propertyA} works, but nested access like #{outerBean.innerBean.propertyA} does not.
    The exception is something like
    org.apache.jasper.el.JspELException: /whatever/mypage.jsp(71,15) '#{outerBean.innerBean.username}' Error reading 'innerBean' on type
    mypackage.OuterBean at org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:107) at javax.faces.component.UIOutput.getValue(UIOutput.java:184) at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:201) at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:284) at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:154) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:861) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:946) at javax.faces.render.Renderer.encodeChildren(Renderer.java:148) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:936) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:942) at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:271) at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:202) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:109) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266) atThanks.

    Sorry, it looks fine to me. In my original post, I had the call stack in code and for some reasons the newlines were removed. So let me try again in text, but putting two newlines. Hope it works this time:
    org.apache.jasper.el.JspELException: /whateverr/mypage.jsp(71,15) '#{outerBean.innerBean.property}' Error reading 'innerBean' on type mypackage.OuterBean at
    org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:107) at javax.faces.component.UIOutput.getValue(UIOutput.java:184) at
    com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:201) at
    com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:284) at
    com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:154) at
    javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:861) at
    javax.faces.component.UIComponent.encodeAll(UIComponent.java:946) at
    javax.faces.render.Renderer.encodeChildren(Renderer.java:148) at
    javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837) at
    javax.faces.component.UIComponent.encodeAll(UIComponent.java:936) at
    javax.faces.component.UIComponent.encodeAll(UIComponent.java:942) at
    com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:271) at
    com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:202) at
    com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:109)
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100) at
    com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) at
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:266) at
    Edited by: sn72 on Sep 21, 2008 10:21 AM
    Edited by: sn72 on Sep 21, 2008 10:22 AM

  • ? on using faces-config bean properties

    I like the idea of being able to set bean property values in faces-config - one because it's sort of self-documenting and two because I can change my app without re-compiling. Now from what I've read and from tests I've conducted, the bean is instantiated on first reference from a jsp - the framework calls the no-arg constructor and then calls the setter methods for any faces-config properties. Fine. But what if these properties are central to the bean's behavior - say they're used in the calculation of other properties. I don't have access to them in the constructor, and trying to do something in the setter for each property would be messy. Any ideas, or am I missing something fundamental?

    You have the correct understanding. What I would do if I had a property that was dependant on the value of other properties is do the calculation in the getter of that property. As you said, trying to do it in the setter of the other properties would be messy to say the least. Also, be aware that JSF 1.0 has a bug in that it does not support setting nested properties from a faces-config file.

  • Error getting BinaryProperty with ShowDoc servlet on nested types

    Hi,
    We are trying to get a property with the ShowDoc servlet.
    The aim is to retrieve images stored as properties of CMS contents.
    That works fine for :
    - Text properties (for instance a title property) whatever they are in simple properties or part of nested types.
    - BinaryProperties if the property is not in a nested type and if we activa the stream property on the repository.
    That does not work if the property is inside a nested type.
    In our example , we've got a CMS content of type "edito". This typoe has a property called "sections" that is multivalued aand of type "section".
    The type "section" has a property called image of type Binary.
    The url we tried is :
    http://localhost:7001/Portal_WEB/ShowProperty?nodePath=/BEA%20Repository/PortailDSI/CISI-ACCUEIL/EDITOS/e5//sections[0].image
    it does not work and get the error whoed beside in trhe servlet result.
    Note : if we want to get another property on the "sections" that is not of type "Binary", it works fine. For example the following link works and retrieve the value of the property :
    http://localhost:7001/Portal_WEB/ShowProperty?nodePath=/BEA%20Repository/PortailDSI/CISI-ACCUEIL/EDITOS/e5//sections[0].image_title
    error from the servlet :
    com.bea.content.RepositoryRuntimeException: Error retrieving multivalued nested property via given beginning of indexedName: sections, please check for the complete and correct indexedName on the Property in question.
    at com.bea.content.Node.getProperty(Node.java:454)
    at com.bea.content.federated.internal.NodeManagerImpl.getStream(NodeManagerImpl.java:669)
    at com.bea.content.manager.servlets.ShowPropertyServlet.printNode(ShowPropertyServlet.java:311)
    at com.bea.content.manager.servlets.ShowPropertyServlet.doPost(ShowPropertyServlet.java:92)
    at com.bea.content.manager.servlets.ShowPropertyServlet.doGet(ShowPropertyServlet.java:84)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:273)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:292)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3191)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1979)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1886)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1317)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)

    Just to clarify, when I said "The only workaround I can see is to only use the ShowDoc servlet on non-binary properties, or on binaries that are not defined as multivalued properties."
    Specifically this part "on binaries that are not defined as multivalued properties", I meant binaries that are not defined as multivalued nested properties, single valued nested properties that are binary will work.

  • Javascript - Access sub-properties of lists

    I've got a very basic problem: I want to assign a color to a
    line inside a field.
    Basically, this is all that's needed for doing this in Lingo:
    member.line [ i ] .color=color(255.128.128);
    However, a requirement for my studies is that I have to do it
    in Javascript and the dot notation doesn't work there... instead
    you use setProp... so by normal JS standards this should work:
    member.getProp("line",i).setProp("color",color(255.128.128));
    However, for some reason that I'm 100% unable to understand
    member.getProp("line",i) doesn't return an object... instead it
    returns a string!?!
    So I need a way to access nested properties directly via
    setprop... I've tried this:
    member.setProp("line["+_mouse.mouseLine+"].color",color(255,0,0));
    In the hope that Director would parse the
    "line["+_mouse.mouseLine+"].color" bit to get to the correct
    property... but sadly it doesn't.
    Any help would be VERY welcome :)

    Found the solution: You've got to use getPropRef:
    member.getProp("line",i).setPropRef("color",color(255.128.128));
    What I find really disturbing is that this is probably the
    110th method that I've found in a few forums, but not in the
    documentation... it's simply not listed and even a fulltext search
    does only provide a single half-sane result: "Choosing between
    Javascript and Lingo Syntax", the rest are functions that have
    nothing to do with properties, they just need it for their
    examples.
    I'm sorry, but you guys really have to get your act together
    documentation-wise!

  • Using Nested Content

    Hi
    i could see adding Nested Content option in all content pages.
    i mean we can add any no. of nested contents (Not nested properties.) to a content.
    What are tags do we have to retrive the child nodes of a parent nodes .
    hardly i could find a method
    <%=node.getChildren() %> but it is deprecated method.
    is there any alternative tag or method to retrive all nested contents?
    genrarally is it suggestable to add nested content.
    (i got thid doubt because i could not see any help on nested content in CM documentation even though feature exists, but i could find about nested properties , is it alternative to nested content?)
    thanks in advance
    Edited by: vamshi krishna on Jun 12, 2011 12:30 AM

    As per the javadoc for com.bea.content.Node.getChildren, see com.bea.content.federated.INodeManager.getNodes() as an alternative.

  • Text/expression-language-based paradigma continues?

    i've been working with jsp and struts for a while. the most significant drawback of jsp, custom tags/jstl and struts is its "runtime" binding caused by the heavy use of string-attributes and interpreted expressions.
    it makes the coding itself harder (loss of compiler support and strong typing), it increases the amount of testing (automated tests, regression tests) extremely, it makes jsp-apps very hard to mantain, it is error-prone when changed or refactored, it is slower in execution and last but not james requires extra developement tools (such as struts-editors) to effectively maintain the applications.
    but i like the paradigma of a web application that keeps a view state, handles "events" etc.
    the only thing i can't understand is why jsf builds on the error-prone jsp/custom tag paradigma instead of compiled server side ui components. it obviuosly still tries to follow the myth, that web-designers and application developers can share their source (i.e. js-pages) by using tags. imo this is a degeneration of the good idea to leverage html by some custom tags. these tags empower designers to make their pages dynamic. (enterprise) software developement ist very different: complex use cases, business logic and often ui-"logic", integration issues etc...
    the life cycle of a jsp with custom tags is weird (even more in struts):
    - objects (variables in scriptlets) already existing in the scope of the jsp-execute-method are wrapped into attributes of page, request or application scope.
    - tags are defined using string-based attributs, such as <html:write name="pinky" property="brain" />
    - the implementation of the tag tries to look up the object in any of the scopes, starting with page scope
    - if the object exists, it tries to read/set its property via reflection
    so you lose strong typing, compile time checks and performance.
    there are several frameworks that do not build upon jsp and tags but put in an extra layer. this layer is similar to a rich client "form" and renders the output into html or any other format.
    so i'm not preferring any framework, just looking around and curious why this architecture has been chosen for jsf.
    thanks
    tom

    the most significant drawback of jsp, custom tags/jstl and struts is its "runtime" binding
    caused by the heavy use of string-attributes and interpreted expressions.I second this heartily.
    but i like the paradigma of a web application that keeps a view state, handles "events" etc.
    the only thing i can't understand is why jsf builds on the error-prone jsp/custom tag
    paradigma instead of compiled server side ui components. The JSF - JSP connection is a major problem. More and more developers are starting to express reservations about it, because the two technologies don't play well together. But I think you've hit on an even deeper fundamental flaw in the equation -- the evils of runtime binding. The heavy JSF/JSP reliance on runtime evaluation is a reliability nightmare. Developers choose Java, in part, because of the robustness provided by compile-time checking. We give that up when it comes to JSF/JSP or Struts web applications, and that's an unacceptable state of affairs.
    Winer says that "JSF has taken a major step in the right direction with the <managed-bean> and <referenced-bean> configuration elements. These give some hope for development tools to finally provide real code insight (and even error reporting) for EL expressions, because they define both what keys are used in the expression language and what types of objects may be at those keys." However, this will help with only the simplest EL expressions. As soon as an EL expression reaches into nested properties and maps that aren't defined in the config file, we're back to runtime binding and error reporting. The addition of generics to the language with 1.5 might have made it possible to introduce strong EL type checking at page compile time, but Sun's short-sighted type-erasure implementation of generics rules this out permanently.
    Look at what Microsoft is doing with ASP.NET. It's not perfect, but the fundamental technology is based on compiled server side ui components. There are places in that framework where you can write expressions aren't evaluated until runtime, but it's certainly not the fundamental basis of the model as it is with JSF/JSP. And the .NET implementation of generics may make it possible to have these dynamic expressions type-checked at page compile time in a future implementation of .NET.
    I keep reading comments from the JSF proponents who say things to the effect of "yes, we know JSP doesn't play well with JSF, but JSF allows you to plug in a different rendering technology." Well, we need one, and we need it urgently. ASP.NET has been out for two years now, and was far more polished and useable at its release than JSF is now after a very long development cycle.
    Rightly or wrongly, people will judge JSF on the merits of the reference implementation. And I fear that a lot of developers are going to throw up their hands after a taste of the JSF/JSP world and move to .NET.
    Stephen Schaub

  • Parsing xml returned by web service

    I am calling a web service from flash and the web service
    returns xml. The xml gets urlencoded when it's put inside the soap
    wrapping xml and I'm not sure how to get rid of the soap wrapping
    and unencode the returned xml. Thanks.

    Hi vtxr1300,
    I'm not sure if you meant to say "urlencoding" because that
    looks more
    like this:
    ?title=This is a test title&description=This is a test
    description of item 1
    What you're looking at here is pure XML (with namespaces but
    you can
    ignore them for the most part...we know this is SOAP!).
    Since you posted this in the ActionScript 3 forum, I'll
    assume you'll
    want AS3 code to deal with this. Luckily, AS 3 has made it
    incredibly easy
    to extract whetever you need out of this.
    First, you just need to get this data into a standard XML
    object is it's
    not already. So..something like this:
    //xString is your XML data...SOAP return data, string, or
    whatever
    var myXML:XML=new XML(xString.toString());
    The XML object retains its nesting properties so that, for
    example, to
    access the first '<desc>' node, you must access
    '<module>' before it,
    '<modules>' before that, and so on. This is
    accomplished using the "child"
    method associated with the XML object which uses the node
    name as a
    parameter. For the '<desc>' node, for example, this
    would look like:
    myXML.child("Body").child("GetTrainingResponse").child("GetTrainingResult").child("traini ng").child("modules").child("modile").child("desc");
    A bit lengthy, but it gets the job done. Typically I would
    store s
    reference to each of the resulting "child" calls. this has
    two benefits and
    uses: It's easier to organize and easier to read than one
    long instruction,
    and it allows you to parse through multiple nodes. Each
    "child" call returns
    an XMLList object, not necessarily a single node. If there
    are multiple
    sibling nodes with the same name, for example, calling the
    "child" method
    will return an XMLList with two object nodes, not just one.
    An XMLList can
    be used much like an array so you can simply loop through the
    results to see
    all of the nodes.
    The notation for ActionScript 3 has changed a bit for node
    attributes.
    An attribute name is now referenced via an '@' symbol. For
    example, to get
    the 'xmlns' attribute of the '<GetTrainingResponse>'
    node, you would use:
    myXML.child("Body").child("GetTrainingResponse").@xmlns;
    Finally, it's worthwhile noting that the XML container
    obejct reference
    has changed. In ActionScript 2.0, an XML object would point
    to the XML
    document. The "firstChild" property of the XML object would
    point to the
    first node ('<soap>' in this instance). In ActionScript
    3.0, the XML object
    point to the first node so that the first child of the object
    in this
    instance would be the '<soap:Body>' node.
    As mentioned, you can usually ignore namespaces for objects
    you're
    familiar with. The "soap" namespace, for example, can be
    assumed since we
    know this is a SOAP response.
    Hope this helps.
    Regards,
    Patrick Bay
    BAY NEW MEDIA
    "vtxr1300" <[email protected]> wrote in
    message
    news:[email protected]...
    > Here's what the web service is returning. If I create a
    local version of
    > the
    > xml without the soap wrapping and urlencoding I can get
    all the data I
    > need...
    > I just can't figure out how to urldecode it and get rid
    of the soap xml.
    > Can
    > anyone please offer some ideas? Thanks.
    >
    > <soap:Envelope xmlns:soap="
    http://schemas.xmlsoap.org/soap/envelope/"
    > xmlns:xsi="
    http://www.w3.org/2001/XMLSchema-instance"
    > xmlns:xsd="
    http://www.w3.org/2001/XMLSchema">
    > <soap:Body>
    > <GetTrainingResponse xmlns="
    http://www.trainingondemand.com/">
    >
    <GetTrainingResult><training><modules><module><title>Item
    > 1</title><desc>This is a test description of
    the
    > item.</desc><purchaseurl>
    http://www.yahoo.com</purchaseurl><imageurl>http://www.
    >
    testsite.com/header.gif</imageurl></module><module><title>Item
    > 1</title><desc>This is a test description of
    the
    > item.</desc><purchaseurl>
    http://www.yahoo.com</purchaseurl><imageurl>http://www.
    >
    testsite.com/header.gif</imageurl></module><module><title>Item
    > 1</title><desc>This is a test description of
    the
    > item.</desc><purchaseurl>
    http://www.yahoo.com</purchaseurl><imageurl>http://www.
    >
    testsite.com/header.gif</imageurl></module><module><title>Item
    > 1</title><desc>This is a test description of
    the
    > item.</desc><purchaseurl>
    http://www.yahoo.com</purchaseurl><imageurl>http://www.
    >
    testsite.com/header.gif</imageurl></module></modules><colors><darkcolor>8396b0</
    >
    darkcolor><btngradientstart>2d6dc4<btngradientstart><btngradientend>17498f<btngr
    >
    adientend><btn2gradientstart>a5b5ca</btn2gradientstart><btn2gradientend>c4d0e0</
    >
    btn2gradientend></colors></training></GetTrainingResult>
    > </GetTrainingResponse>
    > </soap:Body>
    > </soap:Envelope>
    >

  • Error: Find criteria must contain at least one sort field value.

    Hi
    I am getting the followng error in Sort.as when I click on a column in a DataGrid that is bound to a nested property (e.g. parent.name)
    Error: Find criteria must contain at least one sort field value.
    I can see why this is failing.
    In the findItem function of Sort.as the code tests whether there is data in line (456) hasFieldName = values[fieldName] !== undefined. This fails and so an error is raised later in the function by:
         if (fieldsForCompare.length == 0)     {
         message = resourceManager.getString("collections", "findRestriction"); 
              throw new SortError(message);     }
     The code needs to traverse down the object hierarchy to get the field so that error is not thrown .
    The code needs to traverse down the object hierarchy to get the field so that error is not thrown .
    In the case of a non nested property, everything works fine.
    There is lots of discussion about nested properties in DataGrid and there is this jira:
    http://bugs.adobe.com/jira/browse/SDK-9801
    There is talk of using a labelFunction or an itemRenderer and other third party solutions (extensions of DataGridColumn).
    Is this a bug?  is there a workaround using labelFunction or itemRenderer which can stop the error in Sort.as?
    James
    Here is the code of findItem in Sort.as of SDK 3..4.0.9271
    public  
    function findItem(items:Array,values:Object,
    mode:String,
    returnInsertionIndex:Boolean =
    false,compareFunction:Function =
    null):int{
    var compareForFind:Function; 
    var fieldsForCompare:Array; 
    var message:String; 
    if (!items){
    message = resourceManager.getString(
    "collections", "noItems"); 
    throw new SortError(message);}
    else if (items.length == 0){
    return returnInsertionIndex ? 1 : -1;}
    if (compareFunction == null){
    compareForFind =
    this.compareFunction; 
    // configure the search criteria
    if (values && fieldList.length > 0){
    fieldsForCompare = [];
    //build up the fields we can compare, if we skip a field in the
    //middle throw an error. it is ok to not have all the fields
    //though
    var fieldName:String; 
    var hadPreviousFieldName:Boolean = true; 
    for (var i:int = 0; i < fieldList.length; i++){
    fieldName = fieldList[i];
    if (fieldName){
    var hasFieldName:Boolean; 
    try
    hasFieldName = values[fieldName] !==
    undefined;}
    catch(e:Error){
    hasFieldName =
    false;}
    if (hasFieldName){
    if (!hadPreviousFieldName){
    message = resourceManager.getString(
    "collections", "findCondition", [ fieldName ]); 
    throw new SortError(message);}
    else
    fieldsForCompare.push(fieldName);
    else
    hadPreviousFieldName =
    false;}
    else
    //this is ok because sometimes a sortfield might
    //have a custom comparator
    fieldsForCompare.push(
    null);}
    if (fieldsForCompare.length == 0){
    message = resourceManager.getString(
    "collections", "findRestriction"); 
    throw new SortError(message);}
    else
    try
    initSortFields(items[0]);
    catch(initSortError:SortError){
    //oh well, use the default comparators...
    else
    compareForFind = compareFunction;

    I have tried a sortCompareFunction:
    var sort:Sort = new Sort();
    sort.compareFunction = compareFunction;sort.fields = [sortField];
    data.sort = sort;
    data.refresh();
    this makes no difference.
    James

  • TestStand Improvement Whishes

    1) Get rid of the "Locals." and "Parameters." prefix from variables lookupstrings in Teststand. Since 90% of the commonly used variables in Teststand are either under "Locals" or "Parameters", it will save a lot of time getting rid of them, and in addition the expressions will get much shorter and clearer.
    I think it can be done by keeping the existing parameters and locals tabs in seq editor, but in the lookup strings which have no special keyword in front (eg. runstate, globals) should be considered either locals, either parameters. (locals and parameters can have unique names for eg.)
    2) The autocomplete feature in the expresion browser, would be of a greater help if it would work like the "Start menu" in Windows, rather then entering a
    "." and then try to pick the nest entry. This will be very helpfull for nested properties.
    Thank you.
    krs

    KRS,
    I will join Scott in thanking you for your suggestions. We definitely take customer suggestions very seriously and consider them when deciding which features are included in future releases of the product. However, we do have a process for submitting requests that streamline the suggestions directly to someone in our R&D department. If you go to www.ni.com/contact, the bottom left option is for product feedback. This will take you through a few pages that ensure that we have all the information necessary to understand your suggestion and the reasoning behind. Again, we greatly appreciate ideas on how to make our products better, but I would suggest using this process to ensure that your suggestions go directly to the correct people. Thanks and have a great day.
    Adam B.
    Applications Engineer
    National Instruments

  • How to bind this?

    i have an array. i use objectarraydataprovider that uses my array.i want to use expression like page.oadpAddresses.options['addressKey.id,addressName']}. addressKey is an object and it has a property called id. i can use root properties of this array's items. how can i bind inner properties?
    what does #{......options[...]} means? there is no method called options in objectarraydataprovider?
    <ui:dropDown binding="#{page.cmbAddressType}" id="cmbAddressType"
    items="#{page.oadpAddresses.options['addressKey.id,addressName']}">

    With the dataprovider's "options" notation, you must specify field keys of the dataprovider, which, as I recall, are the "top-level" properties of the underlying object type in your array. So you will not be able to specify "nested" properties of that type in this scenario, since those nested properties are not the field keys.
    The options notation is implemented by the DataProviderPropertyResolver. It takes the field keys you specify and creates Options objects.
    In this case, it may be easier just to create an array of Option objects yourself and not use the dataprovider.

  • Help with Query Builder please

    Hi,
    I would like to query the system database for reports using ftp, email, and unmanaged disk as Destinations.  I am not familar with the datafields in the BOXI database nor with the Query Builder syntax or SQL type queries.  Can someone provide samples of this type of query and possibly the exact field names to be included.
    I would actually like to design a Crystal report that would return this information as needed.  Something like...
    Report name    Report location   Type of Destination    Actual Destination specified
    Any and all assistance would be greatly appreciated.

    Unfortunately these properties are nested within the results you will receive if you query for any of your individual reports within Query Builder.  Try this out for reference:
    select top 1 * from ci_infoobjects
    where si_name = 'YOURREPORTNAME'
    and si_instance = 1
    Nested properites cannot be included in the select clause of your query.  For the majority of nested properties such as instance destinations, you'll need to either develop script to retrieve this information or utilize a 3rd party product (System Profiler, etc) that has this information available and pre-build reports.

Maybe you are looking for