@Override
public void encodeBegin(FacesContext ctx,
UIComponent component) throws IOException {
FormBuilder formBuilder = (FormBuilder) component;
String uuid = UUID.randomUUID().toString();
FormBuilderAttributesContainer container = new FormBuilderAttributesContainer();
container.setForm(formBuilder.getForm());
container.setWorkflowStates(formBuilder.getWorkflowStates());
container.setConstraintClients(formBuilder.getConstraintClients());
container.setMetaDataObject(formBuilder.getMetaDataObject());
container.setMetaDataDescriptions(formBuilder.getMetaDataDescriptions());
container.setMetaDataFetcher(formBuilder.getMetaDataFetcher());
ModelApplicationBean.getInstance().putForm(uuid, container);
HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();
formBuilder.getIFrame().setSrc(request.getContextPath() + "/pages/formbuilder.xhtml?uuid=" + uuid);
formBuilder.getCallbackButton().setActionExpression(formBuilder.getActionExpression());