Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7810573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T03:49:55+00:00 2026-06-02T03:49:55+00:00

Referencing Oracle docs , does h:outputText require a Converter here? Should I be using

  • 0

Referencing Oracle docs, does h:outputText require a Converter here? Should I be using f:setPropertyActionListener instead of f:actionListener?

Clicking id 2564 does show at the end of the logs:

INFO: SingletonNNTP..only once...
INFO: NNTP.loadMessages...
INFO: SingletonNNTP.connect..
INFO: SingletonNNTP.setIndex..2,562
INFO: SingletonNNTP.page..2,572
INFO: SingletonNNTP.setIndex..2,562
INFO: Initializing Mojarra 2.1.6 (SNAPSHOT 20111206) for context '/NNTPjsf'
INFO: WEB0671: Loading application [NNTPjsf] at [/NNTPjsf]
INFO: NNTPjsf was successfully deployed in 7,612 milliseconds.
INFO: Messages..
INFO: Messages..
INFO: MessageBean..
INFO: Messages.postConstruct..
INFO: SingletonNNTP..only once...
INFO: NNTP.loadMessages...
INFO: SingletonNNTP.connect..
INFO: SingletonNNTP.setIndex..2,562
INFO: SingletonNNTP.page..2,572
INFO: SingletonNNTP.setIndex..2,562
INFO: SingletonNNTP.getMessages..
INFO: Messages.getModel..
INFO: Messages.getModel..
INFO: Messages.getModel..
INFO: Messages..
INFO: Messages.postConstruct..
INFO: SingletonNNTP.getMessages..
INFO: Messages.getModel..
INFO: Messages.getModel..
INFO: Messages.getModel..
INFO: Messages.getModel..
INFO: Messages.getModel..
INFO: Messages.getModel..
INFO: Messages.getModel..
INFO: Messages.getModel..
INFO: Messages.getModel..
INFO: Messages.getModel..
INFO: MessageListener.processAction..
INFO: ..MessageListener.processAction
INFO: MessageBean..
INFO: MessageBean.postConstruct..
INFO: SingletonNNTP.setIndex..0
INFO: SingletonNNTP.getMessage..
INFO: MessageBean.setMessage..2564
INFO: MessageBean.setId..2564
INFO: MessageBean.getId..2564
INFO: MessageBean.setPrevious..2563
INFO: MessageBean.getId..2564
INFO: MessageBean.setNext..2565
INFO: MessageBean.setUrl..
INFO: MessageBean.setMessage..2556
INFO: Messages.getModel..
INFO: Messages.getModel..
INFO: Messages.getModel..

However, it never navigates away from client.xhtml to message.xhtml.

What role MessageListener.processAction() should have here isn’t clear, nor how it impacts navigation specifically.

client.xhtml:

<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./template.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:c="http://java.sun.com/jsp/jstl/core"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:f="http://java.sun.com/jsf/core">


    <ui:define name="top">
        <div style="float: left">
            <h:form>
                <h:commandLink action="#{messages.back()}">
                    <f:actionListener type="net.bounceme.dur.listeners.BackListener" />
                    <h:outputText value="..back"/>
                </h:commandLink>
            </h:form>
        </div>
        <div style="float: right">
            <h:form>
                <h:commandLink action="#{messages.forward()}">
                    <f:actionListener type="net.bounceme.dur.listeners.ForwardListener" />
                    <h:outputText value="..forward"/>
                </h:commandLink>
            </h:form>
        </div>
    </ui:define>
    <ui:define name="content">
        <h:dataTable value="#{messages.model}" var="m">
            <h:column>
                <f:facet name="id">
                    <h:outputText value="id" />
                </f:facet>
                <h:form>
                    <h:commandLink id="messageLink" action="#{messageBean.setMessage(m)}">
                        <f:actionListener type="net.bounceme.dur.listeners.MessageListener" />
                        <h:outputText value="#{m.messageNumber}"/>
                    </h:commandLink>
                </h:form>
            </h:column>
            <h:column>
                <f:facet name="subject">
                    <h:outputText value="subject" />
                </f:facet>
                <h:outputText value="#{m.subject}"></h:outputText>
            </h:column>
            <h:column>
                <f:facet name="date">
                    <h:outputText value="date" />
                </f:facet>
                <h:outputText value="#{m.sentDate}"></h:outputText>
            </h:column>
        </h:dataTable>
    </ui:define>
</ui:composition>

Messages.java:

package net.bounceme.dur.beans;

import java.io.Serializable;
import java.net.URL;
import java.util.List;
import java.util.logging.Logger;
import javax.annotation.PostConstruct;
import javax.enterprise.context.ConversationScoped;
import javax.faces.model.DataModel;
import javax.faces.model.ListDataModel;
import javax.inject.Inject;
import javax.inject.Named;
import javax.mail.Message;
import net.bounceme.dur.nntp.SingletonNNTP;

@Named
@ConversationScoped
public class Messages implements Serializable {

    private static final long serialVersionUID = 1L;
    private static final Logger LOG = Logger.getLogger(Messages.class.getName());
    private DataModel messagesDataModel = null;
    private List<Message> messages = null;
    @Inject
    private MessageBean messageBean;

    @PostConstruct
    public void postConstruct() throws Exception {
        LOG.info("Messages.postConstruct..");
        SingletonNNTP nntp = SingletonNNTP.INSTANCE;
        boolean debugNNTP = false;
        messages = nntp.getMessages(debugNNTP);
        messagesDataModel = new ListDataModel(messages);
    }

    public Messages() {
        LOG.info("Messages..");
    }

    public DataModel getModel() throws Exception {
        LOG.info("Messages.getModel..");
        return messagesDataModel;
    }

    public void forward() throws Exception {
        LOG.info("Messages.forward..");

    }

    public void back() throws Exception {
        LOG.info("Messages.back..");
    }

    public MessageBean getMessageBean() {
        return messageBean;
    }

    public void setMessageBean(MessageBean messageBean) {
        this.messageBean = messageBean;
    }

    public void insert(Message message) {
        LOG.info("Messages.insert..");
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T03:49:56+00:00Added an answer on June 2, 2026 at 3:49 am

    In order to navigate to a different page on a POST request, the action method needs to return the view ID of the page where you need to navigate to. Something like this:

    <h:commandLink action="#{bean.submit}">submit</h:commandLink>
       
    

    with

    public String submit() {
        // ...
        return "someViewId";
    }
    

    This will go to someViewId.xhtml.

    The action listeners have no influence on navigation. They are intented to preprocess/prepare stuff before invoking the real action, if necessary. Looking at your code snippet, you seem to not entirely understand how to use actions and action listeners. You seem to confuse action listeners with actions. The jobs which you’re doing in the action listener methods should actually be done in the action methods.

    In your particular case, for example this

    <h:form>
        <h:commandLink id="messageLink" action="#{messageBean.setMessage(m)}">
            <f:actionListener type="net.bounceme.dur.listeners.MessageListener" />
            <h:outputText value="#{m.messageNumber}"/>
        </h:commandLink>
    </h:form>
    

    needs to be replaced by

    <h:form>
        <h:commandLink id="messageLink" action="#{messageBean.setMessage(m)}">
            <h:outputText value="#{m.messageNumber}"/>
        </h:commandLink>
    </h:form>
    

    with

    public String setMessage(Message message) {
        // Do your business job here.
    
        return "message";
    }
    

    This will navigate to message.xhtml when the action is finished.

    This has nothing to do with conversion. Converters are just to convert between a String and a complex Java object so that complex Java objects can be presented in HTML or can be processed as HTTP request parameters which can be strings only.

    See also:

    • Differences between action and actionListener
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a self referencing table in Oracle 9i, and a view that gets
Referencing Is Facebook an OpenID provider? here. This is kind of an additional question
In forward referencing language such as c#, how does the compiler handle this? What
We are using Oracle Weblogic 10.3 as our application server. We have multiple modules
I'm using (and referencing) two 3rd party dlls (a.dll, and b.dll) in two of
I'm trying to create a self referencing object using linqTOsql mapping. So far, I
Does a Foreign Key referencing a Primary Key need the NOT NULL constraint in
I'm trying to call an Oracle stored proc using SQL Developer. The proc outputs
When referencing a method's address, should we take into account the overriding or not?
Referencing this question: Is ASP.NET multithreaded (how does it execute requests) , would this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.