How can we delete adf component at runtime

Hii all,
i am developing an application in which i am generating the ui components at runtime, and displaying them it the pop up window,
the ui component is generated according to the list of objects.
The problem i that, this list changes every time as it is specific for a particular document, so when i open the pop up again the old component generated
are still there, i have a command button on which i am performing the following action to delete the previously generated components -
public void removeExtraFieldsAddedToUploadForm(UIComponent parentTableLyoutComponent,boolean isCommandButtonClick){
try{
if(parentTableLyoutComponent.getChildCount() > 6) {
List <UIComponent> addedComponents = parentTableLyoutComponent.getChildren();
for(UIComponent uicomponent:addedComponents){
String strCompID= uicomponent.getId();
if(strCompID.indexOf('x') == 0) {
uicomponent.setRendered(false);
if(isCommandButtonClick){
AdfFacesContext.getCurrentInstance().addPartialTarget(parentTableLyoutComponent);
this things works fine as it refresh the components according to the current list of objects, but when i fetch the values for the components form the pop up window, i am also getting the values for the earlier generated components.
Is there is any way through which i can delete the previously generated components..??
Thanks.
JDeveloper Version 11.1.1.6.0

As you only set the rendered attribute to false the components are not rendered on the page up are still part of the component tree. So you still can access them (which you do if you iterate over the list of children).
As you get a {noformat}List<UIComponent>{noformat} from the panelFormLayout you should delete the components from the list
addedComponents.remove(uicomponent);Timo

Similar Messages

  • How can i delete software component in the IR

    How can i delete software component in IR,when there are too many SCs?

    If you have to delete a SWCV, you have to delete all the namespaces with in that first. Open a name space and delete all the user defined objects in that first. Then delete the Std Fault and log data types and delete it and remove the name space from the SWCV by opening the SWCV and using - button on the name space. Now activate the changes. This will delete the name space.
    Repeat the step for all the name space with in the SWCV. After all objects are deleted. Open the SWCV and use the menu, SWCV ->Delete object.
    Regards,
    Jai Shanakr

  • Problem with the MenuBar and how can i delete a own component out of the storage

    Hello,
    I opened this thread in the category "Flex Builder 2", but
    under this category my questions fit better.
    I have a problem with the MenuBar and a question to delete a
    component out of storage.
    1. We have implemented the MenuBar, which was filled
    dynamically with XML data.
    Sporadically it will appear following fault, if we "mousover"
    the root layer.
    RangeError: Error #2006: Der angegebene Index liegt
    außerhalb des zulässigen Bereichs.
    at flash.display::DisplayObjectContainer/addChildAt()
    at mx.managers::SystemManager/
    http://www.adobe.com/2006/flex/mx/internal::rawChildren_addChildAt()
    at mx.managers::SystemManager/addChild()
    at mx.managers::PopUpManager$/addPopUp()
    at mx.controls::Menu/show()
    at mx.controls::MenuBar/::showMenu()
    at mx.controls::MenuBar/::mouseOverHandler()
    Here a abrid ged version of our XML to create the MenuBar:
    <Menuebar>
    <menu label="Artikel">
    <menu label="Artikel anlegen" data="new_article" />
    <menu label="Artikel bearbeiten" data="edit_article" />
    <menu label="Verpackung">
    <menu label="Verpackung anlegen" data="new_package" />
    <menu label="Verpackung bearbeiten" data="edit_package"
    />
    </menu>
    <menu label="Materialgruppe">
    <menu label="Materialgruppe anlegen"
    data="new_materialgroup" />
    <menu label="Materialgruppe bearbeiten"
    data="edit_materialgroup" />
    </menu>
    </menu>
    </Menuebar>
    It is a well-formed XML.
    2. Delete a component out of storage
    We have some own components (basically forms), which will be
    created and shown by an construct e.g.
    var myComponent : T_Component = new T_Component ;
    this.addChild(myComponent)
    Some of our forms will be created in an popup. On every call
    of the popup, we lost 5 mb or more, all childs on the windows will
    be removed by formname.removeAllChild();
    What cann we do, that the garbage collector will dispose this
    objects.
    Is there a way to show all objects with references (NOT
    NULL)?
    I have read in the Flex Help, that
    this.removeChild(myComponent) not delete the form and/or object out
    of the storage.
    Rather the object must be destroyed.
    It is sufficient to call delete(myComponent) about remove
    this object out of the storage as the case may be that the
    garbage-collector remove this object at any time?
    Or how can I destroy a component correctly. What happens with
    the widgets on this component e.g. input fields or datagrids?
    Are they also being deleted?
    Thanks for your help.
    Matze

    If you mena the "photo Library" then you cannot delete it.
    This is how iphone handles photos.  There are not two copies.  There a re simply two places from which to access the same photos.  ALL photos synced to iphone can be accessed via Photo Library.  Those same pics can be accessed via their individual folder.

  • How can I consume a c# windows runtime component in a WRL (C++) class?

    I would like to instantiate a class of a C# windows runtime project, from a WRL project.
    In order to make the C# class I have created a WRL project to generate an interface for it to implement. This has worked, but I would rather do it all in the one C# project. I don't know how to do this, and I also don't know how to finally consume the C#
    project (and the resulting .winmd file) from a Wrl project. 

    You're right; I'll post back here.
    Edit: I asked over here:
    https://social.msdn.microsoft.com/Forums/windowsapps/en-US/53a77d09-01b1-4039-8ad3-207b47b08775/how-can-i-consume-a-c-windows-runtime-component-in-a-wrl-c-class?forum=winappswithnativecode#53a77d09-01b1-4039-8ad3-207b47b08775

  • How to initialize an adf component before a page loads

    Hi all
    I use JDeveloper 11.1.2.2.0
    I have two pages:
    first page has a link to a second page
    <af:document title="first.jspx" id="d1">
      <af:form id="f1">
        <af:commandLink text="Page 2" id="cl1" action="goToSecondPage" actionListener="#{Bean.handleLinkActionEvent}"/>
      </af:form>
    </af:document>and the second page has an inputText component:
    <af:document title="second.jspx" id="d1">
      <af:form id="f1">
        <af:inputText label="Text" id="it1" binding="#{Bean.inputText}" readOnly="true"/>
      </af:form>
    </af:document>First I load first.jspx and than I click the link. This event is handled in handleLinkActionEvent() method, in which I want to set a value to the inputText component of the second page. But I can't do it, because as expected I get NullPointerException.
    So the question is how to initialize an adf component before a page loads?
    Evgeny Michuk
    Edited by: Evgeny Michuk on Oct 4, 2012 11:30 PM

    Thanks a lot for your replies and links, it gives me some new knowledges.
    I got your approach and achieved the aim for the described situation with tag <f:setPropertyActionListener>:
    <af:commandLink text="Page 2" id="cl1" action="goToSecondPage"
                           actionListener="#{Bean.handleLinkActionEvent}" binding="#{Bean.firstPageLink}">
      <f:setPropertyActionListener target="#{pageFlowScope.text}" value="Hello, World!"/>
    </af:commandLink>and for the inputText component I set the value:
    <af:inputText label="Text" id="it1"  binding="#{Bean.inputText}"
                                  readOnly="true" value="#{pageFlowScope.text}"/>I used request scoped managed bean and it is shared for both pages.
    I understand that I can set a value of some attribute for managed bean
    and use it to set a value for inputText component of the second page,
    but as I understand it is almost the same way as usage of tag <f:setPropertyActionListener>.
    In my real situation on the second page I have a dynamic table, and it's field is read only.
    Structure of this table depends on a link clicked on the first page.
    So I define components for table columns in runtime, it may be outputText, inputDate, goLink and some others.
    And I have to get table through the UIComponent binding to set columns.
    Certainly I can define all needed components for all columns
    and render it according to the column types
    <af:table value="#{Bean.collectionModel}" var="row" id="t1" binding="#{Bean.mainTable}">
       <af:forEach items="#{Bean.columnDescriptionList}" var="column">
          <af:column headerText="#{column.caption}" id="c1">
             <af:outputText value="#{row[column.fieldName]}" id="ot1" rendered="#{column.type == '1'}"/>
             <af:inputDate value="#{row[column.fieldName]}" id="ot2" rendered="#{column.type == '2'}"/>
             <af:selectBooleanCheckbox id="sbc1" selected="#{row[column.fieldName] == '1'}" rendered="#{column.type == 'n'}"/>
          </af:column>
       </af:forEach>
    </af:table>but I think it is not very good.
    Have you any idea?
    P.S. I hope I clearly explained my situation =)
    Evgeny Michuk

  • How can I delete this today, please?? FYI: Skype continues to work just fine.

    since accepting the invitation to upgrade to Version 7, the following truly annoying popup box appears every time I open Firefox or one of my bookmarked sites: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [ISkypeFfExtension.Initialize]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://skype_ff_extension/content/browserOverlay.js :: <TOP_LEVEL> :: line 9" data: no]
    How can I delete this today, please?? FYI: Skype continues to work just fine.

    Thanks - but exactly how do I do that easily, please?

  • How can I delete an object?

    If I create a JLabel, how can I delete it?
    Somebody told me that with remove.
    How do you use it?

    [Swing Tutorial|http://java.sun.com/docs/books/tutorial/uiswing/]
    [java.awt.Container.remove(java.awt.Component)|http://java.sun.com/javase/6/docs/api/java/awt/Container.html#remove(java.awt.Component)]
    This is not "deleting an object" it is "removing a GUI element from a container". You can not "delete an object" in Java, you can remove all references to it and let the GC get rid of it, but from the body of your question it sounds like you want to "removing a GUI element from a container" not "delete an object".

  • HOW CAN I FIX Microsoft Visual c runtime library R6034

    HOW CAN I FIX Microsoft Visual c runtime library R6034

    Uninstall your existing copy of iTunes. Delete any copies of the iTunesSetup.exe (or iTunes64Setup.exe) installer files from your downloads areas for your web browsers and download a fresh copy of the iTunes installer from the Apple website:
    http://www.apple.com/itunes/download/
    (The current build of the 11.1.4.62 installer was changed a few days ago, which fixed the bulk of the reports of MSVCR80.dll/R6034/APSDaemon.exe/Error-7/AMDS-could-not-start trouble ... but the build number on the installer was not changed. So we're trying to make sure you do the reinstall using a "new good" 11.1.4.62 installer instead of an "old bad".)
    Does the install with the new copy of the installer go through properly? If so, does that clear up the error message?
    If you still have the same error messages cropping up, then try the procedures from the following user tip:
    Troubleshooting issues with iTunes for Windows updates

  • Two apple I.D., one with the .me email address I want, how can I delete it so that I can use that .me address on my other account?

    I have two apple I.D., one with the .me email address I want, how can I delete it so that I can use that .me address on my other account
    Or is it possible to transfer the purchases (apps) to my new .me account so that I can re-download them in the future without having to switch accounts?

    crazyshark wrote:
    I have two apple I.D., one with the .me email address I want, how can I delete it so that I can use that .me address on my other account
    Or is it possible to transfer the purchases (apps) to my new .me account so that I can re-download them in the future without having to switch accounts?
    You can't do this, and you can't transfer purchases between accounts. There is no conflict about using one ID for iTunes, iTunes in the Cloud and iTunes Match (the ID you've been using for iTunes) and using the other ID for iCloud.

  • HT1918 how can i delete credit card from the itunes store?

    I prefer just to use gifts cards instead of my credit card but itunes wont let me delete my credit card information, and now I cant even redownload applications that i have previously purchased on my ipad. How can I delete and leave my account with no credit card info?

    Moorside01 wrote:
    I have the same issue. My son has an iPod Touch, but it seems that he has to have a credit card associated with the Live ID
    Live ID is for Microsoft.
    Are you saying you do not have the None option when you review his payment info?

  • How can I delete an iTunes account that has been deactivated?

    I deleted an old Apple ID with the help of a call to Apple Support.  However, my iphone is still trying to use the old ID.  How do I log out of the old ID and into the new?  Or, how can I delete the old ID when it has already been deactivated?  (Cannot delete with phone)

    Only iTunes Support can potentially delete an account (which would also delete any purchase history for it, so you would no longer be able to authorise that content on a computer, redownload it, and download updates to its apps) : http://www.apple.com/support/itunes/contact/
    Or you could just remove any personal info from it (e.g. payment details if you have any on it) and stop using it

  • How can I delete an iTunes account ?

    How can I delete an iTunes account ?

    Only iTunes Support can potentially delete an account (which would also delete any purchase history for it, so you would no longer be able to authorise that content on a computer, redownload it, and download updates to its apps) : http://www.apple.com/support/itunes/contact/
    Or you could just remove any personal info from it (e.g. payment details if you have any on it) and stop using it

  • How can I delete my itunes store account

    How can I delete my itunes store account

    At the moment you can't - just remove any personal info from it (e.g. credit card details) and stop using it. If you purchased any content from Apple with it (music, films, apps etc) then you will need to remember the account id and password in case you ever want authorise it so as to use it on a different computer (or the same computer if, for exampel, you upgrade the OS)

  • How can I delete an old iCloud account for which I do not remember the password?  The email address linked to that account is no longer active.

    The email linked to that account is no longer active.  How can I delete this old account and use a new one?

    Although your profile says you're running iOS 5.1.1 it sounds like you're running iOS 7 (otherwise you would not need your password to delete the old account).  Assuming that's true, and your iCloud ID has changed but you need to delete the old account in order to change to your new one, go to https//appleid.apple.com, click Manage my Apple ID and sign in with your current iCloud ID.  Tap edit next to the primary email account, tap Edit, change it back to your old email address and save the change.  Then edit the name of the account to change it back to your old email address.  You can now use your current password to turn off Find My iPhone on your device, even though it prompts you for the password for your old account ID. Then go to Settings>iCloud, tap Delete Account and choose Delete from My iDevice when prompted (your iCloud data will still be in iCloud).  Next, go back to https//appleid.apple.com and change your primary email address and iCloud ID name back to the way it was.  Now you can go to Settings>iCloud and sign in with your current iCloud ID and password.

  • How can I delete my old OTN Account ?

    Hallo,
    I create a new OTN Account, because I can't change my e.Mail.
    How can I delete my old Account ?
    With kind regards
    Roanld Breuer

    You cannot delete old accounts.

Maybe you are looking for