1

I want to create visualforce component similar to say pageblocktable. If you see the behaviour of pageblocktable it can only be included inside a pageblock. similarly columns can be included inside pageblocktable/datatable.

I want to replicate the same in my custom visualforce component such that component B can only be included inside component A.(both A and be are custom visualforce component)

1

I would use <apex:attribute name="myValue"> and assign it to a boolean variable inside of component a and than use that to determine if it's coming from component b to determine if the parent is correct.

1
  • well this do the work but while developing(using the component in the page) I have to manually set the value for this attribute. Any other work around?
    – Avidev9
    Sep 19 '12 at 15:59
0

If component B is always required within component A... why not build your B component within A component. Pass in "null" for attributes if you want component A without a component B.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.