How can I update the children after a node in a tree?
Hello world.I am updating a subtree programmatically using a bean managed as data source.
I can find all the topics are about the use of your and JUCtrlHierNodeBinding.updateValuesFromRows.
Now, I need to find a way to directly update the nodes without any line. What should I do?
Here is the code:
Tags:
<af:tree id="tframe" initiallyExpanded="true"
selectionListener="#{backingBeanScope.systemDataFrameBB.onSelectNode}" var="n"
binding="#{backingBeanScope.systemDataFrameBB.tframe}"
value="#{systemDataFrameMB.treeData}" expandAllEnabled="true"
rowSelection="single" fetchSize="-1" contentDelivery="immediate"
immediate="true" summary="summary">
<f:facet name="nodeStamp">
<af:group>
<af:outputText value="#{n.is_system?'[SYSTEM]':''}" />
<af:outputText value="#{n.is_use?'':'[X]'}" />
<af:outputText value="#{n.data_frame_name}"/>
</af:group>
</f:facet>
</af:tree>
(systemDataFrameMB) bean managed:
private ChildPropertyTreeModel treeData;
public ChildPropertyTreeModel getTreeData() throws SQLException
{
if (this.treeData == null)
{
AuthAMImpl authAM = this.getAppModule();
List<DataFrameNode> subTrees = authAM.getDataFrameTrees(); // load with JDBC and POJO
DataFrameNode root = new DataFrameNode(); // insert all sub-trees into a new tree
root.setData_frame_id(0);
root.setData_frame_name("[ROOT]");
root.setParent_data_frame_id(Integer.MIN_VALUE);
root.setIs_system(true);
root.setIs_use(true);
if (subTrees != null && subTrees.size() > 0)
{
root.setChildren(subTrees);
for (DataFrameNode n : subTrees)
n.setParent(root);
}
this.treeData = new ChildPropertyTreeModel(root, "children"); // I guess this is the simplest way to show hierachical data...
}
return this.treeData;
}
model:
public class DataFrameNode
{
private int data_frame_id;
private String data_frame_name;
private int parent_data_frame_id;
private boolean is_use;
private boolean is_system;
private DataFrameNode parent;
private List<DataFrameNode> children;
// getters/setters are omitted....
}
support bean (systemDataFrameBB):
// edit event handler
public void onEditResult(DialogEvent de)
{
String name = (String)this.getItName().getValue();
boolean isUse = this.getSbcIsUse().isSelected();
SystemDataFrameMB dfMB = (SystemDataFrameMB)JSFUtils.resolveExpression("#{systemDataFrameMB}");
try
{
node.setData_frame_name(name);
node.setIs_use(isUse);
dfMB.updateNode(node); // persist changes, this method will change all the children's 'is_use' field to FALSE when isUse == FALSE
AdfFacesContext.getCurrentInstance().addPartialTarget(this.getTframe()); // refresh the tree, only the edited node will be updated, but I want the tree to update the whole sub-tree to reflect the change on all its children
}
catch (Exception e)
{
// omitted...
}
}
Yes, you must use JUCtrlHierNodeBinding to update entire tree.
Tags: Java
Similar Questions
-
Satellite L300D - 24 d how can I update the graphics driver?
Hello
How can I update the driver for my ATI Radeon 3100 graphics card. (Win Vista 32 bit)
I download and installed the new ATI Catalyst worms. 10.12.If I change my graphics card options, there is always the old driver installed... Worms. 22.04.08 8.479.0.0
Also, it is not possible to change the settings for graphic resolution higher than 1280 X 800 Pix.Thanks for the help,
Fun1975
First, you must use the page to Toshiba display driver.
The use of other drivers can lead to highest GPU temperature and cause overheating.But if you want to use other drivers, you can do so at you own risk.
In order to install another driver, go to Device Manager, mark the graphics card, then press on uninstall button.
Then the driver should be uninstalled.After you restart the laptop, you can try to install the new version.
> It is also not possible to change the settings for graphic resolution higher than 1280 X 800 Pix.
The internal screen for laptop supports 1280 x 800 high resolution. It is not possible to choose a higher value. -
I had to change my Apple ID due to fraudulent charges but my iPhone 6s 9.2 still has the old Apple ID and will not accept old or new passwords. How can I update the iPhone 6s 9.2 with the new Apple ID and password? I tried to perform a complete reset, but which requires the Apple ID and password that doesn't work not... pretty frustrated here.
YYou have unlink the old iphone you as find my iphone the reset all devices on this subject from your account then plug it to your iTunes then restore a new one after that reset password that under the new phone then connect
-
URGENT! How can I update the build on BB store
Hi all..
I want to update the build on BB store. Please help me how can I update the build on bb store after the download of version 1.
Now, I need to download version 2.
Thank you
After signing, choose manage products, then in the line that corresponds to the product that you're gong to update, you should find an icon "+" under the heading of press. A click on it.
I don't remember having a problem, this the first time, so I suspect it's pretty much follow your nose after that.
It is also available help documentation:
-
How can I reinstall the Muse after accidentally uninstalling?
How can I reinstall the Muse after uninstalling accidentally. Downloading applications does not and is such that it is updated.
Thank you Jeff, managed to reinstall Muse with the help of the local Adobe Tech Team support. They walked through me the aam-list and delete which was not deleted.
With this, Muse is restored.
-
I managed to see the profile of the artist in Apple's music. How can I update the profile picture?
This is a user forum. No Apple itself is allowed to answer your questions here.
You are probably better contact Apple Support directly to get an answer to your question.
-
How can I update the gps of streets &; trips
How can I update the gps of streets & trips (not sure which version)
Hi CP agent v-2jeen
Because the question is specific to the streets and trips you contact that it can support the assistance team. I would recommend posting your query to the community of Microsoft streets & trips. Please visit the links below to find a community that will support what ask you in the right direction.
http://social.Microsoft.com/forums/en-us/streetsandtrips/threads
You can also check out below help links-
http://support.Microsoft.com/ph/1058#TAB0
http://www.Microsoft.com/streets/en-us/support-and-training.aspxI hope this helps.
-
How can I update the expiration date on my credit card account?
How can I update the expiration date on my credit card account?
How can I update the expiration date on my credit card account?
Go to your Bank and get a new card.
-
I'm not having implemented the cd with me. How can I update the window components. by mistake I uninstalled the
Reinstall windows components, you've accidentally deleted when you have the game CD with you.
-
Hi, I want to know how can I update the current bios on my sony laptop using the disc or usb.
I can't access the windows on the laptop at all, because I'm getting STOP: 0 x 00000 "a5 error that says: your bios is not fully compatible with acpi.»This error prevents me to access any live disc or recovery disks.I would like to learn more about records tho method.Thank you.Take it to a repair shop, you have damaged the card mother/connections
-
How can I update the rubrics with WebServices?
How can I update the rubrics with WebServices?
/Anyone/ has some success with this?
It becomes important to our business objectives in order to solve the problems within the control elements.
I can't enter the number of line by line in order to uniquely identify it. How can I get that number, so I can send it with xml "update"?
A little nudge in the right direction would be much appreciated.
Aaron.
You must use a field on the form as the one on the line items, NOT the line number that appears in the journal of the line item. If I understand correctly, the LineItemIdentifier can be any field on the form, even the short description. It is best if you know you will use web services to update the line items, you add a (potentially hidden) field to the form and fill that with unique values when positions are created. If you are working with existing elements of line, then you must choose a field that will be usually unique within a single record and hope, you don't have a lot of duplicates.
-
My Photoshop CS6 on Win7 became glitchy and I thought that it would help to reinstall the program, so I went and uninstall. According to me, the first thing I should have done was disable it within the program. How can I disable the CS6 after that I uninstalled already, so I can reinstall again?
Available downloadable Setup files:
- Suites and programs: CC 2015 | CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4, CS4 Web Standard | CS3
- Acrobat: DC, XI, X | Suite X | 9,8 | 9 standard | 8 standard
- Captivate: 8 | 7 | 6 | 5.5, 5 | 1
- Cold Fusion: 11: 10 | 9.0.2 version 9.0.0, 9.0.1, 8.0.1, 8.0.0, 7.0, 6.1, 6.0, 5.0, 4.0
- Contribute: CS5 | CS4, CS3 | 3,2
- FrameMaker: 12, 11, 10, 9, 8, 7.2
- Lightroom: 6| 5.7.1| 5 | 4 | 3
- Photoshop Elements: 14,13,12,11,10 | 9,8,7 win | 8 mac | 7 mac
- Premiere Elements: 14,13,12,11,10| 9, 8, 7 win | 8 mac | 7 mac
Download and installation help links Adobe
Help download and installation to Prodesigntools links can be found on the most linked pages. They are essential; especially steps 1, 2 and 3. If you click on a link that does not have these listed steps, open a second window by using the link to Lightroom 3 to see these "important Instructions".
-
I export a DNG from Lightroom on my iMac (OSx 10.11.2) but the thumbnail in os x Finder still shows the unmodified image. How can I update the thumbnail?
Export to DNG will always export a unretouched photo non-modified. Your changes are in the XMP of DNG file as text, and most of the viewers of DNG files cannot interpret or use this text. So, it seems that when you export photos in DNG, Lightroom has done what it is supposed to do.
-
How can I reinstall the CS5 AFTER HAVING A HARD DRIVE ON MY IMAC REPLACED?
How can I reinstall the CS5 after the hard drive on my iMac replaced?
Hello
You can install the application from the link below:
Kind regards
Sheena
-
How can I reinstall the CS6 after upgrading Windows Vista to Windows 10?
How can I reinstall the CS6 after upgrading Windows Vista to Windows 10?
Hello
You can download the Photoshop CS 6 from the below mentioned link.
Download Creative Suite 6 applications
Thank you
Maybe you are looking for
-
whenever I, try to open it, Tunes, I have, get, the, message:, the folder, "Ditties", is, on, to, locke d, drive, or you do not, write, permissions, for, this, file., Suggestions, to get over the past, this??
-
T2135CS satellite recovery disks does not
Hello, my laptop no longer and I think it's the hard drive, and, the companion disks do not work either. I called Toshiba and they said that it is not taken in charge more. Does anyone have an idea how can I make a boot disk for win 3.1? Thank you, j
-
Declaration of invalid function generating a range of service
Greetings- I am trying to create an instrument in 2013 CVI driver. My successfully the DLL builds, I then open my header with my export file and select options-> generates a function tree. All my statements of functions return with "invalid functio
-
Installed OR DAQmx 9.4 and modernized to LV 2009 - but no vi DAQmx in LV
Hi as the title suggests above - installed NI DAQmx 9.4 and upgraded to LV 2009 - but no vi DAQmx in LV We have improved LV 8.5 for 2009. LV 8.5 don't daqmx forward vi. And even after the upgrade to 9.4 Daqmx we still do not have the screw daqmx or a
-
I forgot my Windows password, how do I connect to my computer.
original title: password I forgot my password to connect to my computer and I am the adminastrator. How do I ge on the computer without it? I also have some files on there that I don't want to lose.