Delete a UI component programmaticaly using a bean

Hi,
I have a page where i have a couple of drop down menus. these menus i am creating via a bean on click of a button. so each time i click on the button a row with two drop down menus is created. i also have a remove button associated with each row; also generated from the bean on click of the button. on click of this remove button the two drop down menus should get deleted. I am able to call a bean method on click of the button. In that method I am getting the ids of both the components. Now how do i delete the components?

Get the containing UIComponent, getChildren java.util.List<UIComponent> and remove the componet from the List.

Similar Messages

  • How to Use COM Component in a Java Bean

    Dear Sir,
    How can I use a COM Component in a Java-Bean . I am having a COM Component for reading Weighment Reading on a Serial Port and want to use this Component in a Java-Bean . I would also like to call the methods of this COM Component inside my Java-Bean . COM Component is a dll file .
    Please guide me how to go ahead . If possible kindly provide some sample code for the same .
    With Thanks and Regards
    B V Mittal

    You need a Java to COM bridge like Jacob. Try searching this forum for more information, I've answered this question several times before.
    Dom.

  • How to delete a database record by using EJB entity beans

    Hi, All,
    Does anyone know how to use entity bean to delete a database record? I have all the EJB entity beans created, including access beans to each. I can successfully create records, find and update records, however, I haven't find a way to delete records yet.
    Your response is appreciated.
    Cathy

    Please see EJB Forums for continue discussion on this subject.
    Reference titile: "how to delete database record by using CMP entity beans "

  • Error in Java based iView when trying to use J2EE bean

    I am trying to create a iView based on Java Portal app.
    [Java portal app has dynPage based Portal App Object]
    I created a PAR and uploaded to Portal. I created iView and worked it fine in (preview).
    [iView created using "Content Administration -> Portal Content -> New From Par -> iView"]
    I deleted my iView and removed my archive (using "Java Developer -> Portal Archive Deployer/Remover").
    I changed java portal project so that I can reference a bean from J2EE app already deployed on server.
    [Edited Portalapp.xml to add a
        <property name="PrivateSharingReference" value="SAPJ2EE::service:p4, SAPJ2EE::test.myApp/myBean"/>
    This time PAR installs fine, but when I try to preview iView, get following error.
    Portal Runtime Error
    An exception occurred while processing a request for :
    iView : N/A
    Component Name : N/A
    com/sapportals/portal/htmlb/page/PageProcessorComponent.
    Exception id: 02:36_11/08/05_0016_4991450
    See the details for the exception ID in the log file
    I removed "SAPJ2EE::test.myApp/myBean" from portalapp.xml and rebuilt PAR and rebuilt iView but I get same error as above.
    1. Where are logs located (for iView errors)?
    2. Any pointers on using J2EE bean? (I am trying to use step described in topic  "J2EE Applications Access from Portal Applications" from manuals).
    3. Do I need to reference any additional libraries to use p4?
    Thanks.

    The problem seems to be in portalapp.xml
    I created second PrivateSharingReference in it
    <property name="PrivateSharingReference" value="com.sap.portal.htmlb">
    <property name="PrivateSharingReference" value=" SAPJ2EE::service:p4, SAPJ2EE::test.myApp/myBean"/>
    I changed to be one entry only like
    <property name="PrivateSharingReference" value="com.sap.portal.htmlb, SAPJ2EE::service:p4, SAPJ2EE::test.myApp/myBean"/>
    Now iView works again....But still donot know where log is..

  • How to access backing bean of a xml component , in a managed bean of ADF

    Hi,
    We wrote a xml component in JSF and this component is used in ADF project by including the component as jar .
    In a master detail page , we need to update the value of the xml component, when the master row is changed. How to do this.
    We are trying to do this by accessing the backing bean of the xml component in ADF project's managed bean. So when ever the row changes, we can access the managed bean in ADF and then can set the value of the xml component by accessing it's backing bean
    But i can't access the backing bean instance of the xml component in the ADF managed bean. Could you let me know how to do this. Thanks .

    Thanks for the response Shay. The xml component is added as a custom component , with a separate faces-config.xml file . This component is added to ADF project as a jar with a custom tag.
    In the ADF project , i'm having different managed beans and i can access them from a different managed bean.
    The issue is, i can't access the added custom component's backing bean which is available from a different jar , defined in a separate faces-config.xml file . This backing bean is defined with request scope.

  • Using Spring beans from EJB MDB

    I have a situation where I need to use spring beans from an EJB 3.0 MDB. The project does not have any webapps or anything,
    it will be only a MessageBean facade that needs to call spring beans. It is meant to be a service, that can be called by usign a single EJB message.
    The problem is I cannot get the spring context to load properly, since the MDBean it self is initialized(constructor called) only when it receives the first message from the broker, thus It's "too late" to initialize the spring context. What I want to do is load the spring context when the EJB is deployed in the Java EE container. So, is there a way I can call a some method, class, anything when the EJB is deployed in the container. Can I do something with a deployment descriptor?
    I am using glassfish V2 UR1, EJB 3.0, Spring 2.0.7 The project is deployed as a jar.

    Miku wrote:
    I have a situation where I need to use spring beans from an EJB 3.0 MDB. The project does not have any webapps or anything,
    it will be only a MessageBean facade that needs to call spring beans. It is meant to be a service, that can be called by usign a single EJB message. Why not make it a real service? Spring's contract first web services are a very nice way to go. It hides the fact that you're using a message-driven component for processing, too.
    %

  • Persisting Declarative Component attributes using MDS

    Hi,
    I have created a Declarative Component with some custom attributes.
    Is there a way to persist the component attributes using MDS or by some other means.
    Thanks
    Prahlad

    Hi Krithika,
    Thank you for your answer. I decComp is null only if I try this code in the binding method. If I define a popupFetchListener and bind to a method in a managed bean, decComp is not nut. I don't know how to get attribute values and create my UIComponent programatically.
    Does anyone know how to achive that?
    Regards
    Joseba

  • Creating a dynamicly sorted datatable from myfaces using request bean.

    Hello.
    Using MyFaces...
    Has anyone got this working, all i get is a "Base is null" exeption when following the example sortTable.jsp from the myfaces source.
    I use a BeanManager.prepareBeans(request) whom i call att the first line of the jsf file. The prepareBeans creates the beans and sets them using valuebindning, all beans are reqeust beans and should be so.
    The created beans are displayed at the page with the sorting headercells rendered. When i hit the sorting header a exception occures, this can be fixed by using session beans but i dont want that.

    Well i did not get this working and i am now creating my own custom component.

  • How do u save datas more than one table using net beans ide using JSF

    Hi,
    I am new to JSF.
    I save / delete / update / New master table using POJO (Plain Old Java Objects), database - oracle and Toplink Persistence Unit.
    How do u save data more than one table using net beans ide using JSF (I am using POJO) ?
    and also Tell me the reference book for JSF.
    Thanks in advance.
    regards,
    N.P.Siva

    SivaNellai wrote:
    I am new to JSF.
    So, I am using net beans IDE 6.1 from sun microsystem. It is a free software.No, you don't drag'n'drop if you're new to JSF. Switch to source code mode. Write code manually, with the help of IDE for the speed up.
    So, please guide me the reference books, articles. I need the basic understanding of JSF, net beans IDE.[JSF: The Complete Reference|http://www.amazon.com/JavaServer-Faces-Complete-Reference/dp/0072262400] is a good book. The [JSF specification document|http://jcp.org/aboutJava/communityprocess/final/jsr252/index.html] is also a good reading to understand what JSF is and how it works. There are also javadocs and tlddocs of Sun JSF Mojarra.

  • Disadvantages of using entity beans.

    can I know the disadvantages of using entity beans.

    sigh I guess if someone puts it on a website it must be true...
    "Forces the use of a heavy component mechanism for fine grained business objects."
    Heaviness is not some arbitrary side-effect. It is directly due to the services provided by the EntityBeans (transactions, etc). If you need those services, you pay the price. If you don't then you shouldn't be using EJB to begin with. Also with the advent of LocalInterfaces, fine-grainedness is no longer a liability.
    "More complex than JDO limiting developer productivity."
    Perhaps it has less to do with limited productivity, and more to do with limited developers.
    "More difficult to achieve good performance."
    Compared to a simple data storage mechanism, sure.
    "Inheritance not supported."
    Really? Wow, I guess all the EJB code I've written for the last 3 years doesn't really work.
    "Cannot be used for persistence in non-application server environments."
    Uhh, yeah, but seeing as how the decision to use EJBs is not limited to the persistance scheme, the non-use of an application server is moot.
    "There is no dynamic query mechanism to lookup entity beans (finders are specified at compile time)."
    And what compiled business process (i.e SessionBeans) requires dynamic lookup of arbitrary data? Humans performing search functions can be done via entity beans, but probably should not be done since a large searches do not (or very rarely) need to be transactional.
    "It is not easy to write unit tests for beans as it is not possible to use them outside of the application server."
    For a long time this was true, but there are now many unit test suites designed for J2EE.
    "No support for automatic primary key generation."
    In the spec, no. But it's fairly trivial to implement on your own.
    "Only relational databases are supported."
    If you use CMP, yes. If you use BMP, you can do whatever you want inside your ejbLoad()/ejbStore() methods. Another reason to not use CMP.

  • How can i design a EJB application using session Beans?

    Hello,
    I am designing a Find application using EJB. Here a user is prompted a search page, where he can enter the search criteria's. Then on click of submit, the query is formed at the server side depending on what criteria's were selected. Then a jdbc query is performed and the results are returned back to the user. Here no session is maintained for the users. Can anyone suggest me how to design this application using EJB. Should i use entity beans for this or session beans will suffice? Should the jdbc query be performed in the bean itself or should it be outside in a helper class? Please kindlu suggest me the design for this application...
    Regards,
    Subbu

    Hi,
    First of all, I'm unable to figure out why you need to use EJB for this scenario. You can write a helper class to frame and execute the query.
    If you really want to use EJB, then I suggest you use a stateless Session Bean with transaction attribute as TX_NOT_SUPPORTED. From the session bean, you can call the helper class. But, by avoiding the session bean, you can eliminate remote calls, thus improving your performance. Also, check if the database & the db driver you are using supports sql caching.
    Regards,
    Raj.

  • How do I use a bean to determine which message bundle value to use?

    Is there a way to use a bean to determine which message from my message bundle I use? I want to be able to call my bean in JSF/JSP page, have the bean return a String, and use that String to pick a message from my message bundle properties file. Now I can do this:
    <h:outputText value="#{bundle.messageA}" />or this:
    <h:outputText value="#{bean.messageName}" />where I have a method on the bean like this:
    public String getMessageName(){
         if(someTest == true){
              return "messageA";
         } else {
              return "messageB";
    }I want to combine the two so my bean determines which message I pick. I want to do this because I want to keep all the text a user sees in the message bundle file. However, based on the state of the bean, I want to display different messages.
    Thanks in advance,

    Ah this way. So you want that much of nasty if statements in the bean instead? ;)
    Then make use of the fact that you also can access Map values using the brace notation. E.g.
    <h:outputText value="#{bundle[bean.messageKey]}"/>Where getMessageKey() returns the message key, e.g. 'messageA' or 'messageB' and so on.

  • TS3992 icloud backup won't delete, because it is in use

    I have no idea why am i unable to delete the backup from the icloud, it keep saying it can't delete because it is n use. What should i do ?

    Hello sgpwriter
    Open Disk Utility, select the External HD's image then First Aid and Repair Disk!
    Dennis

  • Bug: Numbers File cannot be deleted because it is in use

    Whenever I try to delete a Numbers 09 file, I get the error message that the file cannot be deleted because it is in use. I get this without the file being open at all, so it shouldn't be in use and I should be able to delete it.

    It's actually a plain and simple file. It contains several sheets, each sheet 1 or 2 tables, but no links to external files nor links within the file from one table to another.
    And indeed, I only have it with Numbers files even if I try to delete the file immediately after startup of my computers (iMac and Macbook, both running the same versions of OS X and Numbers). If I try a couple of times, sometimes the file is deleted, but I haven't found out what has changed so that the file can be deleted.

  • HT4946 I cannot delete my old phone from the iCloud back up.  It says "cannot delete backup"  this back up cannot be deleted because it is in use

    how do I delete my old phone from my icloud storage.  when I try it says "cannot delete backup-This backup cannot be deleted becasue it is in use"
    and my new one is listed but has 0KB (my old on has 4.5 and I cannot even back up because it says storage is full!!)

    I have the same problem here and it wont let me do another back up or delete the old one.... Please help!!!! Anyone

Maybe you are looking for

  • Asa 5505 sub interface plus ports

    I have never used 5505 I gave used higher firewalls and all of them can do sub interfaces normally we make sub interfaces and vlans are assigned to them I m trying to config 5505 can someone tell me how I can create sub interfaces ? As I saw few conf

  • Urgent help about gps

    hi guys iam using an nokia n95 european model in usa iam not able to use gps can anyone help me or can i update the software

  • Deployment - best practices

    There is a lot of questions/answers about deployment strategies in this forums . i solved a lot of problems an get answer to my questions but there are some remaining problems.. My problem : I developed a project. There are several mappings, source/t

  • HT4168 Is there a version of Pages that allows you to paste a webpage?

    Is there a version of Pages that allows you to paste a webpage into Pages and retain the text that's on the webpage?  Pages-09 drops about 90% of the web-page text, when a webpage is pasted into Pages.

  • Ipad using wrong number for imessage

    After upgrade, AT&T ipad selected telephone number from our Verizon iphone for imessages, this number is not associated with our Apple account, I've checked.  How do I change it?