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

  • SEARCH
  • Home
  • 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 4258202
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T05:37:03+00:00 2026-05-21T05:37:03+00:00

<h:dataTable id=dt1 value=#{StudentMark.stuList} var=stuList bgcolor=#9AC8E6 border=10 cellpadding=5 cellspacing=3 rows=18 width=120% dir=LTR frame=hsides> <h:column> <f:facet

  • 0
<h:dataTable id="dt1" value="#{StudentMark.stuList}" var="stuList"  bgcolor="#9AC8E6" border="10" cellpadding="5" cellspacing="3" rows="18" width="120%" dir="LTR" frame="hsides>
                <h:column>
                    <f:facet name="header">
                        <h:outputText style=""value="Student Number" />
                    </f:facet>
                    <h:outputText style="" value="#{stuList.stuNumber}"></h:outputText>
                </h:column>
                <h:column>
                    <f:facet name="header">
                        <h:outputText value="Date"/>
                    </f:facet>
                    <h:outputText value="#{stuList.date}">
                        <f:convertDateTime type="date" pattern="dd-MM-yyyy"/></h:outputText>
                </h:column>
                <h:column>
                    <f:facet name="header">
                        <h:outputText value="Name"/>
                    </f:facet>
                    <h:outputText value="#{stuList.stuName}"></h:outputText>
                </h:column>
                <h:column>
                    <f:facet name="header">
                        <h:outputText value="Division"/>
                    </f:facet>
                    <h:outputText value="#{stuList.division}"></h:outputText>
                </h:column>
                <h:column>
                    <f:facet name="header">
                        <h:outputText value="Annual Marks"/>
                    </f:facet>
                    <h:outputText value="#{stuList.annualMark}"></h:outputText>
                </h:column>                    
                <h:column>
                    <f:facet name="header">
                        <h:outputText value="Student History"/>
                    </f:facet>
                     <h:form>
                        <h:commandButton id = "historyBtn" value="Student History" action="#{stuBean.showHistory}">
                            <f:param name="sNumber" value="#{stuBean.stuNumber}" />
                            <f:param name="sName" value="#{stuBean.stuName}" />
                        </h:commandButton></h:form>                        
                </h:column>
            </h:dataTable>

When i try to get the parameters passed using

        FacesContext context = FacesContext.getCurrentInstance();
        Map requestMap = context.getExternalContext().getRequestParameterMap();
        String studentNum = (String) requestMap.get("sNumber");
        String studentName = (String) requestMap.get("sName");

its showing “null” in studentName and studentNum thereby resulting with a null pointer exception.
Any ideas to resolve this???

  • 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-21T05:37:04+00:00Added an answer on May 21, 2026 at 5:37 am

    I’ve resolved my issue.
    The mistake made was I’ve trying to pass the parameters at the page load itself,tried making the param value as value=”#{stuList.stuNumber}” and got the error resolved.

    <h:form>
     <h:commandLink id = "historyBtn" value="Student History" action="#{stuBean.showHistory}">
         <f:param name="sNumber" value="#{stuList.stuNumber}" />
         <f:param name="sName" value="#{stuList.stuName}" />
      </h:commandLink></h:form> 
    

    Thanks for all the professionals for their time.

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

Sidebar

Related Questions

<h:dataTable id=dt1 value=#{Student.stuList} var=stuList bgcolor=#F1F1F1> <h:column> <f:facet name=header> <h:outputText style=value=Stu Number /> </f:facet> <h:outputText
I have a datatable which contains yearly data saved. e.g. dtDate Value 2010-01-01 00:00:00.000
I am using primefaces datatable with clickable rows and I need to find way
I am using this below: public static DataTable DataTableJoiner(DataTable dt1, DataTable dt2) { using
<table id =Table2 border =1px style =height :200px ; width :690px; visibility :hidden; runat
I want to get top 10 rows from a DataTable in the same order
How to select all fields from datatable? ex.: var common = from c in
DataTable tblData = new DataTable(); MySQLProcessor.dtTable(pullDataQuery, out tblData); foreach (DataRow columnRow in tblData.Rows) {
DataTable dt1 = new DataTable(); //I made this as a backup //add 3 columns
public DataTable ExcelToDatatable_dt1 { get { foreach (GridViewRow rowItem in GridView1.Rows) { CheckBox chk;

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.