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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T11:45:09+00:00 2026-05-16T11:45:09+00:00

I am trying to implement a scenario using JSF. I have a commandExButton and

  • 0

I am trying to implement a scenario using JSF. I have a commandExButton and when user click this button “A” it shows the panelDialog which contains the selectManyCheckBox items. I generat these items in the backend bean by parsing one file which is continuously getting updated. What I want is, whenever I click this button “A” I should get the latest selectItems by parsing the file through the backend bean. But what I get it the same selectItem which was generated when page rendered first time. So as of now I have a workaround, in which I included one refresh button which actually refresh the page and then user click “A” to get the latest selectItem by parsing the current file’s content. But is it doable in anyway without adding new button and using the existing button?

Following is the code which I am using

<td>
    <hx:commandExButton id="preferenceButton" styleClass="form" value="#{nls.preferenceLink}"
        title="#{nls.preferenceLinkTitle}" type="submit" />
</td>
<td>
    <h:form id="PrefForm" rendered="#{Test.isCurrent}">
        <hx:panelDialog type="modal" id="preferenceSet" styleClass="panelDialog" for="preferenceButton"
            title="#{nls.preferenceDialogTitle}">
            <h:outputText styleClass="panelStartMessage" style="display:block;"
                value="#{nls.preferenceDialogWindowText}" />
            <h:panelGroup rendered="#{Test.hasSelectItem }"
                style="display:block;width:300px;height:360px;overflow:auto;" styleClass="panelGroup"
                id="prefPanelGroup">
                <h:selectManyCheckbox value="#{Test.selectedItems}" layout="pageDirection">
                    <f:selectItems value="#{Test.selectItems}" />
                </h:selectManyCheckbox>
            </h:panelGroup>
            <hx:panelBox styleClass="information_box" id="noCommandWindow" layout="lineDirection"
                rendered="#{!Test.hasSelectItem }">
                <h:outputText styleClass="outputText" id="cmdInfo" value="#{nls.noCommands}" />
            </hx:panelBox>
            <hx:panelBox id="buttonBox1" styleClass="panelStartBox" layout="lineDirection">
                <hx:commandExButton id="submitPref" styleClass="commandExButton" type="submit"
                    value="#{nls.submit}" action="#{Test.action}">
                    <hx:behavior event="onclick" behaviorAction="hide" targetAction="preferenceSet"
                        id="behaviorSubmitPref" />
                </hx:commandExButton>
                <hx:commandExButton id="CancelPref" styleClass="commandExButton" type="submit"
                    value="#{nls.cancel}" action="Test">
                    <hx:behavior event="onclick" behaviorAction="hide" targetAction="preferenceSet"
                        id="behaviorCancelPref" />
                </hx:commandExButton>
            </hx:panelBox>
        </hx:panelDialog>
    </h:form>
</td>

Code in Bean:

public class Test{
    private List<String> selectedItems;
    private List<SelectItem> selectItems;

    public List<SelectItem> getSelectItems() {
        // populate the selectItem here...
    }    
}
  • 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-16T11:45:09+00:00Added an answer on May 16, 2026 at 11:45 am

    Store the List<SelectItem> selectItems in a separate session scoped bean (assuming that your current one is request scoped), fill it during its construction and add a method like reload() which you invoke only after processing the selected item in the action method. You can access the session scoped bean from inside the request scoped one by @ManagedProperty.

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

Sidebar

Related Questions

I'm trying to implement this scenario using Unity and i can't figure out how
Im trying to implement a scenario using threads to execute concurrent commands on a
I'm trying to implement the folowing scenario, using JQuery deferred, without much luck. What
I am trying to implement a custom Java widget using GWT.This requires me to
I am trying to implement a custom Java widget using GWT.This requires me to
i'm trying to implement a Repository and UnitOfWork patterns using Entity Framework. This is
I'm trying to implement a basic worker pool using pthreads. The scenario is that
I am trying to implement a simple scenario where I have a git repo
I'm trying to implement a producer-consumer scenario using multiprocessing and a queue; the main
I'm trying implement A* Start path finding in my games(which are written with JavaScript,

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.