UIComponent « Control « JSF Q&A





1. An efficient way to compute a UIComponent clientID?    stackoverflow.com

Actually in my JSF application I have this code to compute a component clientId from its id:

public static String getComponentClientId(String id) {
  try {
    FacesContext fctx = ...

2. JSF 2.0: @ResourceDependency does not work when adding UIComponent programmatically    stackoverflow.com

@ResourceDependency(library = "component/myComponent", name = "myComponent1.css")
public class MyComponent1 extends UIComponentBase {

    public void encodeBegin(FacesContext context) throws IOException {
        MyComponent2 comp2 = ...

3. Getting tabindex value for UIComponent    stackoverflow.com

I'd like to get tabindex of current UIComponent in generic way. getTabIndex() is available only for few components. Is there any way of getting it without casting component to proper type? I ...

4. May UIComponent#getFamily() return null or not?    stackoverflow.com

I would like to know wether the method UIComponent#getFamily() may return null or not? Mojarra 2.1.3 will throw an exception when returning null but MyFaces 2.1.3 not. Does a component really need ...

5. Optimizing UIComponent properties    stackoverflow.com

I wrote a @FacesComponent object, and I used the following code pattern that I often use in managed beans:

private String value = null;

public String getValue() {
   if (value != ...

6. Custom UIComponent?    coderanch.com

I'm just starting to work with JSF on a project. I have one requirement that I'm thinking might be best met by building a custom UIComponent (or finding one already written), but I'm not familiar enough with JSF to know if I'm heading down the right path. This would be a component for numeric fields that can be null in the ...