Discussions
Categories
- 196.8K All Categories
- 2.2K Data
- 238 Big Data Appliance
- 1.9K Data Science
- 450.3K Databases
- 221.7K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 550 MySQL Community Space
- 478 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3K ORDS, SODA & JSON in the Database
- 544 SQLcl
- 4K SQL Developer Data Modeler
- 187K SQL & PL/SQL
- 21.3K SQL Developer
- 295.8K Development
- 17 Developer Projects
- 138 Programming Languages
- 292.5K Development Tools
- 107 DevOps
- 3.1K QA/Testing
- 646K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 155 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.1K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 18 Java Essentials
- 160 Java 8 Questions
- 86K Java Programming
- 80 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 204 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 439 LiveLabs
- 38 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 171 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 232 Portuguese
Table disappears in the page when binding it to a managed bean property

Hello, I am working with jdev 12c and jdk 8. When I bind the table on jsf page to a managed bean property it disappears from the page and when I remove the binding to the manged bean property it appears. So can you help me please to solve this problem.
The jsf code is :
<af:table value="#{bindings.RefObligationVO2.collectionModel}"
var="row" autoHeightRows="10"
rows="#{bindings.RefObligationVO2.rangeSize}"
emptyText="#{bindings.RefObligationVO2.viewable ? raficviewBundle.NO_DATA_TO_DISP : raficviewBundle.ACCES_DENIED}"
rowBandingInterval="0"
selectedRowKeys="#{bindings.RefObligationVO2.collectionModel.selectedRow}"
selectionListener="#{bindings.RefObligationVO2.collectionModel.makeCurrent}"
rowSelection="single"
fetchSize="#{bindings.RefObligationVO2.rangeSize}"
filterModel="#{bindings.RefObligationVO2Query.queryDescriptor}"
filterVisible="true"
queryListener="#{bindings.RefObligationVO2Query.processQuery}"
varStatus="vs" id="t5" contentDelivery="immediate"
immediate="true"
columnStretching="column:c22"
styleClass="AFStretchWidth"
binding="#{GestionObligationBean.tableBind}">
The manged bean code is :
public class GestionObligationBean {
private RichTable tableBind;
public void setTableBind(RichTable tableBind) {
this.tableBind = tableBind;
}
public RichTable getTableBind() {
return tableBind;
}
The adfc-config code is:
<managed-bean id="__4">
<managed-bean-name>GestionObligationBean</managed-bean-name>
<managed-bean-class>bean.bean.GestionObligationBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
Answers
-
Why is the component bound? Component binding is generally not needed. In most situations, you will bind a component’s value rather than its instance to a bean property. You’ll need to use a component binding only when you need to change one of the component’s attributes dynamically. For example, if an application renders a component only under certain conditions, it can set the component’s
rendered
property accordingly by accessing the property to which the component is bound.Binding a component instance to a bean property has the following advantages.
- The managed bean can programmatically modify component attributes.
- The managed bean can instantiate components rather than let the page author do so.
-
Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 38,449 Red Diamond
In addition to @dvohra21 you should never bind a component to a bean in a scope higher than request scope. Session scope should not be used to bind components.
see https://www.ateam-oracle.com/post/rules-and-best-practices-for-jsf-component-binding-in-adf for more info.
Timo
-
@dvohra21 The table is bound because I need the bound to clear the filter on the table. Have you any idea why the table disappears ?
-
@Timo Hahn I changed the scope to request and the problem stills the same.
-
The scope seems to be the issue as Timo indicated. What is the scope?
-
@dvohra21 I used the scope session , after that I change it to request and the problem is the same.
-
Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 38,449 Red Diamond
Where did you change the scope?
To clear the filter of the table, you can bind the table to another bean in request scope.
Timo
-
@Timo Hahn I change the scope in adfc-config. I try to bind it to another bean in request scope as you told me and the problem is the same
-
Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 38,449 Red Diamond
Have you changed the binds property too?
If not, nothing changes.
If this doesn't work, provide a reproducible test case built on the HR DB schema (see https://community.oracle.com/tech/apps-infra/kb/articles/5-writing-reproducible-test-cases-why-and-how).
Timo
-
The table is bound because I need the bound to clear the filter on the table.
Should not digress from the issue, if filter clear is what is needed, several options are available to clear table filter, some related links:
https://tompeez.wordpress.com/2013/08/06/jdev-12c-how-to-reset-a-filter-on-an-aftable-the-12c-way/
https://tompeez.wordpress.com/2011/10/29/jdev-how-to-reset-a-filter-on-an-aftable/
https://tompeez.wordpress.com/tag/filterablequerydescriptor/