This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Jul 11, 2013, 7:21 AM
17 Posts
topic has been resolvedResolved

Passing an Object to a custom control via compositeData

  • Category: Managed Beans in NSF
  • Platform: All
  • Release: 9.0
  • Role: Developer
  • Tags: customcontrol,java,compositedata
  • Replies: 1

I have a CustomControl which has fields with values of a Java object (getters and setters).

I pass this object to the custom control via composite data,

This Object (company) which i pass is not a managed bean (but the Object 'managedBean' 'who holds it, actually is..)

<xc:customcontrol databean="#{managedBean.company}"></xc:customcontrol>......

In the CustomControl itself, the "company" object is declared as "object", but in fact its always an object of a class "com.app.Company".. when i declare it as an "object", it works fine, but when i set the "com.app.Company" as a type, it doesn't work (compiling error).. 

When i pass it as an "object", i think Reflection is going to happen, thich will cause some performance issues.. Is there any better practice? I had a look to DataContexts, but that also involves some performance issues...

Any hints?

Jul 11, 2013, 10:58 AM
17 Posts
Java Interfaces

I think i've found the solution myself:

I did not thought that the compositeData in custom controls are so clever:-) if i pass the object as an interface (e.g. com.app.IProzessitem), it works.. 

This really fits well in my design pattern, as i'm working on a quite big Workflow Application.. All the ProzessItems are different, but all of them have similar functions (select Company, forward/return, etc.).. So like in the java backend, i can also pass the interface in the GUI.. this will make my customcontrols more reusable..love it


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal