• maraflux
  • NEWBIE
  • 0 Points
  • Member since 2009

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



Hi

I need to be able to call a method in a Custom Controller and pass it a parameter. I could not find a way to do this.

So basically, I came up with a workaround using a CustomComponent, passing it an Attribute. Then my CustomController for the Component uses that Attribute to determine its output.

My question is, is this slow and/or heavy?! Is there a better/easier way to do this with VisualForce page and Apex?

Here is a sample use of how I have it set up now.

VF page:
<td class="whee"><c:TranslateComponent translate="{!myVaryingText}" /></td>

 

Component:

<c:TranslateComponent:
<apex:component controller="TranslateController">
    <apex:attribute name="Translate" type="String" description="Text to be translated." required="required" assignTo="{!Translate}" />
    {!Translated}
</apex:component>

Message Edited by maraflux on 07-31-2009 03:47 PM



Hi

I need to be able to call a method in a Custom Controller and pass it a parameter. I could not find a way to do this.

So basically, I came up with a workaround using a CustomComponent, passing it an Attribute. Then my CustomController for the Component uses that Attribute to determine its output.

My question is, is this slow and/or heavy?! Is there a better/easier way to do this with VisualForce page and Apex?

Here is a sample use of how I have it set up now.

VF page:
<td class="whee"><c:TranslateComponent translate="{!myVaryingText}" /></td>

 

Component:

<c:TranslateComponent:
<apex:component controller="TranslateController">
    <apex:attribute name="Translate" type="String" description="Text to be translated." required="required" assignTo="{!Translate}" />
    {!Translated}
</apex:component>

Message Edited by maraflux on 07-31-2009 03:47 PM