Must one explicitly set ID of UICommand in custom UIData?

I have a custom UIData subclass that, when created, dynamically creates its child columns just as if they had been created from a JSP.
I add a button using:
application.createComponent(UICommand.COMPONENT_TYPE);I had understood that, if I didn't specify an ID, that JSF would generate one. However, it seems that JSF generates a new ID each time the column is rendered---that is, for each row in the UIData!
In other words, if I have a button in a UIData column that is generated from a JSP, the generated client IDs look something like this when rendered:
_id64:_id65:0:_id67
_id64:_id65:1:_id67
_id64:_id65:2:_id67But if I create the same UIData and UICommand dynamically using application.createComponent() and don't explicitly assign an ID, the client IDs generated are something like:
_id64:_id65:0:_id67
_id64:_id65:1:_id68
_id64:_id65:2:_id69This stops the UICommand from working, because inside UICommand.encode() the component checks its clientID (which by this time is id64:id65:0:_id92 or something), which doesn't match the clientID sent back from the HTTP POST from the HTML button name attribute.
This all stems from UIComponentBase.getClientId() which, if there is no explicitly set ID for a component inside a naming container such as UIData, returns:
clientId = parentIds + context.getViewRoot().createUniqueId();This leads me to believe that, if a component structure is created from a JSP, JSF automatically calls:
newComponent.setId(context.getViewRoot().createUniqueId());Is this the way JSF is designed? That is, when I create a new component dynamically, am I required to set its ID, using context.getViewRoot().createUniqueId() for example?
Garret

...but why isn't the clientID cached? I see that UIComponentBase apparently caches the generated client ID---any idea why it isn't being saved in this case?
Garret

Similar Messages

  • Fuego.Lib.ProcessInstance must be explicitly instantiated before being used

    Hi,
    with the studio 6.0 i am getting the this type of message "Fuego.Lib.ProcessInstance must be explicitly instantiated before being used since it does not have a default initialization"
    I have created one default instance but it is not working like
    Fuego.Lib.ProcessInstance processInstance = Fuego.Lib.ProcessInstance();
    i am getting the java.Lang.NullPointerException.
    how can i correct this.
    Thanks for the reply in advance.

    Hi,
    You don't need to initialize ProcessInstance. You'd use it in one of two ways.
    1. You would use it to create a new instance in a process. You can drag either of the create methods from the Project Navigator tab into your logic to build a method call that creates a work item instance (either in the current process or another process depending on which of the two create methods you drag). This returns a string that is the id.id for the instance you just created.
    2. You would use it whenever you refer to one of the instance's predefined variables. You use the attributes ProcessInstance whenever you use an instance's predefined variable. As every work item instance is created in the Begin activity, the engine automatically creates a ProcessInstance object variable for the instance. Double click any Automatic activity in one of your processes and note that you have a set of predefined variables (activity, attachments, children, creation, deadline, description, id, etc.). Note that this exactly corresponds to the attributes in the Fuego.Lib.ProcessInstance.
    If you want to do something else with an instance, you might want to look at Fuego.PAPI.Instance.
    Hope this helps,
    Dan

  • How to return the result set of multiple select statements as one result set?

    Hi All,
    I have multiple select statements in my stored procedure that I want to return as one result set 
    for instance 
    select id from tableA
    union 
    select name from table b 
    but union will not work because the result sets datatypes are not identical so how to go about this ?
    Thanks

    You have to CAST or CONVERT (or implicitly convert) the columns to the same datatype.  You must find a datatype that both columns can be converted to without error.  In your example I'm guessing id is an int and name is a varchar or nvarchar. 
    Since you didn't convert the datatypes, SQL will use its data precedence rules and attempt to convert name to an int.  If any row contains a row that has a value in name that cannot be converted to an int, you will get an error.  The solution is
    to force SQL to convert the int to varchar.  So you want something like
    select cast(id as varchar(12)) from tableA
    union
    select name from tableb
    If the datatypes are something other that int or varchar, you must find a compatable datatype and then convert one (or both) of the columns to that datatype.
    Tom

  • Each target assigned to a job must have a setting and destination.

    Simple. Basic Question.
    Trying to use Compressor to change the codec on my flip cam to make it more compatible with FCP X.
    I have dragged a source and destination into the batch. But it keeps giving me the error "Each target assigned to a job must have a setting and destination." I saw others had this same issue and the solution I saw was to set a destination for the video AND audio. How do you assign for BOTH? I thought it was just a drag and drop method into batch ... 

    You didn't say what your settings were. But tif it's not one of the DVD presets, you shouldn't ordinarily be faced with separate audio and video streams with the majority of presets. Here's an example of a batch with one source file, multiple targets and multiple destinations. Only the DVD Preset has separate audio and video…and those do require that destinations be specified. If the destination is not specified, it defaults to Source.
    Good luck.
    Russ

  • Move Files from one document set to another document set using workflow

    Hi All,
    Env : SP 2013 Server - SPD 2013.
    I'm trying to make a SPD Workflow that must copy a  files from one Document Set to another Document set in the same library other document library  
    Does Someone already get success for Copy  files from one Document Set to another Document set?
    Thanks for your help.

    Hi,
    According to your post, my understanding is that you wanted to move Files from one document set to another document set using workflow.
    I recommend to use the custom workflow activity  Copy List Item Extended Activityto
    copy files to another document set.
    You can do this with codeless SharePoint Designer workflows as long as you can install the
    Codeplex Custom SharePoint Designer Workflow Activities. 
    These activities are also built-in to SPD2013. However, you can only use the custom activities in the SharePoint 2010 Platform.
    To install the custom activities, please follow the steps as below:
    Download the solution file form
    Useful Sharepoint Designer Custom Workflow Activities
    Copy the wps file to the Disk C.
    Open the SharePoint 2013 Management Shell.
    Run the command: add spsolution c:\ dp.sharepoint.workflow.wsp
    Open the Center Administration, click System Setting->Manage Farm Solution-> dp.sharepoint.workflow.wsp->Deploy to one or more Web Application.
    Open the SharePoint designer, create SharePoint 2010      Platform workflow, add action from Custom Actions.
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • MacBook accepted my entire music collection except for one boxed set.

    I downloaded my entire music collection to iTunes on my new MacBook with the exception of one boxed set. I tried the set at my daughter's house and it downloaded there just fine so I put it on my iPod but now when I sync it back at home I'll lose it since it's just a one-way street! Mac to iPod, never iPod to Mac. Is there a fix? Why won't my computer accept this one and only boxed set? (I have a huge collection and this is the only set it has happened with.)

    tweetie123 wrote:
    I downloaded my entire music collection to iTunes on my new MacBook with the exception of one boxed set. I tried the set at my daughter's house and it downloaded there just fine so I put it on my iPod but now when I sync it back at home I'll lose it since it's just a one-way street! Mac to iPod, never iPod to Mac. Is there a fix? Why won't my computer accept this one and only boxed set? (I have a huge collection and this is the only set it has happened with.)
    Make sure if it's from a CD, it must either go to AAC or MP3 in order to work on iTunes. WMA, OGG and etc. formats will not work.
    deltatux

  • How can we assign one attribute set to multiple business partners at a time ?

    How can we assign one attribute set to multiple business partners at a time ? Is it possible ? Can anyone explain me ?

    Hello,
    please refer to the following thread:
    How can we assign one Attribute Set to multiple Business Partners at a time? Is it possible?
    best regards,
    Johannes

  • I have two iTunes accounts. One was set up for my iPhone; the second was created for my iPad. I just updated my iPhone and it linked my to my second iTunes account instead of y primary. How can I change it back to my primary account?

    I have two iTunes accounts. One was set up for my iPhone; the second was created for my iPad. I just updated my iPhone and it linked my to my second iTunes account instead of my primary account. How can I change it back to my primary account?

    Hey bjboles,
    Welcome to Apple Support Communities.
    The article linked below describes what to do after changing your Apple ID, but you can use it as a guide to resolve the incorrect Apple ID account information entered issue that you described.
    Apple ID: What to do after you change your Apple ID - Apple Support
    Ciao, 
    -Jason

  • I have 3 IPOD touches.  I just got a new one and set up an apple id for it.  When i go to the store, it brings up an old apple id to one of the other ipods.  Why isnt it bringing up the id i gave to the ipod?

    I have 3 ipod touches.  Just got a new one and set up an apple id for it.  But when i use the ipod to go to store to make a purchace.  It tells me to sign in, and brings up an Apple ID and ask for password.  the problem is the Apple ID its bringing up is for my other Ipods.  How do i change it to bring up my id i set up with That ipod.  I never once put that id into the current ipod.  Like i dont even know how it got there.

    This is what yo have to do:
    Go to Settings>iTunes and App Stores and sign out and sign in with the other account.
    That is the only place.
    Try signing out. Then
    Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    Then sign back in.

  • I have SSRS parametarized report in that one data set have repeated values with query parameter . but while am mapping that query parameter to report parameter i need to pass distinct values. How can i resolve this

    I have SSRS parametarized report in that one data set have repeated values with query parameter . but while am mapping that query
    parameter to report parameter i need to pass distinct values. How can i resolve this

    Hi nancharaiah,
    If I understand correctly, you want to pass distinct values to report parameter. In Reporting Service, there are only three methods for parameter's Available Values:
    None
    Specify values
    Get values from a query
    If we utilize the third option that get values from a dataset query, then the all available values are from the returns of the dataset. So if we want to pass distinct values from a dataset, we need to make the dataset returns distinct values. The following
    sample is for your reference:
    Select distinct field_name  from table_name
    If you have any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • I must have a setting wrong on PSE 10.  When I use selection tool and select color, it is always blue.  What am I doing wrong?

    I must have a setting wrong on PSE 10.  When I want to fill a selection with color, I choose the color but it always comes up blue.  What am I doing wrong?

    What IP address does the TC have and what IP does the computer have?
    We need more info as we really have no idea what your network looks like.
    Modem router, model, type of broadband?
    TC setup as bridge or router?
    Is the computer getting internet via the TC?
    Are you using wireless or ethernet?
    Have you set IPv6 correctly to local link in the computer on whichever network client is doing the connection?
    Did this work the first time for backup and has now failed? If so simply reboot the TC. It is a constant bug that the TC is lost to the network.

  • My restriction password is not the one I set up and i can't go in to unrestrict somethin

    My restriction password I not the one I set up so I can't get in to unrestrict something and I not the right password I set up

    If someone else set up a Restrictions passcode, then unless that person will tell you the code, you will need to restore the iPad either using a backup created before you set the Restrictions passcode or to factory settings which will erase everything on the iPad.
    http://support.apple.com/kb/HT1414
    The same applies if you set a code yourself and have forgotten it.
    Regards.

  • JAXB unmarshalling elements with xs:type explicitly set

    I am working with XML content where the XSD defines an element as being of a complexType (say "ParentType") but the content explicitly sets the element's xs:type attribute to an extension of that complexType (say "ChildType").
    As far as I can tell the XML is valid, but JAXB issues the following when unmarshalling:
    DefaultValidationEventHandler: [ERROR]: Unexpected element {}:child1
    javax.xml.bind.UnmarshalException: Unexpected element {}:child1
    Where <child1> is added via the extension.
    Is this a problem with JAXB or my XSD?
    (XSD and XML enclosed below)
    XSD ------------------
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xs:complexType name="ParentType">
    <xs:sequence>
    <xs:element name="parent1" type="xs:string"/>
    <xs:element name="parent2" type="xs:string"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="ChildType">
    <xs:complexContent>
    <xs:extension base="ParentType">
    <xs:sequence>
    <xs:element name="child1" type="xs:string"/>
    </xs:sequence>
    </xs:extension>
    </xs:complexContent>
    </xs:complexType>
    <xs:element name="root">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="child" type="ParentType"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    XML -----------------------
    <?xml version="1.0" encoding="UTF-8"?>
    <root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="problem.xsd">
    <child xsi:type="ChildType">
    <parent1/>
    <parent2/>
    <child1/>
    </child>
    </root>

    JAXB doesn't handle OO schema design. I tried to do something similar where I defined a type called base and then defined that my document contained 1 or more base elements. Then I tried to unmarshall a document that contained elements that were of types extending from base. I ended up with the same issue.
    It seems that when the xjc compiler defines the classes it isn't smart enough to realize the element defined as parent could also contain a child element since child extends parent. Your XSD and XML are valid.
    I would think that JAXB should identify that because there is a type the extends the defined type, that an element of the sub-type might be subsituted i.e. check the actual type of the element in the XML before attempting to unmarshall it as the default type. It doesn't do that. I am not sure if this is as desinged, or a flaw in the implementation.

  • Combining result set of two services into one result set

    Hi,
    I have a model where I am getting one result set (6 Fields) from BI query and another result set (3 Fields which gives real time values) from OLTP system. I want to show the output of these two result sets into single result set (7 Fields). I have a common field in both the result sets as key field.
    I tried this using UNION operator but I am not able to set the Key fields and also in the table view of UNION operator I am getting any field to be added to table.
    Can anyone help me to solve this problem?
    Any help is appreciated.
    Regards,
    Amit

    Hi Amit,
    in this case, you have to use the combine-operator. However, this operator needs a key-field in each of these sets. E.g. Combine set (<u>customer-id</u>, order-id, week, delivery-state) with set (<u>customer-id</u>, city, client-class).
    The combine operator might not be available when compiling to webdynpro, I did not check that.
    Best Regards, Benni

  • Gettin "Assertion Failed" message and "Assert: parent node must have _DOMElement set", first when trying to bookmark and then when the "auto fill" on some web sites is used. Started after 3.6.9 automatic upgrade.

    Open Firefox and navigate to web site. Try to save to bookmarks and get the "assertion Failed" message and "Assert: parent node must have _DOMElement set" followed by a list of 8 (0-8) items.

    Try the Tiny Menu extension. I am using an older version of Tiny Menu on Lucid with Firefox 3.6.x and it works fine.

Maybe you are looking for