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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:28:17+00:00 2026-05-22T22:28:17+00:00

I am attempting to construct a component tree in JSF 1.2 (Mojarra) where the

  • 0

I am attempting to construct a component tree in JSF 1.2 (Mojarra) where the tree consists of multiple types of junction and leaf nodes. Each leaf node needs to render in a unique way and needs to be posted-back with potential changes. The purpose is to allow the user to update processing logic where each leaf node represents an operation, such as “value equals” or “value not equal”.

For example:

Root
|
+- InternalNode1 (type I_A)
|  |
|  +- LeafNode1 (type L_A)
|  |
|  +- LeafNode2 (type L_B)
|
+- InternalNode2 (type I_B)
   |
   +- LeafNode3 (type L_B)
   |
   +- LeafNode4 (type L_A)

Each type of leaf node needs to render differently, depending on the needs of that node type. Additionally, the tree will be modifiable and nodes can be added or removed with Javascript and updates posted back to the server, etc. For example, in the above tree, LeafNode4 could be removed, or its type changed to L_B.

Is this even possible with JSF components? Am I going about it the wrong way by attempting to use polymorphic UI components?

  • 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-22T22:28:18+00:00Added an answer on May 22, 2026 at 10:28 pm

    It is possible to build a component tree programmatically, but this would be the wrong approach for your use-case. It would generally be unsecure to allow the user-agent to manipulate such server-side code.

    It would be better to use a model to manage your tree structure (which is essentially the approach Don Roby is suggesting.) The data that makes up this model can then be validated like any other user input to ensure attackers aren’t trying to put server-side data into an invalid state.

    JSF’s declarative approach makes it challenging to do this out of the box (you can see a crude tree rendering example here.) If you don’t want to drag in a 3rd party library (or write your own control) you may be better off handling all the tree UI in JavaScript and using a JSF hidden field to transport it to/from the server.

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

Sidebar

Related Questions

I'm attempting to construct a search query in MySQL using multiple arguments, and I
I am attempting to construct my own date picker using code from several sources.
I am attempting to construct my own date picker using code from several sources.
I am attempting to construct a formview that will edit two related objects at
I'm attempting to construct rich-text where the first part says Looking for: and is
I am attempting to construct a very simple proof of concept that I can
I am attempting to create a behavior tree using C#. For anyone who doesn't
I'm attempting to construct a web service that allows for RESTful requests to return
When attempting to validate a journal I use the LedgerJournalEngine ErrorExists for each voucher
Im attempting to construct to new mysql tables at once: public function connect() {

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.