Best way to deploy changes to widget template and custom jsf converter JAVA code with Studio? Without Studio?

I have changes to both a widget template and the template's associated custom jsf converter (JAVA) I would like to deploy.

The files are an .xhtml template and java file (class) contained in a bundle.

What is the best (easiest) way to deploy both.

These “updated” files provide replacement and additional functionality implemented by the combination existing files in the bundle

Can Studio handle the .xhtml changes? Java?

I know the Studio layout will need to change, these changes have been made.

0 votes

2 answers

1606 views

ANSWER



Sorry my mistake.

I never tried to attach a converter to a Nuxeo widget and there is no converter property. Maybe using widget template you can add this:

   ... copy of the widget you want override 
  <h:inputText id="yourFieldIdValue" value="#{UserRegistration.user.age}">
    <f:converter id="fooConverter"/>
  </h:inputText>
   ... copy of the widget you want override ... 

And your component

@Name(“fooConverter”) @BypassInterceptors @Converter public class FooConverter implements Converter {

@Transactional
public Object getAsObject(FacesContext context, UIComponent cmp, String value) {
  EntityManager entityManager = (EntityManager) Component.getInstance("entityManager");
  entityManager.joinTransaction();
  // Do the conversion
}

public String getAsString(FacesContext context, UIComponent cmp, Object value) {
  // Do the conversion
}

}

(code copied from SEAM documentation.)

I'm not sure at all and maybe someone better than me on JSF/Seam/Widget system will give you the right way. But I hope that will help you.

0 votes



Hi,

Nuxeo Studio open the world of Nuxeo EP configuration and development for the non-developper users/integrators. Interface is simple and intuitive for functional people.

Overriding an xhtml resources is what you can do with Nuxeo Studio, and you may see it in the documentation. But JSF validator is out of what you can do with Nuxeo Studio and that's why we have created Nuxeo IDE.

Nuxeo IDE create a bundle project easily. And my piece of advice would be to use it and add your XHTML resources and your JSF validator in it. You may know that validator can be a method on a Seam component that can be easily created with Nuxeo IDE. You will not have to declare the validator. You will just have to write ${yourComponent.yourValidationMethod} into the validator value.

You will benefit of your Seam Component Hot Reloading during the development.

Nuxeo IDE is free and documentation is here:

http://doc.nuxeo.com/x/ZYKE

I will add that you can add validator directly into widgets you use when you describes form of documents. You have a documentation that explains this point:

http://doc.nuxeo.com/x/pgQz

Hope this will help.

0 votes



I need a custom converter not validator. This converter will not be (or be part of) a SEAM component, there is no need for the extra overhead. It's just a POJO called from JSF. See:http://docs.oracle.com/cd/E16764_01/web.1111/b31973/af_validate.htm section 6.4 the first part of this oracle writeup.

Do your comments apply to converters as well as validators?

12/19/2011