1

I am trying to put together a custom controller class implementing the fluid interface builder pattern. Said class does compile, and my question is how can it be implemented inside a VisualForce page's data iterator such as pageBlockTable.

The controller class works as expected when tested inside the anonymous window; here's the tested code:

ContactsListController ctrller = ContactsListController.objInstance();
ctrller.sortBy('FirstName').sortOrder('DESC').RecCount(5);

ctrller.getContacts();

This is what I have tried:

<apex:pageBlockTable value="{! contacts.objInstance().SortOrder('DESC').RecCount(3) }" var="ct">...

and this is the error message I get:

ContactsListController 0 Syntax erro. Extra '.'

I ran out of ideas; can anybody shed some light on this?

Thank you all for your time and help.

  • move the fluent expression to a public method in the controller and reference the method in the VF page – cropredy May 2 at 14:20
0

It can't. Visualforce does not support parameters for functions in the way you describe. Any such logic would have to be carried out in the controller or extension code for the page.

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.