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 1016429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:32:54+00:00 2026-05-16T10:32:54+00:00

I have a problem with using primeface’s wizard component and the core selectOneRadio. My

  • 0

I have a problem with using primeface’s wizard component and the core selectOneRadio. My signup page looks like this

<ui:define name="content">
            <f:view>              
            <h:form id="signUpForm">

                <p:wizard widgetVar="wiz" flowListener="#{SignUpBean.onFlowProcess}">
                    <p:tab id="personalTab" title="">
                        <p:panel header="Personal">
                            <h:messages/>
                            <h:panelGrid id="panel1" columns="2">
                                <h:outputLabel for="firstName" value="First Name"/>
                                <h:inputText id="firstName" value="#{SignUpBean.firstName}" required="true"/>
                                <h:outputLabel for="lastName" value="Last Name"/>
                                <h:inputText id="lastName" value="#{SignUpBean.lastName}" required="true"/>
                                <h:outputLabel for="email" value="Email"/>
                                <h:inputText id="email" value="#{SignUpBean.email}" required="true">
                                    <f:validator validatorId="emailValidator"/>
                                </h:inputText>
                            </h:panelGrid>
                        </p:panel>
                    </p:tab>
                    <p:tab id="passwordTab" title="">
                        <p:panel header="Password">
                            <h:messages/>
                            <h:panelGrid id="panel2" columns="2">
                                    <h:outputLabel for="password" value="Password"/>
                                    <h:inputSecret id="password" value="#{SignUpBean.password}" required="true"/>
                                    <h:outputLabel for="retypePass" value="Retype Password"/>
                                    <h:inputSecret id="retypePass" value="#{SignUpBean.retypePassword}" required="true"/>
                            </h:panelGrid>
                        </p:panel>
                    </p:tab>
                    <p:tab id="groupTab" title="">
                        <p:panel header="Group">
                            <h:messages/>
                            <h:panelGrid id="panel3" columns="2">
                                <h:outputLabel for="radioGroup" value=""/>
                                <h:selectOneRadio id="radioGroup" value="#{SignUpBean.join}">
                                    <f:selectItem itemValue="true" itemLabel="Join existing group"/>
                                    <f:selectItem itemValue="false" itemLabel="Create new group"/>
                                </h:selectOneRadio>
                                Group Name
                                <h:inputText id="group" value="#{SignUpBean.group}" required="true"/>
                                Group Password
                                <h:inputSecret id="groupPass" value="#{SignUpBean.groupPass}" required="true"/>
                            </h:panelGrid>
                        </p:panel>
                    </p:tab>
                    <p:tab id="confirmTab" title="">
                        <p:panel header="Confirm">
                            <h:messages/>
                            <p:growl id="signUpGrowl" sticky="false" life="1000" showDetail="true" />
                            <h:panelGrid id="panel4" columns="4" cellpadding="5">
                                Firstname:
                                <h:outputText value="#{SignUpBean.firstName}"/>
                                Lastname:
                                <h:outputText value="#{SignUpBean.lastName}"/>
                                Email:
                                <h:outputText value="#{SignUpBean.email}"/>
                                Groupname:
                                <h:outputText value="#{SignUpBean.group}"/>
                                    <h:panelGroup style="display:block; text-align:center">
                                        <p:commandButton value="Submit" action="#{SignUpBean.signUp}" update="signUpGrowl"/>
                                    </h:panelGroup>
                            </h:panelGrid>
                        </p:panel>
                    </p:tab>
                </p:wizard>
            </h:form>
            </f:view>
        </ui:define>

And the signUpBean like this:

@ManagedBean(name="SignUpBean")
@SessionScoped
public class SignUpBean {

    private String groupName, groupPass, firstName, lastName,
            email, password, retypePassword;
    private boolean join;
    private boolean skip;
    @EJB
    private MessageBeanRemote messageBean2;

    /** Creates a new instance of SignUpBean */
    public SignUpBean() {
        this.skip = false;
        this.join = true;
    }

    /**
     * Signs up a user with all the data given on the signUp.jsf page.
     * If everything is ok then a confirmation email is generated and send
     * to the new user.
     * @return Either signUpSucces or signUpFailure
     */
    public void signUp() {
        Session session = HibernateUtil.getSessionFactory().getCurrentSession();
        Transaction tx = session.beginTransaction();
        // Boolean to decide if the data should be commited or not.
        boolean commitOK = true;

        UserHelper uh = new UserHelper();
        BasicUser user = uh.getByEmail(this.email);
        GroupHelper gh = new GroupHelper();
        Group group = gh.getByName(this.groupName);

        // If email does not already exist
        if(user == null) {
            user = new BasicUser();
            user.setEmail(this.email);
            user.setFirstName(this.firstName);
            user.setLastName(this.lastName);
            if(this.password.equals(this.retypePassword)) {
                user.setPassword(password);
            }
            else {
                commitOK = false;
                FacesMessage fm = new FacesMessage("Passwords does not match");
                FacesContext.getCurrentInstance().addMessage(null, fm);
            }
        }
        else {
            commitOK = false;
            FacesMessage fm = new FacesMessage("Email does already exist");
            FacesContext.getCurrentInstance().addMessage(null, fm);
        }

        // If it's a joiner to a group
        if(this.join) {
            // Is it the right groupPassword and groupName
            if(group != null && group.getGroupPassword().equals(this.groupPass)) {
                user.setGroup(group);
            }
            else {
                commitOK = false;
                FacesMessage fm = new FacesMessage("Wrong group name or password");
                FacesContext.getCurrentInstance().addMessage(null, fm);
            }
        }
        else {
            if(group == null) {
                group = new Group();
                group.setGroupName(this.groupName);
                group.setGroupPassword(this.groupPass);
                user.setGroup(group);
            }
            else {
                commitOK = false;
                FacesMessage fm = new FacesMessage("Group does already exist");
                FacesContext.getCurrentInstance().addMessage(null, fm);
            }
        }

        //--- IF EVERYTHING OK THEN UPDATE THE DB ---//
        if(commitOK) {

            session.save(group);
            session.save(user);
            tx.commit();

            session = HibernateUtil.getSessionFactory().getCurrentSession();
            tx = session.beginTransaction();

            BasicUser newUser = uh.getByEmail(email);
            int id = newUser.getId();

            MobileUser mobile = new MobileUser();
            mobile.setId(id);
            mobile.setUseWhen("Lost");

            StatUser stats = new StatUser();
            stats.setId(id);
            stats.setRating("");

            DateUser dates = new DateUser();
            dates.setId(id);
            Calendar calendar = Calendar.getInstance();
            Date date = calendar.getTime();
            dates.setMemberSince(date);
            dates.setLastLogin(date);

            session.save(stats);
            session.save(mobile);
            session.save(dates);
            tx.commit();

            //----- SEND CONFIRMATION EMAIL ----------//
            BasicUser emailUser = uh.getByEmail(email);
            MailGenerator mailGenerator = new ConfirmationMailGenerator(emailUser);
            try {
                StringWriter plain = mailGenerator.generatePlain();
                StringWriter html = mailGenerator.generateHTML();
                messageBean2.sendMixedMail(email, "WMC: Account Info", plain.toString(),
                        html.toString());
            }
            catch (Exception ex) {
                Logger.getLogger(SignUpBean.class.getName()).log(Level.SEVERE, null, ex);
            }

            FacesMessage msg = new FacesMessage("Successful", "Welcome :" + this.getFirstName());
            FacesContext.getCurrentInstance().addMessage(null, msg);
        }

        //---- DO NOTHING ----//

    }

    public String onFlowProcess(FlowEvent event) {
        if (skip) {
            skip = false;   //reset in case user goes back
            return "confirm";
        } else {
            return event.getNewStep();
        }
    }
... getters and setters
}

I know it is a bad signup method and it will be changed later. When i reach the last tab and submit I get this error:

alt text

When I debug I see that the join variable is either true or false not null. What is it complaining about?

  • 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-05-16T10:32:54+00:00Added an answer on May 16, 2026 at 10:32 am

    I solved the problem by adding a

    <h:inputHidden value="#{SignUpBean.join}"/>
    

    Inside the confirmation tab. This works:)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 540k
  • Answers 540k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer the_excerpt() doesn't take any parameters. Only the_content() takes that parameter.… May 17, 2026 at 2:39 am
  • Editorial Team
    Editorial Team added an answer How do you display the image? If you load an… May 17, 2026 at 2:39 am
  • Editorial Team
    Editorial Team added an answer The thing you need to realize is that endian swaps… May 17, 2026 at 2:39 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have problem using IIS 7 and SQL Server 2008. When I trying to
I have problem while using jquery maskedinput with asp.net textbox. I have a check
Hi I have problem using Shared Folder in VMare Fusion 3 and Visual Studio
i am coming back because i still have problem using JodaTime. After the previous
I have a problem using Jaxb2Marshaller for unmarshalling XML attributes (of primitive types). Here
I have a weird problem using the Java Box class. I am using JDK
I have a problem here using .dbf files. I can make CRUD operations but
Preface: First time really using JavaScript + jQuery, so my problem likely stems from
i have a problem with the order of execution of the threads created consecutively.
I'm trying to build an Java EE 6-application on GlassFish V3, using JSF 2.0,

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.