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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:04:49+00:00 2026-05-26T15:04:49+00:00

So I have trouble trying to use any of these two elements for different

  • 0

So I have trouble trying to use any of these two elements for different reasons. First I’ll describe what happens with the s:checkboxlist.

When the value on the sj:select changes I want to populate a list on my controller to use on my s:checkboxlist, do I have to use javascript? My initial guess was to call a javascript function on the sj:select onchange="" parameter, then on the javascript function refresh the s:checkboxlist so it populates using the new list.

For example if I have something like on my sj:select:

<s:url id="urlGetNewList"
    action="mycontroller!getNewList" />
<sj:select href="%{urlGetNewList}" id="myselect"
    onChangeTopics="reloadList"
    onCompleteTopics="reloadList"
    name="model.idType" list="types"
    listKey="idType" listValue="nameType"
    emptyOption="false" headerKey="-1"
    headerValue="select a value"
    formIds="frmMyForm" />

and on my s:checkboxlist I have :

<s:checkboxlist name="arrayOfIds" list="idsType"
                listKey="id" listValue="name"
                theme="vertical-checkbox" />

So my s:select gets populated from a list called types, when the value on the sj:select changes I call a function on my controller named getNewList, that will change the list that uses my checkboxlist, but how can refresh the checkboxlist.

You can notice I could solve this by using a sj:checkboxlist, I know it works, but if I do that then when I try to load the checkbox that are checked through the Integer array idsType, the checkboxes won’t get checked. For example if I have an Integer array like this:

idsType = { 2, 3 }

and I have a list arrayOfIds with 5 elements, then when I use the s:checkboxlist, 5 checkboxes will be shown and the second and third checkbox will be checked.

But if I do this using sj:checkboxlist, then only the first checkbox will be checked and also the checkboxes will change dinamically according to the sj:select value, which won’t happen when I use a s:checkboxlist.

I’m really lost as to how can I solve this issue, if anybody can help it will be very much appreciated.

  • 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-26T15:04:50+00:00Added an answer on May 26, 2026 at 3:04 pm

    To answer the first question, of course you’d need to use JavaScript to update the checkbox list–the standard <s:checkboxlist> is completely unaware of Ajax. You would need to do it manually by binding to the topic published by the sj:select.

    The plugin wiki (assuming this is the plugin you’re using, there are actually a few) has a page discussing how to handle JSON results in a topic.

    The <sj:checkboxlist> can reload by listening to topics; there should be no issue handling multiple items in the list; you may need to provide additional details regarding what you tried, and what went wrong (if anything, for example, check the JavaScript console).

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

Sidebar

Related Questions

I have a trouble trying to get this working. I have an Item model,
I have trouble with my app, when i'm trying to get active user from
Hello I'm trying to learn ruby blocks. But I have a trouble to get
I am trying to trouble shoot a JUnit. In the source code, I have
I have trouble accessing filestream via SqlFileStream. Sql server and IIS7 are on different
I have some trouble with python. I am trying to get output from a
I am trying to use ifeq in my rule pattern and I have problems
I'm trying to use rdebug with emacs and cygwin and I'm running into trouble.
I'm trying to start my java game but I have some troubles with the
I have trouble where, for some reason, SVN would only merge the newly generated

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.