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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T11:55:17+00:00 2026-06-09T11:55:17+00:00

My Value ‘image_id’ from a f:param tag returns null. JSF SITE <p:dataGrid value=#{main.game.cards} var=cad

  • 0

My Value ‘image_id’ from a f:param tag returns null.

JSF SITE

    <p:dataGrid value="#{main.game.cards}" var="cad" columns="3"
                            rows="12" paginator="true"
                            paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                            rowsPerPageTemplate="5,10,25, 50, 100"> 
                            <p:panel header="Nr. #{cad.id}">
                                    <f:param name="image_id" id="image_id" value="#{cad.id}"></f:param>
                                <p:graphicImage cache="true" value="#{main.fileContent}">

                                </p:graphicImage>    

                            </p:panel>
                        </p:dataGrid>  

</h:form>

Trying to read the Value:

ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
    String photoId = externalContext.getRequestParameterMap().get("image_id");
  • 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-09T11:55:19+00:00Added an answer on June 9, 2026 at 11:55 am

    The <f:param> has to go inside the <p:graphicImage>, but in your code you’ve placed it outside. Fix it accordingly.

    It would by the way only be sent (and thus be non-null) when the webbrowser requests the image, not when JSF is about to generate the <img> element. So the #{main.fileContent} getter will be invoked twice for a single image: the first time when the HTML is to be generated and the second time when the webbrowser actually requests the image.

    See also:

    • Display database blob images in <p:graphicImage> inside <ui:repeat>
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The value will be used as: from INTEGER UNSIGNED NOT NULL which defines different
The value fetched from select property is null. The code for jsp is.. <nested:select
SELECT value FROM table WHERE id IN (1,2,3, ... 500000) Have a query that
Value will be anything and matches is null. The point of this is to
DB value of Date is: 04-OCT-10 Bean method returns: Mon Oct 04 00:00:00 EEST
Get value out of DateTime column if null to return String.Empty else DateTime.ToShortDateString What
if Value Types and Reference Type are from Object Type which is a reference
fips value scc param 1 1 123 CO 1 1.1 124 CO 1 1.2
nudAge.Value is numeric up down. In my sql database, it is Age(int, null) .
When sending a value from a textbox in form2 to a listbox in form1

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.