Domanda

In "Start Workflow" page, "Start Workflow" form is generated from Form-Engine.

I want to disable "Start Workflow" button when submitting form. When callback, I want to enable this button.

In start-workflow.js, I can get this button by using

var submitButton = Dom.get(this.generateId + "-form-submit-button");
submitButton.setAttribute("disabled", "disabled");

But adding attribute "disabled" does not work in IE8 as button can even click. But it works in mozilla. But by using yui disabled,

this.submitElements[0].set("disabled", true); can be work.

The problem is that how can I access Alfresco.FormUI(form.js) from Alfresco.component.StartWorkflow(start-workflow.js). Since they are separate yui object, I do not know how to access from one another.

If you know, let me share your knowledge and experience.

È stato utile?

Soluzione

If the other component extends Alfresco.component.Base then it should have registered its presence on the page when it was instantiated.

You can then use Alfresco.util.ComponentManager (docs) to retrieve the instance you want, e.g. if it is the only instance on the page,

var otherCmpt = Alfresco.util.ComponentManager.findFirst(p_sName)

where p_sName is the full name of the class as a String value, e.g. "Alfresco.FormUI".

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top