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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:09:13+00:00 2026-06-11T15:09:13+00:00

The current web page displays a static jstree. The script (displayed below) was in

  • 0

The current web page displays a static jstree. The script (displayed below) was in the same file as the JSP page, using data that was added to the spring model.

Setup#1

<div id="permissions" class="scroll"></div>
<script type="text/javascript" class="source">
    $(function () {
        $("#permissions").jstree({ 
            "plugins" : [ "themes", "json_data", "checkbox", "sort", "ui" ],
            "checkbox" : { "override_ui" : true },
            "themes" : { "icons" : false },
            "json_data" : { "data" : ${permissionTree} }
        });
    });
</script>

To have more dynamic control over it, I moved the script into a javascript file and give it the ability to display different information. For testing purposes, though, I am using the exact same data as before.

Setup #2

function getPermissions(str) {
$.getJSON("getPermissions.htm", {id : str},
    function(data) {
        $(function () {
            $("#permissions").jstree({ 
                "plugins" : [ "themes", "json_data", "checkbox", "sort", "ui" ],
                "checkbox" : { "override_ui" : true },
                "themes" : { "icons" : false },
                "json_data" : { "data" : JSON.stringify(data) }
            });
        });
    });

}

With setup #2, however, the tree displays raw JSON, not a tree. I’ve confirmed that in both instances that data is the same. So what gives? Why does it not work this way?

  • 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-11T15:09:14+00:00Added an answer on June 11, 2026 at 3:09 pm

    "data" in the following snippet is supposed to contain an object or array value.

    "json_data" : { "data" : JSON.stringify(data) }
    

    try this instead:

    "json_data" : { "data" : data }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web page that always needs to stay current. I do not
window.location.href does not work to save the current web page url as a bookmark.
I'm making a web-app with PhoneGap. Here's my current hurdle: On page one, the
I have a simple class that contains some general information about the current web
Here is my current situation: I have a web page containing a couple scrollable
I currently have a webview that displays a current site. However, it cuts off
I am loading a simple txt file from the same server as the current
I have a selectmultiple choice widget that gets data from mysql database and displays
The Sharepoint 2010 Current User Filter Web Part allows List Web Parts that have
I'm writing single-page web application. Client interacts with server using AJAX retrieving quite complex

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.