component « Bean « JSF Q&A





1. JSF 1.2 Custom Component - Body Content From Backing Bean    stackoverflow.com

I am developing a custom component using JSF 1.2 . My tag class extends UIComponentELTag and has variables of data type ValueExpression. The values for these are getting set from the ...

2. cannot use values from beans in facelets custom component    stackoverflow.com

i cannot use any bean value in my custom control.: for instance: this is my foo.taglib.xml file.

<facelet-taglib>
  <namespace>http://www.penguenyuvasi.org/tags</namespace>
  <tag>
    <tag-name>test</tag-name>
    <component>
     ...

3. JBoss Seam: components injected into POJOs, but not Session Beans    stackoverflow.com

I have a Seam component that handles login, with the name "authenticator":

@Name("authenticator")
public class AuthenticatorAction implements Authenticator
{
    @PersistenceContext 
    private EntityManager em;

    @In(required=false) ...

4. Can we have a component-scoped bean in a JSF2 composite component?    stackoverflow.com

I was wondering how I could create "component-scoped" beans, or so-to-say, "local variables inside a composite component" that are private to the instance of the composite component, and live as long ...

5. JSF: how to rendered=#{bean.isRendered} multiple components at one time    stackoverflow.com

I tried this but does not work:

<f:verbatim rendered="#{bean.isRendered}">
    <h:selectOneMenu>
        ...
    </h:selectOneMenu>
    <h:selectOneMenu>
    ...

6. Sink JSF 2.0 Composite Component Event in Parent Page Backing Bean    stackoverflow.com

I have a conceptual mind-block around the use of a JSF 2.0 composite component within a parent page. I understand how to implement an ActionListener (and others) for a composite component's ...

7. Adding JSF 2 composite component at runtime from backing bean    stackoverflow.com

Edited question... Hello, I would like to load a .xhtml file of my composite component from a backing bean, and add it to the page dynamically. The name of the .xhtml file comes ...

8. JSF 2.0: Why does a JSF bean get created when it's used in a component that is not rendered?    stackoverflow.com

Let's have an extremely simple composite component:

<cc:implementation>
    #{testBean.someField}
</cc:implementation>
Bean for it:
public class TestBean {

    private boolean someField = false;
    public boolean getSomeField() { ...

9. Unable to update value of component which is bound to bean    stackoverflow.com

I am trying to create a socket client with a web UI by JSF. In this application, the client is connecting to the server, sends the message to the server, receives ...





10. ManagedBean for a composite component    stackoverflow.com

I'm developing a composite component that has to do some calculations for the layout to work properly. Calculations that are to complex for the EL (not actually complex but I can't ...

11. JSF 2.0: h:inputText inside composite component fails with non-String objects when validation is set    stackoverflow.com

In a backing bean:

@Min(3)
Integer foo;
If I have form like:
<h:form>
    <h:commandButton value="Submit" />
    <h:inputText value="#{bean.foo}" />
</h:form>
This works ok. However, if I do something like
<cc:interface>
   ...

12. Custom component and access to backing bean    stackoverflow.com

Is it possible in JSF2 from a custom component (in method encodeBegin) to access to the FacesContext and managed beans? Thanks you.

13. JSF composite component with backing bean    stackoverflow.com

I'm trying to get a composite component working with it's own backing bean, using the example on p375 from the Core JSF 3 book, but just get an NPE. The problem seems ...

14. jsf - assign id to a component from a backing bean    stackoverflow.com

I have to work with some ids of some components in my backing bean so I've declared them as constants and I want to use them also in jsf (instead of ...

15. JSF component assign value couldn't set in Backing Bean    stackoverflow.com

JSF page component like

<h:selectOneMenu id="noteSectionForDateText" value="#{historyQuestBean.selectedNoteSection}" accesskey="Y">
   <f:selectItems value="#{historyQuestBean.noteSection}" />
</h:selectOneMenu>
now in Backing Bean historyQuestBean :
private SelectItem[] noteSection;
    {
        LoggerUtils.info(this.getClass().getName()+ ".getNoteSection ...

16. JSF composite button reinitiliazes view scoped managed bean    stackoverflow.com

As soon as a composite which encapsulates a commandButton is included in my .xhtml, the viewscoped bean is reinitialized no matter which commandButton is used. Is my composite wrong? Please let ...





17. Binding a managed bean instance to composite component    stackoverflow.com

I have a composite component (collapsiblePanel). The component uses the "collapsible" bean to provide the toggle function. When I use the same component multiple times on a page, each instance of ...

18. Basic question about backing beans for Composite Components    stackoverflow.com

I can't find any guidance on this question. I am writing a composite component that needs its own backing bean because it interacts with a data base. The new ...

19. How does a composite component set a property in it's client's backing bean?    stackoverflow.com

I have a composite component with an interface that contains this:

<cc:attribute name="model"
                  shortDescription="Bean that ...

20. Can not invoke managed bean Action method from DojoFaces button component    stackoverflow.com

I am trying to use DojoFaces in my next JSF based portlet. I am using JSF 1.1 with JSR 286 portlets to be deployed on WPS 6.1. Problem is, I am using ...

21. Composite component backing bean location    stackoverflow.com

I'm trying to split my JSF2 pages into composite components. So I decided to put the composite components in a logical file tree. For example:

WebContent/resources/components/page1/component1.xhtml
The associated bean is in
...

22. use jsf managed bean in facelet custom component as in jsf within jsp    stackoverflow.com

I have jsf application in which I have to use a facelet custom component (defined in a custom tag library). In order to achieve this I have done the following: - created ...

23. Set Managed Bean as parameter in Composite Component    stackoverflow.com

Is there a way of setting a managed bean parameter in a composite component and then leaving the using classes to decide which actual managed bean to use? something along the ...

24. JSF component binding without bean property    stackoverflow.com

How does exactly the following code work:

#{aaa.id}
<h:inputText id="txt1" binding="#{aaa}"/>
I mean, usually the component binding works, by specifying a property (of type UIComponent) in a bean. Here, there's no bean nor property ...

25. Backing bean properties set by component binding are still null before RENDER_RESPONSE phase. Why?    stackoverflow.com

I implemented a PhaseListener for the RENDER_RESPONSE phase, which calls an init() method of a certain backing bean using the following code (simplified) in beforePhase():

FacesContext ctx = FacesContext.getCurrentInstance();
ValueBinding vb = ctx.getApplication().createValueBinding("#{myBackingBean}");
BackingBean ...

26. JSF component bindings and EJB session bean valueChange    seamframework.org

I would like to inject an Event scoped component (POJO) into a Conversation scoped EJB session bean, where the Event scoped bean has JSF components bound to it.Then, in the EJB session bean I would like to respond to valueChange events from the UI, where the valueChange event changes the JSF components bound to the event scoped (injected) bean.

28. Backing bean vs custom component    coderanch.com

I wonder what the general opinions are on implementing GUI behaviour in backing beans instead of custom components. As a small example, I have a panelgrid with a few commandlinks and images of flags in them that I would like to show some marker for the selected language. One aproach would be to let a backing bean discover the currently selected ...

30. backing bean retrieval from component    coderanch.com

31. Accessing UI Components within Managed (Backing) Beans    coderanch.com

Hello Richard, I see what you're saying work fine but this was not exactly what I was looking for. I think that I found now what it is but I'm not completely sure if this is a good approach. I found something like this: MyBean.java ... // Component declaration private HtmlOutputText myOutputText; ... // Getters and setters ...

33. Modify components in backing bean    coderanch.com

37. How to force a value in a component from the backing bean    coderanch.com

Hi! I have three SelectOneMenu components, A B and C. At first only A is rendered, after option choice B comes up, and after B's choice, C comes up. I have a value change listener in my A component, which if the value of A is changed, it should trigger the C component to hide, and set it's value to an ...