UIX tree, table-based example needed
Has anyone ever used the UIX tree element (JDev help, UIX developer's guide, chapter 15) in combination with BC4J and/or Jheadstart generated UIX-pages? Any examples are welcome. I also can't get the (static :-/) example in the Help to expand when clicking the +/- icons. Help on this one too please. Tnx.
You should try to post this question on JDevelper Forum.
Similar Messages
-
UIX Tree for all who needs help!!!
Hi guys!!!
Uix team can`t write any examples of this subject, we decided to create it :-)...
There is an example of working tree with proxy for JDev 9.03!!!
All data takes from the DataBase. We use a ViewObject for DataBinding with hierarhical querry
(start with...
connect by prior... )! Dont forget to write this querry!
For using this querry U must use primary key (but not the rowID Item!!!!).
Don`t forget to change the name of your package, appmodule in UIX and Java!!!
There are Java & Uix files here!
If U have any questions ask us for e-mail: [email protected] !
With best regards,
Diamond Developer Team (Stukotiy Luda (advancd support), Chindakov Alex, Druppov Serge).
From Russia!
P.S. We will be glad to see the working example of hGrid with the same DataBinding!
package mypackage1;
import java.lang.String;
import oracle.cabo.data.jbo.ui.bind.UIBindingUtils;
import oracle.cabo.servlet.BajaContext;
import oracle.cabo.servlet.Page;
import oracle.cabo.servlet.event.EventResult;
import oracle.cabo.servlet.event.PageEvent;
import oracle.cabo.servlet.ui.BajaRenderingContext;
import oracle.cabo.ui.RenderingContext;
import oracle.cabo.ui.UIConstants;
import oracle.cabo.ui.data.DataObject;
import oracle.cabo.ui.data.DataObjectList;
import oracle.cabo.ui.data.tree.ClientStateTreeDataProxy;
import oracle.cabo.ui.data.tree.SimpleTreeData;
import oracle.jbo.NoDefException;
import oracle.jbo.Row;
import oracle.jbo.RowIterator;
import oracle.jbo.ViewObject;
import oracle.jbo.server.ApplicationModuleImpl;
// --- File generated by Oracle Business Components for Java.
public class Mypackage1ModuleImpl extends ApplicationModuleImpl
* This is the default constructor (do not remove)
public Mypackage1ModuleImpl()
* Container's getter for TsStatView1
public TsStatViewImpl getTsStatView1()
return (TsStatViewImpl)findViewObject("TsStatView1");
* Sample main for debugging Business Components code using the tester.
public static void main(String[] args)
launchTester("mypackage1", "Mypackage1ModuleLocal");
public class JBODataObjectList implements DataObjectList
* Create a data object list based on the current range of
* this row iterator.
public JBODataObjectList(RowIterator iterator)
this(iterator, Integer.MAX_VALUE);
* Create a data object list based on the current range of
* this row iterator, with a restricted size.
public JBODataObjectList(RowIterator iterator, int maxSize)
_iterator = iterator;
size = Math.min(iterator.getRowCountInRange(), maxSize);
* Return the size of the list.
public int getLength()
return _size;
* Get an item from the list.
public DataObject getItem(int index)
// Make sure we're in range
if ((index < 0) || (index >= _size))
throw new IndexOutOfBoundsException();
Row row = _iterator.getRowAtRangeIndex(index);
if (row == null)
return null;
return new DO(row);
// An inner class that handles a single row
static private final class DO implements DataObject
public DO(Row row)
_row = row;
public Object selectValue(RenderingContext context, Object key)
// Make sure that the key is non-null
if (key != null)
try
// Treat the key as an attribute name
return _row.getAttribute(key.toString());
catch (NoDefException nde)
// Do nothing. It's legal to pass an invald key to DataObjects.
return null;
private final Row _row;
private final RowIterator _iterator;
private final int _size;
public class Tree implements DataObject {
private String submitURL = null;
public Tree(String submitURL){
this.submitURL = submitURL;
public static DataObject getProxy(RenderingContext rc, String ns, String name) {
return new Tree(null);
public static EventResult handleExpand(BajaContext context,Page page,PageEvent event)
throws Throwable
String state = event.getParameter(UIConstants.STATE_PARAM);
String node = event.getParameter(UIConstants.NODE_PARAM);
String selection = event.getParameter(UIConstants.SELECTION_PARAM);
EventResult result = new EventResult(page);
Object proxy = new ClientStateTreeDataProxy(null, state, node, selection);
result.setProperty("proxy", proxy);
return result;
public static int s = 0; // ������
public static int i = 0; // ������
// � ��������, ����������� ����, ���������� ��� ����� ������� �������� �����������!!!
public static String mOwner[]=new String[100]; // �������� ���� fk_owner �� ����
public static String mName[]=new String[100]; // �������� ���� fc_name �� ����
public static DataObject getTree(RenderingContext rc, String ns, String name){
SimpleTreeData child = new SimpleTreeData();
SimpleTreeData parent = new SimpleTreeData(); // ����������� ��������
SimpleTreeData parent1 = new SimpleTreeData(); // �������� �������
SimpleTreeData parentBuf[] = new SimpleTreeData[130]; // ����� ��� �������� ����������� ��������
int ownerInt; // ��� �������� fk_owner ������� ������
int buf = 0; // ��� �������� fk_owner ������� ������
String ownerStr, // --- � ������� ������
valueColumn; // ������ �������� ������� ������
if (i==0)
ViewObject vo = UIBindingUtils.getViewObject(rc); // ��� VO
vo.previous();
//for(s=0;s<96;s++)
while(vo.hasNext())
Row row=vo.next();
mOwner[s]=row.getAttribute("FkOwnerid").toString();
mName[s]=row.getAttribute("FcName").toString();
s++;
for (i=0;i<s;i++)
ownerStr=mOwner;
valueColumn=mName[i];
//ownerStr = row.getAttribute("FkOwnerid").toString();
ownerInt = Integer.parseInt(ownerStr);
//valueColumn = row.getAttribute("FcName").toString();
if(ownerInt == 0) // ������ ������
parent1 = new SimpleTreeData();
parent1.setText(valueColumn);
parent1.setExpandable("expanded");
parent.addChild(parent1);
buf = 0;
// parentBuf[ownerInt] = new MySimpleTreeData();
else
if(ownerInt != buf)
if(ownerInt > buf)
child = new SimpleTreeData();
child.setText(valueColumn);
child.setExpandable("expanded");
parent1.addChild(child);
parentBuf[ownerInt] = parent1;
parent1 = child;
buf = ownerInt;
else
child.setExpandable("no");
parent1 = parentBuf[ownerInt];
child = new SimpleTreeData();
child.setText(valueColumn);
child.setExpandable("expanded");
parent1.addChild(child);
parent1 = child;
buf = ownerInt;
else
child.setExpandable("no");
child = new SimpleTreeData();
child.setText(valueColumn);
child.setExpandable("expanded");
//parentBuf[ownerInt].addChild(child);
parent1 = parentBuf[ownerInt];
parent1.addChild(child);
parent1 = child;
if(i == 95)
child.setExpandable("no");
//child.setExpandable("no");
return parent;
public Object selectValue(RenderingContext rc, Object p1) {
BajaContext bc = BajaRenderingContext.getBajaContext(rc);
EventResult result = EventResult.getEventResult(bc);
Object proxy = (result==null) ? null : result.getProperty("proxy");
if (proxy==null) proxy = new ClientStateTreeDataProxy( submitURL, null, null, null);
return proxy;
<?xml version="1.0" encoding="windows-1252"?>
<page xmlns="http://xmlns.oracle.com/uix/controller"
xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
xmlns:ui="http://xmlns.oracle.com/uix/ui"
xmlns:bc4j="http://xmlns.oracle.com/uix/bc4j"
xmlns:html="http://www.w3.org/TR/REC-html40">
<bc4j:registryDef>
<bc4j:rootAppModuleDef name="TsStatView1AppModule"
definition="Project4.Mypackage1Module"
releaseMode="stateful" >
<bc4j:viewObjectDef name="TsStatView1"
rangeSize="3" />
</bc4j:rootAppModuleDef>
</bc4j:registryDef>
<content>
<dataScope xmlns="http://xmlns.oracle.com/uix/ui"
xmlns:data="http://xmlns.oracle.com/uix/ui">
<provider>
<data name="Proxy">
<method class="mypackage1.Tree" method="getProxy" />
</data>
<data name="Nodes">
<method class="mypackage1.Tree" method="getTree" />
</data>
</provider>
<contents>
<bc4j:rootAppModuleScope name="TsStatView1AppModule" >
<contents>
<document>
<metaContainer>
<!-- Set the page title -->
<head title=""/>
</metaContainer>
<contents>
<bc4j:viewObjectScope name="TsStatView1" >
<contents>
<pageLayout>
<contents>
<form name="menuForm" >
<contents>
<tree id="menuTree" formSubmitted="true"
data:nodes="nodes@Nodes"
data:proxy="proxy@Proxy" />
</contents>
</form>
</contents>
</pageLayout>
</contents>
</bc4j:viewObjectScope>
</contents>
</document>
</contents>
</bc4j:rootAppModuleScope>
</contents>
</dataScope>
</content>
<handlers>
<event name="expand" >
<method class="mypackage1.Tree" method="handleExpand" />
</event>
</handlers>
</page>Don't forget, you can make code easier to read by enclosing it in [code ] tags (without the space in the first tag), so it looks like this:
<provider>
<data name="bundle">
<bundle class="strings" />
</data>
</provider> instead of this:
<provider>
<data name="bundle">
<bundle class="strings" />
</data>
</provider> -
Dear All,
I would like to know. Can I create af:TreeTable with SQL Query without using Entity Object because of the Database allow to use only Query view object. Please show to me the ways how to tackle in this scenario.
Regards
KThere some discussion going on here.
i will suggest you the same.
Is it possible to create a multi-level tree table based on a single VO ? -
Hi,
I have the following requirement where i need to display a tree table. Here is how the initial implementation is:
I have created the read only view for : ManagersVO > PoolsVO > MachinesVO. Where 'MachinesVO' is the destination view. And created view links between ManagersVO & PoolsVO using ManagerId and PoolsVO & MachinesVO using PoolId.
And using this implementation, successfully created tree table on the UI. Now we got an enhancement for this:
i.e., MachinesVO should return list of machines as per user logs in. i.e., we have 4 different roles. 'Super Admin', 'Sys Admin', 'App Admin', 'End User'. The default query for MachinesVO is for 'Super Admin'. The query for other user roles is different except the SELECT statement.
The requirement is to dynamically change the query of MachinesVO based on user logs in and display the tree table accordingly. To implement the same i have tried using setQuery() operation on 'MachinesVO' which results with the following error:
JBO-26016: InvalidOperException
Cause: You cannot set customer query (calling setQuery()) on a view object if it is the detail view object in a master detail view link.
Action: Do not call setQuery() if the view object is a detail.
Can one suggest me a best solution to implement this.
Thanks & Regards,
KiranHi Navaneetha Krishnan,
Here is how i implemented based on your comments. As i have tree table based 3 different VO's, created the following method at middle view(i.e., PoolsVO).
1.Tree Model hierarchy
ManagersVO > PoolsVO > MachinesVO
I actually want to filter the data at Machines level. Hence wrote a method at PoolsVOImpls and exposed it in the PoolsVO client interface. Here is the code that i have placed in the PoolVOImpl
public class PoolsVOImpl extends ViewObjectImpl implements PoolsVO{
* This is the default constructor (do not remove).
public PoolsVOImpl () {
public void filterMachinesDataByUserRole(String userRole,String vzId){
Row row = getCurrentRow();
String query = "";
if(row != null){
RowSet rowSet = (RowSet)row.getAttribute("MachinesVO");
if(rowSet != null){
MachinesVOImpl machinesVOImpl = (MachinesVOImpl)rowSet.getViewObject();
if(userRole.equalsIgnoreCase("SYS ADMIN")){
machinesVOImpl .setWhereClause(query related to sysadmin);
//Similarly for other user roles.
executeQuery();
}And this piece of code needs to be executed before the jsff(which has the tree table) renders. Hence, i created a this methodAction as a default activity in the respective taskflow where the jsff is placed. Once this method get executed, the page should render the machines specific to the user.
Here is the issue: getCurrentRow() method call is returning always NULL.
Please correct me if i'm doing something wrong. I do tried the above mentioned approach by creating the method at '*ManagersVOImpl*' level too. Still the same issue.
Thanks & Regards,
Kiran -
ADF Tree Table Repeats Elements at All Levels in nodeStamp Facet
Fusion Middleware Version: 11.1.1.5
WebLogic: 10.3.5.0
JDeveloper Build: Build JDEVADF_11.1.1.5.0_GENERIC_110409.0025.6013
Project: Custom WebCenter Portal Application integrated with custom ADF task flows.
Hi
I have an issue with ADF Tree Table (af:treeTable) whereby if I add a component to a group under the 'nodeStamp' facet it repeats for all levels in the tree even those outside the group.
Overview:
- 3-level master-detail structure created using ADF Business Components (3 view objects connected by 2 view links)
- ADF Tree Table based on master-detail
- Requirement to show 3 levels of data in the first column as a tree
- Tree table is rendering correctly showing values for 'node.FullName', 'node.DisplayValue' and 'node.HoursType' respectively in a 3 level tree.
- When another component is added to the top node in the tree ('node.FullName') for example some output text ('node.TimeBuildingBlockId'), it is displayed along side components 'node.DisplayValue' and 'node.HoursType' as well.
Code snippet:
<af:treeTable value="#{bindings.PerPeopleFVO1.treeModel}" var="node"
selectionListener="#{bindings.PerPeopleFVO1.treeModel.makeCurrent}"
rowSelection="single" id="tt1" styleClass="AFStretchWidth"
horizontalGridVisible="true" verticalGridVisible="true"
disableColumnReordering="true" summary="Timecard Entry"
displayRow="selected" expandAllEnabled="false"
contentDelivery="immediate" autoHeightRows="24"
columnStretching="column:column1"
binding="#{pageFlowScope.TimecardMB.tree_binding}">
<f:facet name="nodeStamp">
<af:column id="c1" headerText="Partner Details" width="500">
<af:group id="g4">
<af:outputText value="#{node.FullName}" id="ot3"/>
<af:outputText value="#{node.TimeBuildingBlockId}" id="ot1"/>
</af:group>
<af:outputText value="#{node.DisplayValue}" id="ot4"
inlineStyle="color:Green; font-weight:bolder;"/>
<af:outputText value="#{node.HoursType}" id="ot5"/>
<f:facet name="filter"/>
</af:column>
</f:facet>
<f:facet name="pathStamp">
<af:outputText value="#{node}" id="ot2"/>
</f:facet>
<af:column FROM HERE.........>
Any ideas greatly appreciated.Hi,
Try using a switcher to distinguish all three levels of a tree. You can have three different facets, three different af:group 's.
When you add in one level, it will not repeat in the other level.
Please see the below snippet.
<af:tree value="#{bindings.RefBusinessUnitView1.treeModel}" var="node"
selectionListener="#{bindings.RefBusinessUnitView1.treeModel.makeCurrent}"
rowSelection="single" id="t1">
<f:facet name="nodeStamp">
<af:group id="g1">
<af:switcher id="s1"
facetName="#{node.hierTypeBinding.viewDefName}">
<f:facet name="model.RefBusinessUnitView">
<af:group id="g2">
<af:outputText value="#{node.Code}" id="ot1"/>
</af:group>
</f:facet>
<f:facet name="model.RefProductFamilyView">
<af:group id="g3">
<af:outputText value="#{node.ProductFamilyName}" id="outputText1"/>
<af:outputText value="#{node.PName}" id="outputText2"/>
</af:group>
</f:facet>
</af:switcher>
</af:group>
</f:facet>
</af:tree>
Nitish -
Bad performance when iterating/updating the rows of a tree table
Hello,
we have a tree table based on a VO and EO (with transient attributes). One of the attribute is a flag.
The VO is populated with a complex query having many thousands of rows.
Now, when the user clicks on a parent node, all the children are updated (their flag is set to true) recursively.
This is really really slow. It might require several minutes, while a similar update via PL/SQL on a real table would required few seconds.
Is there any way to improve the performance? We have already applied all the tunings on both the EO and VO mentioned in Oracle Documentation, but they had almost no effect:
- retain viewlink row set iterators
- query hints
- Use update batching
The algorithm we use is the following:
private void checkTreeNodes(JUCtrlHierNodeBinding node, Boolean check) {
if (node == null) {
return;
TreeVORowImpl nodeRow = (TreeVORowImpl)node.getRow();
if (nodeRow != null) {
nodeRow.setFlag(check);
List<JUCtrlHierNodeBinding> children = null;
if (!nodeRow.getLevel().equals("4")) // no more than 4 levels
children = node.getChildren();
if (children != null) {
for (JUCtrlHierNodeBinding _node : children) {
checkTreeNodes(_node, check);
}Thanks for you answer.
I am trying to move the logic in a method of the AM. But I have an exception (jdev 11.1.2.1):
public void checkTreeNodes(TreeVORowImpl node, Boolean check, int level) {
if (node == null)
return;
node.setFlag(check);
if (level >= 4)
return;
Key key = new Key(new String[] { node.getId() }); // Id is the primary Key
// By debugging via System.out.println, the code stops here:
RowIterator rowIt = getMyVO().findByAltKey("ParentId", key , -1, false); // children have ParentId = Id
while (rowIt.hasNext()) {
TreeVORowImpl row = (TreeVORowImpl)rowIt.next();
checkTreeNodes(row, check, level + 1);
}findByAltKey gives the following exception (since it's called from the UI by getting the AM from DataControl):
oracle.jbo.InvalidObjNameException: JBO-25005: [...]
at oracle.adf.model.binding.DCBindingContainerState.validateStateFromString(DCBindingContainerState.java:573)
at oracle.adf.model.binding.DCBindingContainerState.validateStateFromString(DCBindingContainerState.java:504)
at oracle.adf.model.binding.DCBindingContainerState.validateToken(DCBindingContainerState.java:684)
Do you see anything wrong or not efficient?
Thanks. -
How to disable a node in ADF Tree Table?
Hi,
I'm using JDeveloper version - 11.1.1.7
I have a requirement to disable the nodes in Tree table based on status of the node. How can I achieve this?
Any inputs would be helpful.
Thanks
RaviHi,
you cannot disable nodes in the sense that they cannot be expanded or selected. What you can do though is to ignore node selections in a custom selection handler or to render the node different (e.g. using an output text component instead of a command link or image etc.). What is your functional requirement for what disabled nodes should not do
Frank -
Synchronize form with self-referencing VO in tree table. POJO Based Model
Hello. I need your help
ADF Code Corner sample #32 show how to build a tree table from a self referencing VO:
[http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html#CodeCornerSamples]
ADF Code Corner document Oracle JDeveloper OTN Harvest 09/2011 by Frank Nimphius show how to build an edit form for the table data and how to synchronize it with the selected row in the tree table:
[http://www.oracle.com/technetwork/developer-tools/adf/learnmore/sept2011-otn-harvest-508189.pdf]
This examples are helpful, but i have a problem, i have not a model based on a database, my application datamodel is based in POJO objects, there are no appModules or ViewObjects so I do not know how to reference the tree table target attribute with the edit form iterator.
Can anyone help me?
Maybe (i dont know how) i need make a VO and a AppModule that wraps the POJO model ?
thank you very muchHi,
this should work the same. You create a tree from a POJO Data Control based on your POJO Model. Expose another collection pointing to the same data set and drag it as the form. Use the setting on the tree configuration dialog to set the current row in the tree as the current in the form iterator.
Frank -
Need help on Java Tree Table.
Hi,
I need to build a Java Tree Table as the follwing:
the first column of the table is tree node, the rest are JTextField, Jlabel, JBottonBox etc.
I tried the example of JTreeTable for the file system to make the other columns as JTextField etc. did not work out.
Anybody how to do this?
A lof of thanks.
JaneHi,
I need to build a Java Tree Table as the follwing:
the first column of the table is tree node, the rest are JTextField, Jlabel, JBottonBox etc.
I tried the example of JTreeTable for the file system to make the other columns as JTextField etc. did not work out.
Anybody how to do this?
A lof of thanks.
Jane -
Pointers needed for JTree Table based GUI
Hi i am designing a swings JTreeTable based UI in which i have to make 3 columns the first column will have JTree and the rest two cols will have JCheckbox.The first column will be populated with vector..can any one please provide pointers to such GUI i mean some sample code examples...
Take a look to this:
[http://java.dzone.com/news/taking-new-swing-tree-table-a-|http://java.dzone.com/news/taking-new-swing-tree-table-a-]
I did something like that (a JTreeTable with a tree at the first column and colored cells in the rest). It uses a netbeans library, but it might work for you as well.
Good luck! -
Need to fetch value from a table based on data range
Hello there,
I was hoping that the community could give me a hand with this little puzzle I got.
I am currently creating a Time Dimension for a data wharehouse, and I have the requirement to populate a column named SEASON (e.g: Summer, Winter, Spring, Autumn) for each date row. So for the 20/Dec/2013, the Season column must say Winter.
Here is now my Time Dimension table looks like, without the Season information (which I yet have to load):
DimTime Table
TIMEID
FULLDATE
YEAR
SEASON
MONTH
MONTHDAY
WEEK
WEEKDAY
274
02-MAR-10
2010
3
2
9
2
275
03-MAR-10
2010
3
3
9
3
276
04-MAR-10
2010
3
4
9
4
277
05-MAR-10
2010
3
5
9
5
278
06-MAR-10
2010
3
6
9
6
279
07-MAR-10
2010
3
7
9
7
This entire table is being populated using Oracle functions to manipulate a date field from another table, named PDATE:
My ETL Code
INSERT INTO DimTime(timeid, fulldate, year, month, monthday, week, weekday)
SELECT tim_seq.NEXTVAL, pdate, year, month, monthday, week, weekday
FROM (SELECT DISTINCT pdate, EXTRACT(year from pdate) year, EXTRACT(month from pdate) month,
EXTRACT(day FROM pdate) monthday, to_number(to_char(to_date(pdate,'DD/MM/YY'),'IW')) week,
TO_CHAR(pdate, 'D') weekday
FROM Performance PER
ORDER BY pdate);
NOTE: Code considers the table DimTime to be truncated every time it loads (i.e.: I don't need to consider additional loads).
As you can see, Season wasn't populated. Since the solstices and equinoxes vary for each year, I can't just say that Summer start at a given date (e.g: 21 of June) because one year it could be the 19/Jun, another the 22/Jun, etc. So in order to solve this problem, I have a table named Season which defines the START and END dates for the seasons:
Season Table
SEASON#
SEASONNAME
YEAR
DATEFROM
DATETO
1
Spring
2010
01-MAR-10
30-MAY-10
2
Summer
2010
31-MAY-10
29-AUG-10
3
Autumn
2010
30-AUG-10
28-NOV-10
4
Winter
2010
29-NOV-10
27-FEB-11
5
Spring
2011
28-FEB-11
29-MAY-11
6
Summer
2011
30-MAY-11
28-AUG-11
7
Autumn
2011
29-AUG-11
27-NOV-11
8
Winter
2011
28-NOV-11
26-FEB-12
9
Winter
2009
30-NOV-09
28-FEB-10
This is the bit I don't know how to do. How can I make sure that I populate the correct Season in my DimTime table based on the season specified in the Season table?
Thanks in advance for your help!
Regards,
P.Just join to table Season:
INSERT
INTO DimTime(
timeid,
fulldate,
year,
month,
monthday,
week,
weekday,
seasonname
SELECT tim_seq.NEXTVAL,
pdate,
year,
month,
monthday,
week,
weekday
FROM (
SELECT DISTINCT pdate,
EXTRACT(year from pdate) year,
EXTRACT(month from pdate) month,
EXTRACT(day FROM pdate) monthday,
to_number(to_char(to_date(pdate,'DD/MM/YY'),'IW')) week,
TO_CHAR(pdate,'D') weekday,
seasonname
FROM Performance PER,
season
WHERE pdate between datefrom and dateto
SY. -
I really needed this one implementation of tree table on mvc
hi there i'm burning my as* reading some tutorials about tree table and all i found was a complex codes
i just wanna know if you know some codes of a simple tree table where in the content of a tree or table was hardcoded and there are no thingy effects such as sortes. coz i really wanted to implement this on mvc since we are using STable here's the sample code:
View:
package treeTable;
import java.awt.*;
//import java.awt.event.MouseEvent;
//import java.util.EventObject;
import javax.swing.*;
//import javax.swing.table.TableCellEditor;
//import javax.swing.table.TableCellRenderer;
import javax.swing.table.TableColumnModel;
//import javax.swing.tree.DefaultTreeCellRenderer;
//import javax.swing.tree.DefaultTreeSelectionModel;
//import javax.swing.tree.TreeCellRenderer;
//import javax.swing.tree.TreeModel;
//import javax.swing.tree.TreePath;
import javax.swing.border.*;
//import javax.swing.event.ListSelectionEvent;
//import javax.swing.event.ListSelectionListener;
import com.jgoodies.forms.layout.CellConstraints;
import com.jgoodies.forms.layout.FormLayout;
//import com.borland.jbcl.layout.*;
import org.scopemvc.core.Control;
import org.scopemvc.core.Selector;
import org.scopemvc.view.swing.*;
* View for PosCCYFX
* @author Raymond Isip
public class HistoricTotalPositionByCurrencyFXView extends SPanel implements HistoricTotalPositionByCurrencyFXConstants {
// Instance variables for the selectors used by the JBuilder designer
Selector cashStructTBLSelector = CASH_STRUCT_TBL_SELECTOR;
Selector selectedCashStructTBLSelector = SELECTED_CASH_STRUCT_TBL_SELECTOR;
Selector optionsTBLSelector = OPTIONS_TBL_SELECTOR;
Selector selectedOptionsTBLSelector = SELECTED_OPTIONS_TBL_SELECTOR;
Selector fxcashStructuredFwdLBLSelector = FXCASH_STRUCTURED_FWD_LBL_SELECTOR;
Selector cashLBLSelector = CASH_LBL_SELECTOR;
Selector structFwdsLBLSelector = STRUCT_FWDS_LBL_SELECTOR;
Selector optionsLBLSelector = OPTIONS_LBL_SELECTOR;
FormLayout MainFormLayout = new FormLayout ("12,p,12,p,12", "11,p,11");
FormLayout LeftFormLayout = new FormLayout ("280,250,87", "p,p");
FormLayout LeftTableFormLayout = new FormLayout ("p", "p,p");
FormLayout RightTableFormLayout = new FormLayout ("300", "p,p");
FormLayout LeftSubFormLayout = new FormLayout ("100,50,100", "p");
CellConstraints cc = new CellConstraints();
Border cashStructTBLBorder;
STable cashStructTBLTable = new STable();
JScrollPane cashStructTBLScrollPane = new JScrollPane(cashStructTBLTable);
Border optionsTBLBorder;
STable optionsTBLTable = new STable();
JScrollPane optionsTBLScrollPane = new JScrollPane(optionsTBLTable);
JLabel fxcashStructuredFwdLBLLabel = new JLabel();
SLabel fxcashStructuredFwdLBLSLabel = new SLabel();
JLabel cashLBLLabel = new JLabel();
SLabel cashLBLSLabel = new SLabel();
JLabel structFwdsLBLLabel = new JLabel();
SLabel structFwdsLBLSLabel = new SLabel();
JLabel optionsLBLLabel = new JLabel();
SLabel optionsLBLSLabel = new SLabel();
* Constructor for the PosCCYFXView object
public HistoricTotalPositionByCurrencyFXView() {
jbInit();
* The main program for the PosCCYFXView class
* @param args The command line arguments
public static void main(String[] args) {
HistoricTotalPositionByCurrencyFXView view = new HistoricTotalPositionByCurrencyFXView();
JFrame frame = new JFrame();
frame.setSize(800, 600);
frame.getContentPane().add(view);
frame.setVisible(true);
* Used by Scope to set the window frame title.
* @return The title value
public String getTitle() {
return "PosCCYFX";
* Used by Scope to end the application when the window is closed.
* @return The closeControl value
public Control getCloseControl() {
return new Control(HistoricTotalPositionByCurrencyFXController.EXIT_CONTROL_ID);
* Description of the Method
* @return Description of the Return Value
public boolean validateForm() {
return true;
private void jbInit() {
this.setLayout(MainFormLayout);
JPanel LeftPanel = new JPanel();
JPanel LeftSubPanel = new JPanel();
JPanel LeftTablePanel = new JPanel();
JPanel RightTablePanel = new JPanel();
LeftPanel.setLayout(LeftFormLayout);
LeftSubPanel.setLayout(LeftSubFormLayout);
LeftTablePanel.setLayout(LeftTableFormLayout);
RightTablePanel.setLayout(RightTableFormLayout);
JScrollPane LeftScrollPane = new JScrollPane(LeftTablePanel);
//LeftScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
LeftScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_NEVER);
JScrollPane RightScrollPane = new JScrollPane(RightTablePanel);
RightScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
RightScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_NEVER);
LeftScrollPane.setPreferredSize(new Dimension(620,330));
RightScrollPane.setPreferredSize(new Dimension(300,330));
cashStructTBLTable.setSelector(cashStructTBLSelector);
cashStructTBLTable.setSelectionSelector(selectedCashStructTBLSelector);
String[] columnSelects = {"col1", "col2", "col3", "col4", "col5","col6", "col7", "col8", "col9", "col10"};
String[] columnNames = {"USD", "Date","Product Type", "Details", "Buy", "Sell", "Sub Total", "Buy", "Sell", "Total"};
int colWidths[] = {100,70,70,40,50,50,60,50,50,60};
cashStructTBLTable.setColumnSelectors(columnSelects);
cashStructTBLTable.setColumnNames(columnNames);
cashStructTBLTable.setPreferredScrollableViewportSize(new Dimension(600,273));
TableColumnModel cashStructTBLModel = cashStructTBLTable.getColumnModel();
for (int x=0; x<colWidths.length; x++) {
int width = colWidths[x];
cashStructTBLModel.getColumn(x).setPreferredWidth(width);}
cashStructTBLTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
cashStructTBLScrollPane.setBorder(cashStructTBLBorder);
cashStructTBLScrollPane.getViewport().add(cashStructTBLTable, null);
optionsTBLTable.setSelector(optionsTBLSelector);
optionsTBLTable.setSelectionSelector(selectedOptionsTBLSelector);
String[] columnSelects1 = {"col1", "col2", "col3"};
String[] columnNames1 = {"Buy", "Sell", "Total"};
int colWidths1[] = {90,90,100};
optionsTBLTable.setColumnSelectors(columnSelects1);
optionsTBLTable.setColumnNames(columnNames1);
optionsTBLTable.setPreferredScrollableViewportSize(new Dimension(300,290));
TableColumnModel optionsTBLModel = optionsTBLTable.getColumnModel();
for (int x1=0; x1<colWidths1.length; x1++) {
int width1 = colWidths1[x1];
optionsTBLModel.getColumn(x1).setPreferredWidth(width1); }
optionsTBLTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
optionsTBLScrollPane.setBorder(optionsTBLBorder);
optionsTBLScrollPane.getViewport().add(optionsTBLTable, null);
optionsTBLTable.setEnabled(false);
fxcashStructuredFwdLBLLabel.setText(" FX Cash & Structured Forwards");
fxcashStructuredFwdLBLLabel.setBorder(BorderFactory.createRaisedBevelBorder());
cashLBLLabel.setText(" Cash");
cashLBLLabel.setBorder(BorderFactory.createRaisedBevelBorder());
structFwdsLBLLabel.setText(" Structured FWDs");
structFwdsLBLLabel.setBorder(BorderFactory.createRaisedBevelBorder());
optionsLBLLabel.setText(" Options");
optionsLBLLabel.setBorder(BorderFactory.createRaisedBevelBorder());
/******************************Fillers*************************************/
JLabel sample = new JLabel(" ");
JLabel sample1 = new JLabel(" ");
JLabel sample2 = new JLabel(" ");
JLabel sample3 = new JLabel(" ");
JLabel sample4 = new JLabel(" ");
sample.setBorder(BorderFactory.createRaisedBevelBorder());
sample1.setBorder(BorderFactory.createRaisedBevelBorder());
sample2.setBorder(BorderFactory.createRaisedBevelBorder());
sample3.setBorder(BorderFactory.createRaisedBevelBorder());
sample4.setBorder(BorderFactory.createRaisedBevelBorder());
LeftSubPanel.add(sample, cc.xy(2,1));
LeftPanel.add(sample1, cc.xy(1,1));
LeftPanel.add(sample2, cc.xy(3,1));
LeftPanel.add(sample3, cc.xy(1,2));
LeftPanel.add(sample4, cc.xy(3,2));
LeftSubPanel.add(cashLBLLabel, cc.xy(1,1));
LeftSubPanel.add(structFwdsLBLLabel, cc.xy(3,1));
LeftPanel.add(fxcashStructuredFwdLBLLabel, cc.xy(2,1));
LeftPanel.add(LeftSubPanel, cc.xy(2,2));
LeftTablePanel.add(LeftPanel, cc.xy(1,1));
LeftTablePanel.add(cashStructTBLScrollPane, cc.xy(1,2));
RightTablePanel.add(optionsLBLLabel, cc.xy(1,1));
RightTablePanel.add(optionsTBLScrollPane, cc.xy(1,2));
this.add(LeftScrollPane, cc.xy(2,2));
this.add(RightScrollPane, cc.xy(4,2));
Model:
package treeTable;
import java.util.ArrayList;
import java.util.List;
import org.scopemvc.core.ModelChangeEvent;
import org.scopemvc.core.Selector;
import org.scopemvc.model.basic.*;
import org.scopemvc.model.collection.ListModel;
* Model for for PosCCYFX
* @author Raymond Isip
public class HistoricTotalPositionByCurrencyFXModel extends BasicModel implements HistoricTotalPositionByCurrencyFXConstants {
private ListModel cashStructTBLList = new ListModel();
private CashStructTBLItem selectedCashStructTBL = null;
private ListModel optionsTBLList = new ListModel();
private OptionsTBLItem selectedOptionsTBL = null;
private String fxcashStructuredFwdLBL;
private String cashLBL;
private String structFwdsLBL;
private String optionsLBL;
* Constructor for the PosCCYFXModel object
public HistoricTotalPositionByCurrencyFXModel() {
Object[] data1= new Object[]{"100","100","200"};
Object[] data2= new Object[]{"","29.Apr.2004","Forward","SGD","200","100","300","250","150","400"};
for(int x = 0; x<=25;x++){
selectedOptionsTBL = new OptionsTBLItem(data1);
optionsTBLList.add(selectedOptionsTBL);
selectedCashStructTBL = new CashStructTBLItem(data2);
cashStructTBLList.add(selectedCashStructTBL);
* Gets the cashStructTBL list
* @return The cashStructTBL list
public List getCashStructTBLList() {
return cashStructTBLList;
* Sets the cashStructTBL list
* @param newCashStructTBLList The new cashStructTBL list
public void setCashStructTBLList(List newCashStructTBLList) {
cashStructTBLList.setList(newCashStructTBLList);
this.fireModelChange(ModelChangeEvent.VALUE_CHANGED, CASH_STRUCT_TBL_SELECTOR);
* Gets the selected cashStructTBL item
* @return A cashStructTBL item
public CashStructTBLItem getSelectedCashStructTBL() {
return selectedCashStructTBL;
* Sets the selected cashStructTBL item
* @param newCashStructTBL The new cashStructTBL item
public void setSelectedCashStructTBL(CashStructTBLItem newCashStructTBL) {
selectedCashStructTBL = newCashStructTBL;
this.fireModelChange(ModelChangeEvent.VALUE_CHANGED, SELECTED_CASH_STRUCT_TBL_SELECTOR) ;
* Gets the optionsTBL list
* @return The optionsTBL list
public List getOptionsTBLList() {
return optionsTBLList;
* Sets the optionsTBL list
* @param newOptionsTBLList The new optionsTBL list
public void setOptionsTBLList(List newOptionsTBLList) {
optionsTBLList.setList(newOptionsTBLList);
this.fireModelChange(ModelChangeEvent.VALUE_CHANGED, OPTIONS_TBL_SELECTOR);
* Gets the selected optionsTBL item
* @return A optionsTBL item
public OptionsTBLItem getSelectedOptionsTBL() {
return selectedOptionsTBL;
* Sets the selected optionsTBL item
* @param newOptionsTBL The new optionsTBL item
public void setSelectedOptionsTBL(OptionsTBLItem newOptionsTBL) {
selectedOptionsTBL = newOptionsTBL;
this.fireModelChange(ModelChangeEvent.VALUE_CHANGED, SELECTED_OPTIONS_TBL_SELECTOR) ;
* Gets the fxcashStructuredFwdLBL attribute
* @return The fxcashStructuredFwdLBL value
public String getFxcashStructuredFwdLBL() {
return fxcashStructuredFwdLBL;
* Sets the fxcashStructuredFwdLBL attribute
* @param newFxcashStructuredFwdLBL The new fxcashStructuredFwdLBL value
public void setFxcashStructuredFwdLBL(String newFxcashStructuredFwdLBL) {
fxcashStructuredFwdLBL = newFxcashStructuredFwdLBL;
this.fireModelChange(ModelChangeEvent.VALUE_CHANGED, FXCASH_STRUCTURED_FWD_LBL_SELECTOR);
* Gets the cashLBL attribute
* @return The cashLBL value
public String getCashLBL() {
return cashLBL;
* Sets the cashLBL attribute
* @param newCashLBL The new cashLBL value
public void setCashLBL(String newCashLBL) {
cashLBL = newCashLBL;
this.fireModelChange(ModelChangeEvent.VALUE_CHANGED, CASH_LBL_SELECTOR);
* Gets the structFwdsLBL attribute
* @return The structFwdsLBL value
public String getStructFwdsLBL() {
return structFwdsLBL;
* Sets the structFwdsLBL attribute
* @param newStructFwdsLBL The new structFwdsLBL value
public void setStructFwdsLBL(String newStructFwdsLBL) {
structFwdsLBL = newStructFwdsLBL;
this.fireModelChange(ModelChangeEvent.VALUE_CHANGED, STRUCT_FWDS_LBL_SELECTOR);
* Gets the optionsLBL attribute
* @return The optionsLBL value
public String getOptionsLBL() {
return optionsLBL;
* Sets the optionsLBL attribute
* @param newOptionsLBL The new optionsLBL value
public void setOptionsLBL(String newOptionsLBL) {
optionsLBL = newOptionsLBL;
this.fireModelChange(ModelChangeEvent.VALUE_CHANGED, OPTIONS_LBL_SELECTOR);
Controller:
package treeTable;
import java.awt.Dimension;
import org.scopemvc.controller.basic.BasicController;
import org.scopemvc.core.Control;
import org.scopemvc.core.ControlException;
* Controller for PosCCYFX
* @author Raymond Isip
public class HistoricTotalPositionByCurrencyFXController extends BasicController implements HistoricTotalPositionByCurrencyFXConstants {
* Constructor for the PosCCYFXController object
public HistoricTotalPositionByCurrencyFXController() {
setModel(new HistoricTotalPositionByCurrencyFXModel());
setView(new HistoricTotalPositionByCurrencyFXView());
public HistoricTotalPositionByCurrencyFXController(HistoricTotalPositionByCurrencyFXView view) {
setModel(new HistoricTotalPositionByCurrencyFXModel());
setView(view);
* Call this after creating the Controller to make it perform
* its initial action. Default impl opens the view in a new frame.
public void startup() {
HistoricTotalPositionByCurrencyFXView myView = (HistoricTotalPositionByCurrencyFXView) getView();
// This is the code that centers the view
myView.setViewBounds(myView.CENTRED);
myView.setPreferredSize(new Dimension(1000, 600));
showView(myView);
* Can be called by a parent to shutdown and remove this from
* the chain of responsibility. Default impl does this:
* <ul>
* <li>call shutdown() on every child controller</li>
* <li>call hideView()</li>
* <li>setParent(null)</li>
* </ul>
public void shutdown() {
super.shutdown();
* Handles all controls
* @param inControl The control token invoking the presentation logic
* @throws ControlException when an error occured while handling the control
protected void doHandleControl(Control inControl) throws ControlException {
try {
if (inControl.matchesID(SAVE)) {
inControl.markMatched();
doSave();
} else if (inControl.matchesID(RESET)) {
inControl.markMatched();
doReset();
} else if (inControl.matchesID(GOT_OPTIONS_TBL)) {
inControl.markMatched();
doGotOptionsTbl();
} catch (ControlException ce) {
throw ce;
} catch (RuntimeException re) {
re.printStackTrace();
throw re;
} finally {
// do cleanup
* Handles the SAVE control
* @todo Implement doSave
protected void doSave() throws ControlException {
// to implement
* Handles the RESET control
* @todo Implement doReset
protected void doReset() throws ControlException {
// to implement
* Handles the GOT_OPTIONS_TBL control
* @todo Implement doGotOptionsTbl
protected void doGotOptionsTbl() throws ControlException {
// to implement
Launcher:
package treeTable;
import org.scopemvc.util.ResourceLoader;
import org.scopemvc.util.UIStrings;
* Launcher for PosCCYFX
* @author Raymond Isip
public class HistoricTotalPositionByCurrencyFXLauncher {
* Constructor for the PosCCYFXLauncher object
public HistoricTotalPositionByCurrencyFXLauncher() {
* Start the PosCCYFX application
* @param args The command line arguments
public static void main(String[] args) {
// TODO: change 'resources' by the name of your properties file
UIStrings.setPropertiesName("resources");
ResourceLoader.setClientClassLoader(HistoricTotalPositionByCurrencyFXLauncher.class.getClassLoader());
HistoricTotalPositionByCurrencyFXController mainController = new HistoricTotalPositionByCurrencyFXController();
mainController.startup();
Constant:
package treeTable;
import org.scopemvc.core.Selector;
* Constants for the selectors and the control ids defined in PosCCYFX
* @author Raymond Isip
public interface HistoricTotalPositionByCurrencyFXConstants {
// Selectors
Selector CASH_STRUCT_TBL_SELECTOR = Selector.fromString("cashStructTBLList");
Selector SELECTED_CASH_STRUCT_TBL_SELECTOR = Selector.fromString("selectedCashStructTBL");
Selector OPTIONS_TBL_SELECTOR = Selector.fromString("optionsTBLList");
Selector SELECTED_OPTIONS_TBL_SELECTOR = Selector.fromString("selectedOptionsTBL");
Selector FXCASH_STRUCTURED_FWD_LBL_SELECTOR = Selector.fromString("fxcashStructuredFwdLBL");
Selector CASH_LBL_SELECTOR = Selector.fromString("cashLBL");
Selector STRUCT_FWDS_LBL_SELECTOR = Selector.fromString("structFwdsLBL");
Selector OPTIONS_LBL_SELECTOR = Selector.fromString("optionsLBL");
// Control IDs
* The SAVE control ID for the save button
String SAVE = "SAVE";
* The RESET control ID for the reset button
String RESET = "RESET";
* The GOT_OPTIONS_TBL control ID for the optionsTBL field
String GOT_OPTIONS_TBL = "GOT_OPTIONS_TBL";
CashStructTBLItem:
package treeTable;
* Item for CashStructTBL
* @author Raymond Isip
public class CashStructTBLItem {
String col1= new String();
String col2= new String();
String col3= new String();
String col4= new String();
String col5= new String();
String col6= new String();
String col7= new String();
String col8= new String();
String col9= new String();
String col10= new String();
* Constructor for the CashStructTBLItem object
public CashStructTBLItem(Object[] data1) {
setCol1((String)data1[0]);
setCol2((String)data1[1]);
setCol3((String)data1[2]);
setCol4((String)data1[3]);
setCol5((String)data1[4]);
setCol6((String)data1[5]);
setCol7((String)data1[6]);
setCol8((String)data1[7]);
setCol9((String)data1[8]);
setCol10((String)data1[9]);
* @return
public String getCol1() {
return col1;
* @return
public String getCol10() {
return col10;
* @return
public String getCol2() {
return col2;
* @return
public String getCol3() {
return col3;
* @return
public String getCol4() {
return col4;
* @return
public String getCol5() {
return col5;
* @return
public String getCol6() {
return col6;
* @return
public String getCol7() {
return col7;
* @return
public String getCol8() {
return col8;
* @return
public String getCol9() {
return col9;
* @param string
public void setCol1(String string) {
col1 = string;
* @param string
public void setCol10(String string) {
col10 = string;
* @param string
public void setCol2(String string) {
col2 = string;
* @param string
public void setCol3(String string) {
col3 = string;
* @param string
public void setCol4(String string) {
col4 = string;
* @param string
public void setCol5(String string) {
col5 = string;
* @param string
public void setCol6(String string) {
col6 = string;
* @param string
public void setCol7(String string) {
col7 = string;
* @param string
public void setCol8(String string) {
col8 = string;
* @param string
public void setCol9(String string) {
col9 = string;
OptionsTBLItem:
package treeTable;
* Item for OptionsTBL
* @author Raymond Isip
public class OptionsTBLItem {
String col1= new String();
String col2= new String();
String col3= new String();
* Constructor for the OptionsTBLItem object
public OptionsTBLItem(Object[] data1) {
setCol1((String)data1[0]);
setCol2((String)data1[1]);
setCol3((String)data1[2]);
* @return
public String getCol1() {
return col1;
* @return
public String getCol2() {
return col2;
* @return
public String getCol3() {
return col3;
* @param string
public void setCol1(String string) {
col1 = string;
* @param string
public void setCol2(String string) {
col2 = string;
* @param string
public void setCol3(String string) {
col3 = string;
All I want is for the tree table renderers or editors to use the table created on the vieew part of this mvc
i will greatly appreciates your helpAs a start point take sources of JTable (the component and datamodel) and rebuild them. I have made such component for my company product. To write it I spend 5 days and about two weeks for debugging. This code cannot be very simple. As it should be fully mutable. For example, each line should have bkcolor, fgcolor, font, etc. Each sell has bkcolor, fgcolor, font, insets, border, alighnment, visibility, etc. Each node has its cell, indent and array of data cells. To support fast scrolling the painting should be buffered. My components also supports text line wrapping. The tree component consists of three parts: the header, the left part and the matrix of data. This component can be printed (this is a secial code for paging and scaling).
-
Need to display only leaf and not the node using tree table
Hi,
Am using Jdeveloper 11.1.2.0.0 . As per requirement , am having Department - Employee View wherein Department is the parent considered as node and Employee as a child which is considered as a leaf. Having dragged and dropped the DepartmentView as a tree table -> shuttle department id and department name to be displayed -> added EmployeeView to the same and shuttled employee id along with the first and last name. so this works as it has to be in the below structure...
10 ADF
256 A
257 B
258 C
20 JAVA
259 D
260 E
Code for the same ..
<af:treeTable value="#{bindings.DepartmentsView.treeModel}" var="node"
selectionListener="#{bindings.DepartmentsView.treeModel.makeCurrent}" rowSelection="single" id="tt1">
<f:facet name="nodeStamp">
<af:column id="c1">
<af:outputText value="#{node}" id="ot1"/>
</af:column>
</f:facet>
<f:facet name="pathStamp">
<af:outputText value="#{node}" id="ot2"/>
</f:facet>
</af:treeTable>
*Here comes my requirement , need to display only the leaf nodes which has employee name [Employees] and need to hide the node [Department] in the below structure....*
256 A
257 B
258 C
259 D
260 E
Things tried to achieve the requirement....
1. Got only the EmployeeName in the nodeStamp facet as below. Hence am getting only Employee name but the issue is am getting the icon for the node [Parent - Department]. Now how do i hide the same.
<af:treeTable value="#{bindings.DepartmentsView.treeModel}" var="node"
selectionListener="#{bindings.DepartmentsView.treeModel.makeCurrent}" rowSelection="single" id="tt1">
<f:facet name="nodeStamp">
<af:column id="c1">
<af:outputText *value="#{node.FirstName}"* id="ot1"/>
</af:column>
</f:facet>
<f:facet name="pathStamp">
<af:outputText value="#{node}" id="ot2"/>
</f:facet>
</af:treeTable>
Please do suggest some solution....
Thanks and Regards,
Vinitha GHi,
Thanks for the reply. As the project has already implemented tree table they do not wanna change any logic written for the same. So they wanted to just display only the leaf node data using treetable component. Can you please suggest.
Thanks and Regards,
Vinitha G -
Issues while Populating data in Tree Table..
Hi,
I am using Tree Table component to populate Hierarchical data in it.
I create data controls based on web service proxy.
While creating Tree table i selected the Display Attributes to show in Tree table.
Now i am struck with two requirements:
1. At run time when i see the data in Tree table i can see that Display Attributes for mixed.
For Example:
Andrew> Phone
Work 123456789 // Here we can notice that, two attributes data displayed with on space gap. Phone Type and Phone number
Home 987654321 need to show some separation character between thenm something like : Work - 123456789 Is it possible?
> Email
work [email protected]
2. I need to show popup on click on Root node of the Tree table. If we take the above example, i want to perform a click event on "Andrew" so that i can popup and show some details.
But when i try to insert a command link in Node. Parent & Child nodes are populated with command link. How to have command link only for parent Node.
Code i am using:
*<af:treeTable value="#{bindings.contact.treeModel}" var="node"*
*selectionListener="#{bindings.contact.treeModel.makeCurrent}"*
*rowSelection="single"*
*binding="#{backingBeanScope.EditValidationDetails.tt1}"*
*id="tt1" width="920">*
*<f:facet name="nodeStamp">*
*<af:column id="c1" width="800" filterable="true">*
*<af:commandLink text="#{node}" id="cl2"/>*
*</af:column>*
*</f:facet>*
*<f:facet name="pathStamp">*
*<af:outputText value="#{node}"*
*binding="#{backingBeanScope.EditValidationDetails.ot3}"*
*id="ot3"/>*
*</f:facet>*
*</af:treeTable>*
Thanks in Advance...
Regards
ThoomHi,
I am using Tree Table component to populate Hierarchical data in it.
I create data controls based on web service proxy.
While creating Tree table i selected the Display Attributes to show in Tree table.
Now i am struck with two requirements:
1. At run time when i see the data in Tree table i can see that Display Attributes for mixed.
For Example:
Andrew
--Phone
----Work 123456789 // Here we can notice that, two attributes data displayed with on space gap. Phone Type and Phone number
----Home 987654321 need to show some separation character between thenm something like : Work - 123456789 Is it possible?
--Email
----work [email protected]
2. I need to show popup on click on Root node of the Tree table. If we take the above example, i want to perform a click event on "Andrew" so that i can popup and show some details.
But when i try to insert a command link in Node. Parent & Child nodes are populated with command link. How to have command link only for parent Node.
Code i am using:
<
<af:treeTable value="#{bindings.contact.treeModel}" var="node"
selectionListener="#{bindings.contact.treeModel.makeCurrent}"
rowSelection="single"
binding="#{backingBeanScope.EditValidationDetails.tt1}"
id="tt1" width="920">
<f:facet name="nodeStamp">
<af:column id="c1" width="800" filterable="true">
<af:commandLink text="#{node}" id="cl2"/>
</af:column>
</f:facet>
<f:facet name="pathStamp">
<af:outputText value="#{node}"
binding="#{backingBeanScope.EditValidationDetails.ot3}"
id="ot3"/>
</f:facet>
</af:treeTable>
>
Thanks in Advance...
Regards
Thoom -
Hi,
I need to build tree structure where all nodes in one table, so examples of master-detail tree are not helpful. I'm using celko model tree in database.
Where could I find some examples or tutorials?
ThanksUsing the HR schema's Employees table (where each employee can have a manager - who himself is an employee).
Create a default EO and VO based on the table - a cyclic relationship will be created based on the foreign key between managerid and employeeid.
Now in the data control drag the employees onto the page and drop as tree.
In the Edit Tree Binding dialog click the green + sign and choose Employees view again.
Choose which columns to display and click ok.
That's it run the page and the tree will work.
Maybe you are looking for
-
How can I make my iPod show up in the iTunes menu bar?
When I plug in my iPod nano (2GB) 2nd Generation it doesn't show up on the left side of my screen in the iTunes Menu Bar. I don't have the original cord, saying that I got it awhile ago, how can I make it show up? There is no content on my iPod curre
-
Hello guys, Recently I've lost my iPad2 in the public. It was my own mistake to leave my iPad on the table and forget to hold it all the times in my hand. When I realized that I'm not holding my iPad after few minutes, it's gone from the table. I've
-
Day by Day Data exluding week ends and holidays.
Hi, Can any give me solution for below requirement... 13/06/2007 14/06/2007 15/06/2006 18/06/2007 .. till 20 days of Lines Processed 15 18 13 19 ......... of Units
-
Reading payroll results for an employee from ABAP-HR?
Hi, I dont know whether i must post this question in this category ? but i had a problem in reading of the payroll data for employees. I used the function of PYXX_READ_PAYROLL_RESULT and passed the PERNR(employee number), SEQNR, RELID(clusteri
-
Adobe files missing from network drive after editing...
Problem started around June 1st. PDF files are shared on the network drive. After I edit one of the forms and resave it, the networked computers can no longer see the file listed on the network drive. Only the hosting computer still sees them. Al