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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:14:10+00:00 2026-05-25T17:14:10+00:00

Here is what I am trying to do. I want the data from jsf

  • 0

Here is what I am trying to do.
I want the data from jsf page1 to be available in jsf page2 which is a popup window opened by page1.
Both have separate managed beans.
I tried using sessions but it resulted in null pointers.
I somehow managed to get the data in page2 using window.opener() in javascript.
Now I want this data to be available in the processAction() method of FacesPortlet.
Tried using request.getParameter, request.getAttributes, all in vain.
After a lot of research I somehow managed to send some hard coded data in processAction() method. But I am unable to send the value from page1.
Here is how I am sending the hardcoded value.

<form name="uploadbaseline" method="post"
enctype="multipart/form-data" action="<portlet:actionURL><portlet:param name =         "page" value = "someval"/></portlet:actionURL>">

This is followed by the other fields inside the form.
I get the value in processAction() method like this

System.out.println("valuefrompage1"+request.getParameter("page"));

This returns “someval”.
Now I try to assign the value from page1 using javascript using the following code.

var val =     window.opener.document.getElementById("BaseLine:EngineModel").value;      
var actionval = "<portlet:actionURL><portlet:param name='page' value=" + val.value + "/></portlet:actionURL>";      
document.uploadbaseline.action = actionval.value;
document.uploadbaseline.submit();

This returns the value “+ val.value +” as it is and not the actual value in the “val” variable.

Please guide me in the right direction.
Keenly looking forward to your replies.
Thanks.

  • 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-25T17:14:11+00:00Added an answer on May 25, 2026 at 5:14 pm

    Found the solution finally.
    The problem lies in the enctype attribute of my form.
    This prevents me from accessing the page fields using the regular request.getParameter.
    This needs to be handled in a different way.
    Here is how.

    for (Iterator requestItems = upload.parseRequest(request).iterator(); requestItems.hasNext();) {
        item = (FileItem) requestItems.next(); // Get each item in the request
        if (!item.isFormField()) {
           //handle the file data
        } else {
           System.out.println((String)item.getString());
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's what I'm trying to do, and failing... I have a File model which
I am trying to pass custom event data from 1 class to another class...here
Here is my problem, I'm trying to read in data from a file beginningbalance.dat
I am trying to send data from android to Django app. I want to
I am trying to import data from a large database. I have two tables
I want to fill a DataGridView with data returned from a SQL. So here
I'm trying to export data from my models to an excel spreadsheet. I have
I'm trying to fetch some data from a database. I want to select an
I'm trying to write a Word macro which inserts data from the Current User
I want a shell script (ubuntu) which fetchs data from a sql table row

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.