Exception in programatically created tree table
Hi All
I programatically populate the data for the tree table using TreeModel and ChildTreeProperty classes.
I get the below exception
javax.faces.model.NoRowAvailableException.
1. Please share any ideas on this exception.
2. Can you please guide me to an Oracle doc for programatically implementing a tree table?
Thanks,
Raghuram
Open the jar with WinRar for example and verify if it is ok.
(Maybe it's corrupted)
Similar Messages
-
How to create tree table with column headers
hi,
when i drag and drop a view object onto my .jspx page as a af: tree table ,
am not able to get the column header of each column. all the columns in the table are just clubbed together not separated as in af:table.
can anyone say how the column headers are created for the columns when we drop a view object as a tree table?Hi,
this is not an option with the treeTable as it gets rendered by default when dragging and dropping the collection to the page. I haven't tried it, but I think you will have to check which node is getting rendered and based on this information add your own row layout . Sounds like a bit of coding work
Frank -
Progrmmatically creating Tree Table from a POJO
Hi,
I've a requirement to develope a Tree Table out of a collection(ArrayList). I've not used Tree Table component earlier. I understand its pretty easy to create one from a Data Control(VO). I had looked in to code snippets on Tree component, but my need is for a Tree Table component.
I am looking for programmatic creation of a Tree Table that even handles the selection event, creation of nodes(parent and child both). A way that I store both parent and child nodes in a single list but can identify the difference while rendering.
Please share if there are some code snippets available.
Thank you.Thanks Shay for your response. As suggested by you, I was walking thru ADFRichclientdemo application.
I am using Jdeveloper 11.1.1.5
I've been asked to avoid Trinidad libraries as there are new classes available to construct a table model and handle the events on the same which I am not aware.
I am looking for code refrences to create a Tree and handle the events using a POJO bean. -
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 -
I am using JDev 11g.
I created tree table and warped around with toolbar with commandToolbarButton in it. How can I delete leaves or root node? Thanks.Hi,
to delete a node you need to get the selected node (rowkey and then delete it programatically), get the row it represents and delete it
Frank -
How to add child node in Tree table programmetically
Jdev Version 11.1.1.4.0.
I have created tree table programmetically in bean.
I have to add child node to tree table component on button click event on page.
Please let me know how to do this in bean.
Regards,
KiranHow are you creating the tree pro-grammatically?
If you are adding a new node to underlying data structure and refresh the tree - the tree will get updated with the new data.
Thanks,
Navaneeth -
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 -
Issue while creating ADF Table programatically
Hi,
I am trying to create a table programatically...And i implemented like below:
RichTable phoneTable = new RichTable();
phoneTable.setEmptyText("No Phone Details yet");
getContactPhone(contactObj.getPhone());
phoneTable.setValue(contactObj.getPhone());
// contactObj.getPhone() is a ArrayList<TelephoneBOD> in pojo Object...
// Which is taken from a Object returned from DataControl Method (Captured in pageFlowScope)
phoneTable.setVar("row");
// Add Columns
RichColumn column = new RichColumn();
column.setHeaderText("Type");
column.setId("phoneType");
column.setAlign("right");
column.setWidth("100");
// Set output.
RichOutputText output = new RichOutputText();
output.setValue("#{row.phoneType}");
// Add output into column.
column.getChildren().add(output);
// Add column into table.
phoneTable.getChildren().add(column);When i try to implement like this i am getting fllowing error:
popup:
ZIP_STATE_FAILED
ADF_FACES-60097:For more information, please see the server's error log for an entry beginning with: ADF_FACES-60096:Server Exception during PPR, #2log:
Caused By: java.io.NotSerializableException: org.ieee.internal.ws.proxy.conf.types.TelephoneBOD
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at java.util.ArrayList.writeObject(ArrayList.java:570)
at sun.reflect.GeneratedMethodAccessor252.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at org.apache.myfaces.trinidad.component.TreeState.writeExternal(TreeState.java:239)
at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1421)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1390)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at org.apache.myfaces.trinidad.component.TreeState.writeExternal(TreeState.java:241)
at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1421)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1390)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)I think this is happening because i am not serializing the object passing to Table. If this is the Reason.. How to serialize the object?
Or i am missing something in the code?
Thanks
Thoom
Edited by: User007 on Aug 31, 2011 1:47 PM
Edited by: User007 on Aug 31, 2011 1:47 PMThanks Timo.. for simple solution.
Actually.. TelephoneBOD is auto-generated on creation of web service proxy from web service.
I don't think.. updating those Java files directly is a best practice. Because they will be changing if there is any change in web service schema..
You think there is any other way to do so?
Thanks
Thoom -
How to create tree by database table
hello sir ,
my table is as follows,
NAME LINK ID PID ROLLID
User mgt. f?p=131:1: 1 - 10 ////root node///
district 10 1 1 child
Roles 16 14 4 child
Users 11 10 1 child
ROLLID is given from another table whis is (ROLES). i making tree by the combinations of id , pid, & roll id. by the roll id i can manage the tree to do not display specific nodes to specific users.
ROLE table as :
ROLE_ID NAME DESCRIPTION
1 Administrator This is administrator
2 Assistant Director -
3 Assistant Statistical Officer -
4 Data Entry Operator -
but i think it is very complicated process . give me solution about it
also i have to give my images to each node. how can i do that?You already have a thread going about this: Re: how to create tree by database table .
Scott -
Af:tree table Server Exception During PPR#10
Hi,
I am using jdev 11.1.1.4.
I am facing error in tree table.I have used af:inputtext in nodestamp facet.
My page is running successfully, but when I click on show hierarchy arrow from context menu it's giving the following error.
RegistrationConfigurator> <handleError> ADF_FACES-60096:Server Exception during PPR, #10
java.lang.ClassCastException: oracle.adfinternal.view.faces.renderkit.rich.TreeRendererUtils$2 cannot be cast to javax.faces.component.EditableValueHolder
at org.apache.myfaces.trinidad.component.StampState$EVHState.restoreRowState(StampState.java:456)
at org.apache.myfaces.trinidad.component.StampState.restoreStampState(StampState.java:128)
at org.apache.myfaces.trinidad.component.UIXCollection.restoreStampState(UIXCollection.java:913)
at org.apache.myfaces.trinidad.component.UIXTreeTable.restoreStampState(UIXTreeTable.java:379)
at org.apache.myfaces.trinidad.component.UIXCollection._restoreStampState(UIXCollection.java:1508)
at org.apache.myfaces.trinidad.component.UIXCollection.postRowDataChange(UIXCollection.java:747)
at org.apache.myfaces.trinidad.component.UIXCollection.setRowKey(UIXCollection.java:426)
at oracle.adfinternal.view.faces.renderkit.rich.TreeRendererUtils$2$1.encodeAllChildren(TreeRendererUtils.java:961)
at oracle.adfinternal.view.faces.renderkit.rich.PopupRenderer.encodeAll(PopupRenderer.java:776)
at oracle.adfinternal.view.faces.renderkit.rich.TreeRendererUtils$2$1.encodeAll(TreeRendererUtils.java:902)
at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
at oracle.adfinternal.view.faces.renderkit.rich.TreeRendererUtils.encodeSelectorPopup(TreeRendererUtils.java:1069)
at oracle.adfinternal.view.faces.renderkit.rich.TreeTableRenderer.encodeAll(TreeTableRenderer.java:588)
at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
at org.apache.myfaces.trinidad.component.UIXCollection.encodeEnd(UIXCollection.java:529)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
at oracle.adf.view.rich.render.RichRenderer.encodeStretchedChild(RichRenderer.java:2004)
at oracle.adfinternal.view.faces.renderkit.rich.PanelBoxRenderer.access$100(PanelBoxRenderer.java:34)
at oracle.adfinternal.view.faces.renderkit.rich.PanelBoxRenderer$ChildEncoderCallback.processComponent(PanelBoxRenderer.java:2219)
at oracle.adfinternal.view.faces.renderkit.rich.PanelBoxRenderer$ChildEncoderCallback.processComponent(PanelBoxRenderer.java:2202)
at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:170)
at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:290)
at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:255)
at oracle.adfinternal.view.faces.renderkit.rich.PanelBoxRenderer._encodeAllChildren(PanelBoxRenderer.java:1344)
at oracle.adfinternal.view.faces.renderkit.rich.PanelBoxRenderer._renderContentRow(PanelBoxRenderer.java:1265)
at oracle.adfinternal.view.faces.renderkit.rich.PanelBoxRenderer.encodeAll(PanelBoxRenderer.java:348)
at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeCenterFacet(PanelStretchLayoutRenderer.java:769)
at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._encodeCenterPane(PanelStretchLayoutRenderer.java:1140)
at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._encodeMiddlePanes(PanelStretchLayoutRenderer.java:348)
at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeAll(PanelStretchLayoutRenderer.java:313)
at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:415)
at oracle.adfinternal.view.faces.renderkit.rich.FormRenderer.encodeAll(FormRenderer.java:220)
at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:415)
at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:1181)
at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:266)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:197)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:193)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:777)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:293)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:213)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
If I use output text in nodestamp facet, whole thing is working fine.
Here is my jspx code
<af:treeTable value="#{bindings.Department.treeModel}" var="node"
selectionListener="#{bindings.Department.treeModel.makeCurrent}"
rowSelection="single" id="tt1" width="500">
<f:facet name="nodeStamp">
<af:column id="c1">
<af:inputText value="#{node.deptname}" id="ot1" />
</af:column>
</f:facet>
<f:facet name="pathStamp">
<af:outputText value="#{node}" id="ot2"/>
</f:facet>
<f:facet name="header">
<af:outputText value="Employee Id"/>
</f:facet>
<af:outputText value="#{node.ID}"/>
</af:column>
<af:column>
<f:facet name="header">
<af:outputText value="EmpName"/>
</f:facet>
<af:outputText value="#{node.empName}"/>
</af:column>
<af:column>
<f:facet name="header">
<af:outputText value="Addr"/>
</f:facet>
<af:outputText value="#{node.city}"/>
</af:column>
</af:treeTable>
Thanks
DeepthiI didn't notice that example was using a tree instead of a treeTable. I change mine to use a tree and was able to successfully get it to commit data as well as click the show Hierarchy menu without getting an exception.
I want to switch to edit mode on a double click not a single click and had that working when I used a treeTable but it now causes an infinite ADF loop when I refresh the table to show the row as editable.
I'm using readOnly="#{node.editMode ne true}"/>
I'm also am seeing that row selection highlighting does not display on the outputText. It does if I use a inputText.
I'm getting close though. Thanks again for getting me past that hurdle. -
Problem occured when create a tree table for master-detail view objects using SQL queries?
I am programming a tree table for master-detail view objects using SQL queries and these 2 view objects are not simple singel tables queries, and 2 complex SQL are prepared for master and view objects. see below:
1. Master View object (key attribute is SourceBlock and some varaible bindings are used for this view object.)
SELECT cntr_list.SOURCE_BLOCK,
sum(
case when cntr_list.cntr_size_q = '20'
then cntr_list.cntr_qty
else 0 end ) as cntr20 ,
sum(
case when cntr_list.cntr_size_q = '40'
then cntr_list.cntr_qty
else 0 end ) as cntr40 ,
sum(
case when cntr_list.cntr_size_q = '45'
then cntr_list.cntr_qty
else 0 end ) as cntr45
FROM (
SELECT yb1.BLOCK_M as SOURCE_BLOCK,
scn.CNTR_SIZE_Q,
count(scn.CNTR_SIZE_Q) AS cntr_qty
FROM SHIFT_CMR scm, SHIFT_CNTR scn, YARD_BLOCK yb1, YARD_BLOCK yb2
WHERE
scm.cmr_n = scn.cmr_n
AND (scm.plan_start_dt BETWEEN to_date(:DateFrom,'YYYY/MM/DD HH24:MI:SS') AND to_date(:DateTo,'YYYY/MM/DD HH24:MI:SS')
OR scm.plan_end_dt BETWEEN to_date(:DateFrom,'YYYY/MM/DD HH24:MI:SS') AND to_date(:DateTo,'YYYY/MM/DD HH24:MI:SS'))
AND scm.shift_mode_c = :ShiftModeCode
AND scm.end_terminal_c = :TerminalCode
AND scm.start_terminal_c = yb1.terminal_c
AND scm.start_block_n = yb1.block_n
AND substr(scn.start_location_c,(instr(scn.start_location_c,',',1,5)+1),instr(scn.start_location_c,',',1,6)-(instr(scn.start_location_c,',',1,5)+1)) BETWEEN yb1.slot_from_n AND yb1.slot_to_n
AND scm.end_terminal_c = yb2.terminal_c
AND scm.end_block_n = yb2.block_n
AND substr(scn.end_location_c,(instr(scn.end_location_c,',',1,5)+1),instr(scn.end_location_c,',',1,6)-(instr(scn.end_location_c,',',1,5)+1)) BETWEEN yb2.slot_from_n AND yb2.slot_to_n
AND scn.status_c not in (1, 11)
AND scn.shift_type_c = 'V'
AND scn.source_c = 'S'
GROUP BY yb1.BLOCK_M, scn.CNTR_SIZE_Q
) cntr_list
GROUP BY cntr_list.SOURCE_BLOCK
2. Detail View object (key attributes are SourceBlock and EndBlock and same varaible bindings are used for this view object.)
SELECT cntr_list.SOURCE_BLOCK, cntr_list.END_BLOCK,
sum(
case when cntr_list.cntr_size_q = '20'
then cntr_list.cntr_qty
else 0 end ) as cntr20 ,
sum(
case when cntr_list.cntr_size_q = '40'
then cntr_list.cntr_qty
else 0 end ) as cntr40 ,
sum(
case when cntr_list.cntr_size_q = '45'
then cntr_list.cntr_qty
else 0 end ) as cntr45
FROM (
SELECT yb1.BLOCK_M as SOURCE_BLOCK,
yb2.BLOCK_M as END_BLOCK,
scn.CNTR_SIZE_Q,
count(scn.CNTR_SIZE_Q) AS cntr_qty
FROM SHIFT_CMR scm, SHIFT_CNTR scn, YARD_BLOCK yb1, YARD_BLOCK yb2
WHERE
scm.cmr_n = scn.cmr_n
AND (scm.plan_start_dt BETWEEN to_date(:DateFrom,'YYYY/MM/DD HH24:MI:SS') AND to_date(:DateTo,'YYYY/MM/DD HH24:MI:SS')
OR scm.plan_end_dt BETWEEN to_date(:DateFrom,'YYYY/MM/DD HH24:MI:SS') AND to_date(:DateTo,'YYYY/MM/DD HH24:MI:SS'))
AND scm.shift_mode_c = :ShiftModeCode
AND scm.end_terminal_c = :TerminalCode
AND scm.start_terminal_c = yb1.terminal_c
AND scm.start_block_n = yb1.block_n
AND substr(scn.start_location_c,(instr(scn.start_location_c,',',1,5)+1),instr(scn.start_location_c,',',1,6)-(instr(scn.start_location_c,',',1,5)+1)) BETWEEN yb1.slot_from_n AND yb1.slot_to_n
AND scm.end_terminal_c = yb2.terminal_c
AND scm.end_block_n = yb2.block_n
AND substr(scn.end_location_c,(instr(scn.end_location_c,',',1,5)+1),instr(scn.end_location_c,',',1,6)-(instr(scn.end_location_c,',',1,5)+1)) BETWEEN yb2.slot_from_n AND yb2.slot_to_n
AND scn.status_c not in (1, 11)
AND scn.shift_type_c = 'V'
AND scn.source_c = 'S'
GROUP BY yb1.BLOCK_M, yb2.BLOCK_M, scn.CNTR_SIZE_Q
) cntr_list
GROUP BY cntr_list.SOURCE_BLOCK, cntr_list.END_BLOCK
3. I create a view link to create master-detail relationship for these 2 view objects.
masterview.SourceBlock (1)->detailview.SourceBlock (*).
4. I create a tree table using these 2 view objects with master-detail relationship.
When I set default value for variable bindings of these 2 view objects and the matching records exist, tree table can work well. I can expand the master row to display detail row in UI.
But I need to pass in dymamic parameter value for variable bindings of these 2 view objects, tree table cannnot work again. when I expand the master row and no detail row are displayed in UI.
I am sure that I pass in correct parameter value for master/detail view objects and matching records exist.
Managed Bean:
DCIteratorBinding dc = (DCIteratorBinding)evaluteEL("#{bindings.MasterView1Iterator}");
ViewObject vo = dc.getViewObject();
System.out.println("Before MasterView1Iterator vo.getEstimatedRowCount()="+ vo.getEstimatedRowCount());
System.out.println("Before MasterView1Iterator ShiftModeCode="+ vo.ensureVariableManager().getVariableValue("ShiftModeCode"));
vo.ensureVariableManager().setVariableValue("DateFrom", dateFrom);
vo.ensureVariableManager().setVariableValue("DateTo", dateTo);
vo.ensureVariableManager().setVariableValue("ShiftModeCode", shiftModeC);
vo.ensureVariableManager().setVariableValue("TerminalCode", terminalCode);
vo.executeQuery();
System.out.println("MasterView1Iterator vo.getEstimatedRowCount()="+ vo.getEstimatedRowCount());
DCIteratorBinding dc1 = (DCIteratorBinding)evaluteEL("#{bindings.DetailView1Iterator}");
ViewObject vo1 = dc1.getViewObject();
System.out.println("Before DetailView1Iterator vo1.getEstimatedRowCount()="+ vo1.getEstimatedRowCount());
System.out.println("Before DetailView1Iterator ShiftModeCode="+ vo1.ensureVariableManager().getVariableValue("ShiftModeCode"));
vo1.ensureVariableManager().setVariableValue("DateFrom", dateFrom);
vo1.ensureVariableManager().setVariableValue("DateTo", dateTo);
vo1.ensureVariableManager().setVariableValue("ShiftModeCode", shiftModeC);
vo1.ensureVariableManager().setVariableValue("TerminalCode", terminalCode);
vo1.executeQuery();
System.out.println("after DetailView1Iterator vo1.getEstimatedRowCount()="+ vo1.getEstimatedRowCount());
5. What's wrong in my implementation? I don't have no problem to implement such a tree table if using simple master-detail tables view object, but now I have to use such 2 view objects using complex SQL for my requirement and variable bindings are necessary for detail view object although I also think a bit strange by myself.Hi Frank,
Thank you and it can work.
public void setLowHighSalaryRangeForDetailEmployeesAccessorViewObject(Number lowSalary,
Number highSalary) {
Row r = getCurrentRow();
if (r != null) {
RowSet rs = (RowSet)r.getAttribute("EmpView");
if (rs != null) {
ViewObject accessorVO = rs.getViewObject();
accessorVO.setNamedWhereClauseParam("LowSalary", lowSalary);
accessorVO.setNamedWhereClauseParam("HighSalary", highSalary);
executeQuery();
but I have a quesiton in this way. in code snippet, it is first getting current row of current master VO to determine if update variables value of detail VO. in my case, current row is possibly null after executeQuery() of master VO and I have to change current row manually like below.
any idea?
DCIteratorBinding dc = (DCIteratorBinding)ADFUtil.evaluateEL("#{bindings.SSForecastSourceBlockView1Iterator}");
ViewObject vo = dc.getViewObject();
vo.ensureVariableManager().setVariableValue("DateFrom", dateFrom);
vo.ensureVariableManager().setVariableValue("DateTo", dateTo);
vo.ensureVariableManager().setVariableValue("ShiftModeCode", shiftModeC);
vo.ensureVariableManager().setVariableValue("TerminalCode", terminalCode);
vo.executeQuery();
vo.setCurrentRowAtRangeIndex(0);
((SSForecastSourceBlockViewImpl)vo).synchornizeAccessorVOVariableValues(); -
How to create a Tree Table In ADF
Hi i,m using Jdev 11 g R1
i want to create a Tree table in my application. is any body have sample codes plz help me..Google is your friend :-)
[http://www.howabout.cn/adf_faces/devguide/tree.html|http://www.howabout.cn/adf_faces/devguide/tree.html]
[http://technology.amis.nl/blog/4191/adf-11g-treetable-with-sub-totals-how-the-sql-query-can-make-life-easier-for-the-view-developer|http://technology.amis.nl/blog/4191/adf-11g-treetable-with-sub-totals-how-the-sql-query-can-make-life-easier-for-the-view-developer]
and many others....
Timo -
How to create Parent and Children is a tree table / trigger sequence number
How to create Parent and Children is a tree table when the primary key of the parent is generated via a trigger and a sequence number in the database?
My problem is when I create a parent and then right away a children. The parent still not have a primary key until the transaction get to the database. I get a error when trying the create the children, cannot insert null in the foreign key field of the children.
Please help.
StephaneYou should have the parent key be marked as a DBSequence type.
Then you should have the association between the master and detail defined as composite association to make sure that the posting order to the database is correct.
http://download.oracle.com/docs/cd/E24382_01/web.1112/e16182/bcentities.htm#BABFECDJ -
Programatically creating ADF Tree with nodes,child nodes & links?
Hi,
Currently I am using Build JDEVADF_11.1.1.3.PS2_GENERIC_100408.2356.5660. Please provide me detailed code for programatically creating ADF Tree with nodes, child nodes and links in it.
Thanks,
VikYou need to create a model for the tree. ADF has a build in model that you can use to build your own tree.
This is what you need to write in your JSPX:
<af:tree summary="Navigation" id="treeNav" value="#{pageFlowScope.treeNavigationBackingBean.model}"
var="node" contextMenuSelect="true" rowSelection="single" fetchSize="30">
<f:facet name="nodeStamp">
<af:outputText id="txtText" value="#{node.text}"/>
</f:facet>
</af:tree>This is the code to retreive the model:
public TreeModel getModel() {
if(model == null)
model = new ChildPropertyTreeModel(instance,"children");
return model;
}instance contains the actual tree. I build it in the constructor of my managed bean:
public BeanTreeNavigation() {
ArrayList<TreeItem> rootItems = new ArrayList<TreeItem>();
TreeItem node1 = new TreeItem("Root node");
ArrayList<TreeItem> level1 = new ArrayList<TreeItem>();
TreeItem level1Node1 = new TreeItem("Level1 Node1");
level1.add(level1Node1);
node1.setChildren(level1);
rootItems.setChildren(node1);
this.setListInstance(rootItems);
root = rootItems;
public void setListInstance(List instance) {
this.instance = instance;
model = null;
}The TreeItem class is not a default one. I created it myself. You can make of it whatever you want:
public class TreeItem {
private String text;
private List<TreeItem> children = null;
public TreeItem(String text){
this.text = text;
public void setText(String text) {
this.text = text;
public String getText() {
return text;
public void setChildren(List<TreeItem> children) {
this.children = children;
public List<TreeItem> getChildren() {
return children;
}I wrote the TreeItem as an inner class of the managed bean.
The most important part is the getModel methode. There you need to specify an Object and the name of the getter that will return a List of the children.
Hope this helps.
Edited by: Yannick Ongena on Feb 22, 2011 7:30 AM -
Create Custom tree table panel collection toolbar buttons
Dear all
i have a tree table inside panel collection,inside the toolbar there is some buttons like show as top ,show top, expand all ....etc
what i want to do is i want to call it from custom button not from the toolbar button.
any suggestions
RegardsHi,
yes, it is. Its fixed in a the current build and should be fixed in TP4 (upcoming)
Frank
Maybe you are looking for
-
GR non-valuated box automatically set in backend PO
Hi ... I am doing extended classic scenario with SRM 5.0 and ECC 6.0 system, When I create a purchase order with multiple account assignments in SRM then the "GR non-valuated" box is set automatically in backend PO when the PO is replicated in SAP. F
-
So I was letting my MBP cycle through with its battery as I always do. I was down to like 4 percent, and I got the message to plug in my charger. When I did, nothing happened. There was no red light, just a dim green one, and it said my computer w
-
Hi EDI incoming vendor Invoices are getting blocked if vendor charging frights. what we need to change to recieve with fright charge without block ?
-
Bitmap images to Vectored images
Is there a way really one can use to convert bitmap images into vectored images? I ask this question in response to a problem that I have. I take photos using a camera of resolution 72 pixels per inch and then process them in a program I have written
-
Number of dialog process in SM50 does not tally RZ10
Hi, I am encountering the above scenario whereby the number of dialog processes shown in SM50 is not the same as the profile parameters indicated in RZ10. I have restated SAP several times and it's still the same - both doesn't tally. Has anyone enco