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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T16:41:12+00:00 2026-06-10T16:41:12+00:00

I have two very similar usecases, one works, and another one does not. I

  • 0

I have two very similar usecases, one works, and another one does not. I have checked the basic things mentioned in other answers (JSF2.1 on JBoss 7.1.1 with PrimeFaces 3.3).

First the sample which works:

<h:form id="processInstanceList">
    <p:dataTable id="instances" var="processInstance" value="#{processInstanceList}">
    ...
        <p:column>
            <h:commandLink value="#{msg.deleteButtonLabel}"
                action="#{runtimeService.deleteProcessInstance(processInstance.id, 'Cancelled by user')}">
        </h:commandLink>

with the action methods signature:

void deleteProcessInstance(String processInstanceId, String deleteReason);

and now the sample which does not work:

<h:form id="taskGrouplist">
    <p:dataTable id="groupTasks" value="#{groupTaskList}" var="v_task">
    ...
        <p:column>
            <h:commandLink value="&Uuml;bernehmen" action="#{taskList.claimTask(v_task)}"/>

with the action methods signature:

@Named
@RequestScoped
public class TaskList {
    public String claimTask(Task task);

on the second sample the task passed to the action method is always NULL. If I just pass an attribute of the task to the method, e.g. with #{taskList.claimTask(v_task.id)} (Task has a getId() method returning a String) and changing the action methods signature to public String claimTask(String id) … everything I pass in is NULL.

Why doesn’t this happen in the first sample? There I pass in two Strings and it works fine…

  • 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-10T16:41:13+00:00Added an answer on June 10, 2026 at 4:41 pm

    What is the scope of your RuntimeService bean?
    Try to change your TaskList bean scope to ViewScoped or SessionScoped, here is why:

    @RequestScoped: A request scoped bean has a lifetime of exactly one HTTP request/response.
    So once your dataTable with commandLinks gets rendered (the HTTP request/response is over) you lose all the references for v_task parameters in your action=”#{taskList.claimTask(v_task)}” calls.

    @ViewScoped: A view scoped bean lives as long as you’re interacting with the same JSF view.
    Even after the rendering is over, because of the @ViewScope you still have your references on v_task object.

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

Sidebar

Related Questions

I have two arrays, one is very large (more than million entries) and other
I have two very similar but not identical C# objects. I am copying the
I have two controls. The XAML's are big and very similar. One difference is
I have two very similar programs each trying to run two threads OddThread and
I have two tables that have virtually identical content and very similar structure. They
I'm not very good in SQL and HQL... I have two domains: class Hotel
I have two very similar specs for two very similar controller actions: VoteUp(int id)
I have two functions that are very similar and i'd like to make a
I have a script in PHP which retrieves two very similar files and performs
I have an issue where I have two pages that deal with very similar

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.