• George Nguyen
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 4
    Replies

Has any body worked on dynamc apex custom components.  Below is my code, but its not seem to be working.

 

in VF -- 

<apex:dynamicComponent componentValue="{!headerComponent}"/>

 

In controller -- 

public transient ApexPages.Component headerComponent { get; set; }

      public ObjectLayoutDragDrop_Controller() {
      Type t = Type.forName('Component.c.ContactComponent');
      if(t != null) {
             this.headerComponent = (ApexPages.Component)t.newInstance();
      }
}

  • January 17, 2013
  • Like
  • 0

  Hi,

 

  I want to use SOSL for searching a value in some(specific) fields rather than in ALL fileds.

  i have observed that only dataType can be mentioned there like Phone Fields or Email  fields .

 

 please let me know if there is any possibility to search in specific fileds.

 

 

thanks in advance

 

Hi,

In Apex it is now possible to create an instance of a Visualforce component using:
     Component.c.MyCustomComponent myDy = new Component.c.MyCustomComponent();

It is also possible to instantiate an instance of a class using:
    Type t = Type.forName('XXXXX');
    t.newInstance();

I was wondering if there was any way to combine these two, as Type.forName('Component.c.MyCustomComponent') returns null.

Thanks,

Carl

  • August 03, 2012
  • Like
  • 0

In a VF page I have two  <apex:component> A and B. This components are not related with each other each having their own controllers. How can I pass data between these two components? The same way I need to pass data from these components to the main page.which is again having a different controller. 

  

  I have seen the example of dependency Injection mechanism. But it helps in passing values from page to

components or from parent to child components. But I need to pass values between two components with no relation.

 

Any help would be appreciated

Joseph