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?