I can add html elements to the DOM but how do I add a VF element such as apex:inputFile?

From this post I understand that I can use a wrapper class and apex:repeat but I was wondering if there is another approach for this.

Since I can't reference a variable from the running class Via JS Remoting, the Rendered attribute is not an option.

  • 1
    Best you explain what you are trying to do overall. apex:... tags have both a client and server side part and changing the DOM can only address the client side.
    – Keith C
    Sep 9 '17 at 15:00

apex:dynamicComponent component allows to push component definition from server side based on some programming logic. You can use this to create apex:inputFile at runtime and push to client.

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.