composite-component

JSF 2 cc: pass attribute into backing bean

I am creating a custom component that is an image viewer for a given product number. I access these files using a modified version of BalusC's ImageServlet: @WebServlet(name="ImageLoader", urlPatterns={"/ImageLoader"}) public class ImageLoader extends HttpServlet { private static final int DEFAULT_BUFFER_SIZE = 10240; // 10KB. ...

JSF2: limiting cc:attribute to a given object type within a List

If I had a managed bean as follows: @ManagedBean @RequestSchoped public class Example { private List<String> stringList; private List<Long> longList; // getters, setters, etc. down here } and had a custom component which accepted a List as an attribute: <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W...

JSF2 composite component: action isn't recognized

I have a composite component: ... <!-- INTERFACE --> <composite:interface> ... <composite:attribute name="actionMethod" method-signature="java.lang.String action()" required="true" /> ... </composite:interface> <!-- IMPLEMENTATION --> <composite:implementation> <h:form> ... <h:commandButton id="cap...

JSF 2.0: Render form fields with initial data using request-scoped beans (to update server data specific to current component)

A pretty normal case: We have a 'portlet' composite component that has two states: expanded and collapsed. Portlets start as expanded, but user can collapse them by clicking on them. This state should be saved to the session, so that once the user refreshes the page or navigates to a new, the portlets remember if they are expanded/colla...