UIX/XML BC4J Bug on "selectedValue" attribute
We suspect a bug in tag bc4j:attrProperty when used within boundAttribute because bounding
it to property selectedIndex works correctly, while bounding it to selectedValue result in a
Servlet error: Renderer failed: java.lang.ArrayIndexOutOfBoundsException
Correctly executed code (but logically wrong):
<bc4j:attrScope name="FlgObsoleto">
<contents>
<messageChoice name="FlgObsoleto" prompt="Stato">
<boundAttribute name="selectedIndex">
<bc4j:attrProperty name="value"/>
</boundAttribute>
<contents>
<option value="2" text="Element 0"/>
<option value="0" text="Element 1"/>
<option value="34" text="Element 2"/>
</contents>
</messageChoice>
</contents>
</bc4j:attrScope>
Code resulting in error (but logically correct):
<bc4j:attrScope name="FlgObsoleto">
<contents>
<messageChoice name="FlgObsoleto" prompt="Stato" >
<boundAttribute name="selectedValue">
<bc4j:attrProperty name="value"/>
</boundAttribute>
<contents>
<option value="2" text="Element 0"/>
<option value="0" text="Element 1"/>
<option value="34" text="Element 2"/>
</contents>
</messageChoice>
</contents>
</bc4j:attrScope>
The infamous ArrayIndexOutOfBoundsException - argh. This always means
some other, real exception has happened. In this case, it's a
ClassCastException as some bad code of ours blindly casted to
String. This is fixed in 9.0.3. In 9.0.2, there's a clumsy
workaround to force the attribute type to a string and dodge the bug.
Change this one instance of:
<bc4j:attrProperty name="value"/> to:
<concat>
<bc4j:attrProperty name="value"/>
<fixed text=""/>
</concat>Ugly. Very, very ugly!
Similar Messages
-
UIX XML-BC4J: Bug on messageTextInput
We have found a bug on the BC4J:messageTextInput tag because it doesn't use the value of "prompt" attribute to generate client validating messages.
Message alerts displayed on browser are on the following form:
Form Validation failures: a value must be entered for ''
PS: this problem did not occur with BC4J:messageInput but we can't use it because it doesn't support the onSubmitValidater inner tag to specify the field type.Try explicitly setting the "id" to a unique value; that should fix the problem.
It is a bug, but one that won't be fixed for 9.0.3. -
Adam, In a previous thread In cactus, it has problem to generate report you mentioned that in order to implement a Choice within UIX/XML/BC4J one would have to write some code to do it. Specifically,
1. Implement the oracle.cabo.ui.data.DataObjectList interface to wrap up the results of a BC4J query ...
2. Write a MethodDataProvider ....
3. Access the Method and display the Choices.
Can you JDEV guys post a WORKING example of how to do it?
An "EDIT.UIX" page where the USER makes a selection from the drop-down-list (Choice) and then updates the record with that selection would be nice.
Bill G...Beautiful!
I'll will look at implementing this over the weekend. I made a decision to temporarily go with UIX-JSP since I did not know how to implement a "UIX XML BC4J Choice".
Now that you've delivered it I should be able to convert some of my UIX-JSP apps to UIX/XML.
Thank You Good Buddy! (Think truck driver accent)
Bill G... -
UIX-XML BC4J - Unexpected errors using paths and DeltaTree on a particular UIX page
We are using a PageDescription to dynamically change a UIX tree using the DeltaTree technique described in the Dynamic Structure for For UIX Pages chapter of the UIX Developers Guide.
We search for a particular node using PathUtils.FindPathWithNodeID(RenderingContext context, UINode from, java.lang.String nodeID), but this fails when the page contains nested ViewObjectScopes.
The method throws a NullPointerException, and the render fails:
29/08/02 9.08 Valutazioni: java.lang.NullPointerException
oracle.cabo.ui.data.DataObjectList oracle.cabo.ui.collection.DataObjectListNodeList.getDataObjectList(oracle.cabo.ui.RenderingContext)
int oracle.cabo.ui.collection.DataObjectListNodeList.size(oracle.cabo.ui.RenderingContext)
int oracle.cabo.ui.BaseUINode.getIndexedChildCount(oracle.cabo.ui.RenderingContext)
boolean oracle.cabo.ui.path.PathUtils._findPath(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.path.PathImpl, oracle.cabo.ui.UINode, oracle.cabo.ui.path.PathUtils$Finder)
boolean oracle.cabo.ui.path.PathUtils._findPath(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.path.PathImpl, oracle.cabo.ui.UINode, oracle.cabo.ui.path.PathUtils$Finder)
boolean oracle.cabo.ui.path.PathUtils._findPath(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.path.PathImpl, oracle.cabo.ui.UINode, oracle.cabo.ui.path.PathUtils$Finder)
boolean oracle.cabo.ui.path.PathUtils._findPath(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.path.PathImpl, oracle.cabo.ui.UINode, oracle.cabo.ui.path.PathUtils$Finder)
boolean oracle.cabo.ui.path.PathUtils._findPath(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.path.PathImpl, oracle.cabo.ui.UINode, oracle.cabo.ui.path.PathUtils$Finder)
boolean oracle.cabo.ui.path.PathUtils._findPath(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.path.PathImpl, oracle.cabo.ui.UINode, oracle.cabo.ui.path.PathUtils$Finder)
boolean oracle.cabo.ui.path.PathUtils._findPath(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.path.PathImpl, oracle.cabo.ui.UINode, oracle.cabo.ui.path.PathUtils$Finder)
boolean oracle.cabo.ui.path.PathUtils._findPath(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.path.PathImpl, oracle.cabo.ui.UINode, oracle.cabo.ui.path.PathUtils$Finder)
boolean oracle.cabo.ui.path.PathUtils._findPath(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.path.PathImpl, oracle.cabo.ui.UINode, oracle.cabo.ui.path.PathUtils$Finder)
boolean oracle.cabo.ui.path.PathUtils._findPath(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.path.PathImpl, oracle.cabo.ui.UINode, oracle.cabo.ui.path.PathUtils$Finder)
boolean oracle.cabo.ui.path.PathUtils._findPath(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.path.PathImpl, oracle.cabo.ui.UINode, oracle.cabo.ui.path.PathUtils$Finder)
boolean oracle.cabo.ui.path.PathUtils._findPath(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.path.PathImpl, oracle.cabo.ui.UINode, oracle.cabo.ui.path.PathUtils$Finder)
oracle.cabo.ui.path.Path oracle.cabo.ui.path.PathUtils._findPath(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.UINode, oracle.cabo.ui.path.PathUtils$Finder)
oracle.cabo.ui.path.Path oracle.cabo.ui.path.PathUtils.findPathWithNodeID(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.UINode, java.lang.String)
oracle.cabo.ui.UINode com.websiteitalia.wsdk.uix.pageflow.PageFlowManager.getRootUINode()
oracle.cabo.ui.UINode oracle.cabo.servlet.ui.UINodePageDescriptionProxy.getRootUINode()
oracle.cabo.ui.UINode oracle.cabo.servlet.ui.UINodePageRenderer.getRootUINode(oracle.cabo.servlet.BajaContext, oracle.cabo.ui.RenderingContext, oracle.cabo.servlet.Page)
oracle.cabo.ui.UINode oracle.cabo.servlet.ui.HTMLUINodePageRenderer.getRootUINode(oracle.cabo.servlet.BajaContext, oracle.cabo.ui.RenderingContext, oracle.cabo.servlet.Page)
void oracle.cabo.servlet.ui.UINodePageRenderer.renderPage(oracle.cabo.servlet.BajaContext, oracle.cabo.servlet.Page)
void oracle.cabo.servlet.AbstractPageBroker.renderPage(oracle.cabo.servlet.BajaContext, oracle.cabo.servlet.Page)
oracle.cabo.servlet.Page oracle.cabo.servlet.PageBrokerHandler.handleRequest(oracle.cabo.servlet.BajaContext)
void oracle.cabo.servlet.BajaServlet.doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
void javax.servlet.http.HttpServlet.service(com.evermind.server.http.EvermindHttpServletRequest, com.evermind.server.http.EvermindHttpServletResponse)
void javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void com.evermind.server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
void com.evermind.server.http.ServletRequestDispatcher.forwardInternal(javax.servlet.ServletRequest, javax.servlet.http.HttpServletResponse)
boolean com.evermind.server.http.HttpRequestHandler.processRequest(com.evermind.server.ApplicationServerThread, com.evermind.server.http.EvermindHttpServletRequest, com.evermind.server.http.EvermindHttpServletResponse, java.io.InputStream, java.io.OutputStream, boolean)
void com.evermind.server.http.HttpRequestHandler.run(java.lang.Thread)
void com.evermind.util.ThreadPoolThread.run()
We found the element of the UIX page that causes the problem:
<bc4j:viewObjectScope name="ElementsView" >
<contents>
<bc4j:rowScope name="NewElement" >
<contents>
<bc4j:region automatic="false" >
<bc4j:key>
<bc4j:rowKey name="keyElement"/>
</bc4j:key>
<contents>
<bc4j:attrScope name="FlgState">
<contents>
<messageChoice name="FlgState" prompt="State" >
<boundAttribute name="selectedValue">
<concat>
<bc4j:attrProperty name="value"/>
<fixed text=""/>
</concat>
</boundAttribute>
<contents>
<!-- This is the nested vo scope causing the error -->
<bc4j:viewObjectScope name="DecodeStateView" >
<contents data:childData="list@DecodeState">
<option data:value="StateCode"
data:text="StateDescription"/>
</contents>
</bc4j:viewObjectScope>
</contents>
</messageChoice>
</contents>
</bc4j:attrScope>
</contents>
</bc4j:region>
</contents>
</bc4j:rowScope>
</contents>
</bc4j:viewObjectScope>
This usage of nested view object scopes has been explained in reply of a previous post, How to databind the children of a UIX XML choice, and before ours attempts to modify the tree it worked fine. Removing the nested view object scope the page makes the page render correctly, but we need it to retrieve the description of its state.
We get the same behaviour (and a much similar stack trace, with the same oracle.cabo.ui.data.DataObjectList oracle.cabo.ui.collection.DataObjectListNodeList.getDataObjectList (oracle.cabo.ui.RenderingContext) throwing a NullPointerException) if we use NodeUtils.createPreorderDescendentAttributeEnumeration method instead of PathUtils.It's a bug in the DataObjectListNodeList class that's up at the top of
the stack. It's been fixed for 9.0.3. The bit of XML that's triggering
it isn't the <viewObjectScope>s, but the "data:childData".
I believe you can workaround this bug by not passing a null RenderingContext to
findPathWithNodeID(). Now, you don't have a real RenderingContext, and we
don't especially need one - "null" is legit here, but I think if
you just pass "new oracle.cabo.ui.RootRenderingContext()" then you'll
get around this bug. -
We are implementing a functionality to insert new elements using BC4J components and UIX XML.
We have carefully followed istruction from the UIX developer's guide (Business Components for Java Integration) but we notice some problems
that we suppose are due to RowDefs with autocreate=true and the KEY attribute management flow.
The components implemented have:
1) A create method implemented for setting entity primary key using a DB sequence and other default values:
protected void create(AttributeList attributeList) {
super.create(attributeList);
SequenceImpl seq = new SequenceImpl("VA_TIPO_PUNTEGGIO_SEQ", getDBTransaction());
setAttribute("IdTipoPunteggio", seq.getSequenceNumber());
setDataAgg(new Date( new Timestamp(System.currentTimeMillis())));
2) A validation rule that checks for duplicate description using a ListCompare:
<ListValidationBean
OnAttribute="TitTipoPunteggio"
OperandType="SQL"
Inverse="true"
ListValue="select tit_tipo_punteggio from va_tipo_punteggio where id_tipo_punteggio <> %IdTipoPunteggio%" >
</ListValidationBean>
Our problems are:
1) The ID taken from a DB Sequence are increased by 2 (this doesn't occur using test on application module), and we suppose that it happens because row isn't
found using the correct KEY property.
2) When the validation's rule is triggered, row data aren't reloaded
UIX code for apply event is:
<event name="saveEvent" >
<bc4j:findRootAppModule name="TipoPunteggioViewAppModule" >
<bc4j:findViewObject name="TipoPunteggioView" >
<bc4j:findRow name="newRow">
<bc4j:setPageProperty name="key" >
<bc4j:stringKey />
</bc4j:setPageProperty>
<bc4j:setAttribute name="IdTipoPunteggio" />
<bc4j:setAttribute name="TitTipoPunteggio" />
<bc4j:setAttribute name="FlgObsoleto" />
<bc4j:insertRow/>
<bc4j:commit/>
<bc4j:executeQuery/>
<ctrl:go redirect="true" name="Anagrafiche_TipiPunteggio"/>
</bc4j:findRow>
</bc4j:findViewObject>
</bc4j:findRootAppModule>
</event>
However we have doubts on the code flow because we suppose the following istruction are missing before the findRow tag:
<bc4j:setPageProperty name="keyTipoPunteggio" >
<bc4j:parameter name="keyTipoPunteggio"/>
</bc4j:setPageProperty>
otherwise what is the reason of the keyStamp tag declared on the region?
Moreover we don't understand the purpose of these instructions:
<bc4j:setPageProperty name="keyTipoPunteggio" >
<bc4j:stringKey />
</bc4j:setPageProperty>
because when validation on the row occurs, data of the rejected row are not reloaded.
Perhaps would be useful an HowTo or a detailed explanation of interaction between registryDefs and event handler tags.
TIAOur problems are:
1) The ID taken from a DB Sequence are increased by 2 (this doesn't occur using test on application module), and we suppose that it happens because row isn't found using the correct KEY property.This is correct.
2) When the validation's rule is triggered, row data aren't reloaded
UIX code for apply event is: <snip>
Replace it with this:
<event name="saveEvent" >
<bc4j:findRootAppModule name="TipoPunteggioViewAppModule" >
<bc4j:findViewObject name="TipoPunteggioView" >
<bc4j:setPageProperty name="key" >
<bc4j:parameter name="key" />
</bc4j:setPageProperty>
<bc4j:findRow name="newRow">
<bc4j:setAttribute name="IdTipoPunteggio" />
<bc4j:setAttribute name="TitTipoPunteggio" />
<bc4j:setAttribute name="FlgObsoleto" />
<bc4j:insertRow/>
<bc4j:setPageProperty name="key" >
<bc4j:stringKey />
</bc4j:setPageProperty>
<bc4j:commit/>
<bc4j:executeQuery/>
<ctrl:go redirect="true" name="Anagrafiche_TipiPunteggio"/>
</bc4j:findRow>
</bc4j:findViewObject>
</bc4j:findRootAppModule>
</event>
The main issue is that the string representation of the key changes when the row is inserted into the view object. It is a "short" key before insert and a "long" key after insert. Also, "short" keys cannot be found by ViewObject APIs to locate rows when the key is still "short".
Here is the flow:
1. Create page is rendered, auto-creating a new row with "short" key.
2. In apply event handler, we must set the page property based on the submitted key
to find the same row. Unfortunately, the "short" key does not find the old row, so
we end up creating a new one for this request (incrementing the sequence).
3. We may get as far as inserting the new row, upgrading to a "long" key.
4. So we update the page property after a successful insert to the new "long" key.
5. We rerender the page and use the page property to find the row, most likely the "long" key.
[Note: if an exception occurred during set attribute, before insert row, the key will still
be "short"]
6. Once we get as far as attempting insertRow, the key will become "long" and locatable by
ViewObject APIs.
You don't encounter this problem in the tester because it can keep an in-memory handle to the row it
is trying to insert for the duration of the insert attempt.
The web-based UI relies on key-based references instead, which have the issue outlined above.
We will follow up on this to see if "short" keys can be located by ViewObject APIs in future, allowing
the same reference to be found across requests.
Regards,
John Fallows. -
UIX XML BC4J Calling custom and framework methods
We are developing an application using BC4J and UIX XML.
We would like to define field attributes, such as date formatting and labels, at business component-level, but those properties are bound to a locale setting. We do not want to duplicate this kind of settings for each end-user locale, whats the best way to obtain that? And UIX BC4J extension tags, like tables and region in automatic mode, will automatically use those settings?
In BC4J components we can define custom methods to perform further processing, using UIX XML can we access those and other framework-provided interfaces, and how?automatic mode is just for quick demos. You cannot internationalize your application while using automatic mode.
You will need to turn off automatic mode, and have bc4j:column beans in your table and databind the data to come from your resource bundles. -
UIX/XML BC4J - Controlling page flow in event handlers
We have an event handler that executes some data processing using bc4j tags, and need to redirect the flow to another page, based on the value of some parameters. For example, we have a checkbox Prepare for another insert, and we want to check for its state in the event handler to determine which page to display.
We tried the following code
UIX page event handler:
<event name="saveEvent" >
<bc4j:findRootAppModule name="TipoPunteggioViewAppModule" >
<bc4j:findViewObject name="TipoPunteggioView" >
<bc4j:findRow name="CreateTipoPunteggioView" >
<bc4j:setPageProperty name="keyTipoPunteggio" >
<bc4j:stringKey />
</bc4j:setPageProperty>
<bc4j:setAttribute name="FlgObsoleto" />
<bc4j:setAttribute name="Firma" />
<bc4j:setAttribute name="TitTipoPunteggio" />
<bc4j:insertRow/>
<bc4j:commit/>
<bc4j:executeQuery/>
<ctrl:method class="com.websiteitalia.valutazioni.handlers.Handlers"
method="anotherInsertEventHandler" />
</bc4j:findRow>
</bc4j:findViewObject>
</bc4j:findRootAppModule>
</event>
Java method event handler:
public static EventResult anotherInsertEventHandler(BajaContext bCtx,
Page page,
PageEvent event) {
// AnotherInsert is the name of the checkbox on the page
if ("on".equals(event.getParameter("AnotherInsert"))) {
return new EventResult(page);
} else {
return new EventResult(new Page("ListPage"));
When we return the same page, things work fine, but when we return another page we get an ArrayIndexOutOfBoundException. We have also noticed that if we return a simple page, without data scopes and bc4j tags, we get the correct result. We are probably wrong in the manner we do the redirect inside of a java event handler, because seems that the page we return is not completely processed.
Can anyone explain the available techniques to control the page flow, using UIX XML tags or Java APIs alone or both of these together? For example, how can be replicated the <ctrl:go> behavior using Java APIs?The UIX page works correctly if loaded directly, the error takes place only when we redirect in this manner from a page that has a different application module / view object scopes. In fact, when we redirect to a page that have the same scopes of the first (or when the second page has not scopes at all the simple page) the error doesnt occur. Thats why we suppose that some step of the page rendering process arent executed correctly, it seems that the new page still finds some of the old page (the scopes)..
To redirect to a page from a java event handler we have returned an event result with the next page (see above post for a code snippet), is this the correct way? Can we simulate the ctrl:go tag from the java code (with the redirect=true option)? There are any other? -
UIX XML & BC4J Editable Tables
How to process the changes on a bc4j table with editable columns (in UIX XML)?
We can read the values, but when we try to update the view object, it occurs an error saying that the read value is not serializable.I think the problem is that you are not getting at the viewObject correctly in your eventHandler.
First, in the uiXML file, the handler should be something like:
<ctrl:handlers>
<ctrl:event name="..." >
<bc4j:findRootAppModule name="EmpAppModuleLocal" >
<bc4j:findViewObject name="AllEmpsVO" >
<ctrl:method class="yourClass"
method="applyChanges"/>
<bc4j:commit/>
</bc4j:findViewObject>
</bc4j:findRootAppModule>
</ctrl:event>
</ctrl:handlers>Then you can write your applyChanges method like this:
public static EventResult applyChanges(BajaContext context,
Page page,PageEvent event)
ViewObject view = (ViewObject) context.getProperty(
JboConstants.BC4J_NAMESPACE,
JboConstants.VIEW_OBJECT_PROPERTY);
view.getCurrentRow().setAttribute("Ename","Smith");
return null;
}Please see:
http://otn.oracle.com/jdeveloper/help/topic?inOHW=true&file=jar%3Afile%3A/u01/webapps/OHW/ohw-app/jdeveloper/helpsets/jdeveloper/uix_devguide_ohj.jar!/bc4j.html&linkHelp=false#HandlingEvents
http://otn.oracle.com/jdeveloper/help/topic?inOHW=true&file=jar%3Afile%3A/u01/webapps/OHW/ohw-app/jdeveloper/helpsets/jdeveloper/uixref.jar!/bc4j/findViewObject.html&linkHelp=false -
UIX-XML BC4J Question regarding event handling
How can I use/access Application Module, defined in UIX-XML page (using <bc4j:registryDef>), in my event handler method ???
Sorry for the confusion. I figured out what you were asking.
The right way is this.
First, in your UIX XML page, declare your handler like this:
<event name="%myEvent%" >
<bc4j:findRootAppModule name="%ModuleName%" >
<method class="%eventclass%" method="%eventmethod%" />
</bc4j:findRootAppModule>
</event>
the strings in the % have to be replaced with your own particular names. %ModuleName% should be the same as the name of the module in the registry.
Then in the event handler %eventclass%.%eventmethod% you can use this to find the Application Module:
oracle.jbo.ApplicationModule mymodule
= oracle.cabo.data.servlet.bind.ServletBindingUtils.getApplicationModule(context);
"context" is passed in to your event handler as a BajaContext. ServletBindingUtils has several other methods for getting BC4J stuff, you should look at its definition.
Joe -
UIX/XML - BC4J - " a strategic decision"
I have read that you (Oracle JDev Team) suggest using, for new applications, UIX/XML and BC4J.
We are engaging our best resources trying to use these frameworks but, due to poor documentation/samples, we are in serious difficulties.
Every day some new problems rise.
What do you suggest?
- To wait for release 9.0.3 hoping to see a better product and well documented?
- To participate to training courses hoping to find them in our country (Rome - Italy)?
- To continue to solve a problem every day with your help hoping that they are a reasonable number?
Excuse my poor English.
TIAI have read that you (Oracle JDev Team) suggest using, for new applications, UIX/XML and BC4J.
We are engaging our best resources trying to use these frameworks but, due to poor
documentation/samples, we are in serious difficulties.
Every day some new problems rise.
What do you suggest?
- To wait for release 9.0.3 hoping to see a better product and well documented?That's a tough one to answer: it depends on where you are in the development
cycle, your schedule etc. 9.0.3 will definitely be an improvement - and these
aren't technologies that will be going away, so there'll be ongoing improvements
in the future.
- To participate to training courses hoping to find them in our country (Rome - Italy)?I wouldn't personally know if those are available. Sorry. :(
- To continue to solve a problem every day with your help hoping that they are a
reasonable number?We'll continue to help! If you're running into problems because of inadequacies
on our documentation, that's our fault, not yours. The questions here on OTN
have been essential in figuring out the most significant holes in BC4J UIX XML,
and I'm sure they'll continue to be.
Excuse my poor English.Your English is pretty darn good. No apologies needed! -
I've tried to create an "appModuleScope" UIX template, to embed a bc4j:table and the wrapping viewObjectScope and appModuleScope.
But when i'm trying to build the .uit page the compiler says:
"Warning(19,44): listTemplate.uit: Parsing error, line 19, column 44: <appModuleScope> is not an understood child element.
Check the syntax of its parent element!"
Is it possible to use bc4j uix tags in UIX templates? If yes, what is the correct way to accomplish the task?
The "bc4j:registryDef" section must be in the UIX template or in the UIX page?
This is the source of listTemplate.uit:
<?xml version="1.0" encoding="windows-1252"?>
<templateDefinition xmlns="http://xmlns.oracle.com/uix/ui"
xmlns:ui="http://xmlns.oracle.com/uix/ui"
xmlns:data="http://xmlns.oracle.com/uix/ui"
xmlns:bc4j="http://xmlns.oracle.com/uix/bc4j"
xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
xmlns:html="http://www.w3.org/TR/REC-html40"
targetNamespace="http://www.example.com/uix/templates"
localName="listTemplate">
<type base="bc4j:appModuleScope">
</type>
<content>
<bc4j:appModuleScope name="QPMAppModule">
<contents>
<!-- this is a simple html
tag to print something on
the scope of appModule -->
<html:hr></html:hr>
</contents>
</bc4j:appModuleScope>
</content>
</templateDefinition>
And this is the source of a uix page using the template:
<?xml version="1.0" encoding="windows-1252"?>
<page xmlns="http://xmlns.oracle.com/uix/controller"
xmlns:ui="http://xmlns.oracle.com/uix/ui"
xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:bc4j="http://xmlns.oracle.com/uix/bc4j"
xmlns:myTemplate="http://www.example.com/uix/templates">
<templates xmlns="http://xmlns.oracle.com/uix/ui">
<templateImport source="listTemplate.uit"/>
</templates>
<bc4j:registryDef>
<bc4j:rootAppModuleDef name="QPMAppModule"
defFullName="com.example.QPMAppModule"
configName="QPMAppModuleLocal"
releaseMode="stateful">
<bc4j:viewObjectDef name="CommittenteView" rangeSize="10"/>
</bc4j:rootAppModuleDef>
</bc4j:registryDef>
<content>
<pageLayout xmlns="http://xmlns.oracle.com/uix/ui"
xmlns:data="http://xmlns.oracle.com/uix/ui"
title="BC4J Template Test">
<contents>
<myTemplate:listTemplate>
</myTemplate:listTemplate>
</contents>
</pageLayout>
</content>
</page>I think the BC4J UIExtensions are correctly registered.
This is the servlet element of my web.xml file (that has never been touched):
<servlet>
<servlet-name>uix</servlet-name>
<servlet-class>oracle.cabo.servlet.BajaServlet</servlet-class>
<init-param>
<param-name>oracle.cabo.servlet.loggedInKey</param-name>
<param-value>LoginHandler.isLoggedIn</param-value>
</init-param>
<init-param>
<param-name>oracle.cabo.servlet.loginPage</param-name>
<param-value>Login</param-value>
</init-param>
<init-param>
<param-name>oracle.cabo.servlet.pageBroker</param-name>
<param-value>oracle.cabo.servlet.xml.UIXPageBroker</param-value>
</init-param>
<init-param>
<param-name>oracle.cabo.ui.UIExtensions</param-name>
<param-value>oracle.cabo.data.jbo.ui.JboUIExtension</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet> -
UIX/XML BC4J - Dynamic breadcrumbs
We have a page that contain a dynamic breadcrumbs (stored in session) that is populated at runtime with the PageDescription class. We need to add the next element to session from a value of a BC4J views. How we can interact with the RegistryDefs from the PageDescription to do this?
Anyone can explain the sequence of the rendering phase, especially when is executed the RegistryDefs and the DataBinding to interact with it from the PageDescription?We have implemented a class that extends the page description and must add the link to the breadcrumbs using a description of the current element displayed (for example if the page display information about an employee, its name and surname must appear on the breadcrumbs).
To do this, we have used the procedure described in chapter 16 (dynamic structure for uix pages), subclassing the method getRootUINode: the problem encountered is that we need to use a view object to obtain the description of the link to be added to breadcrumbs, for example with this registry def:
<bc4j:registryDef>
<bc4j:rootAppModuleDef name="TipoPunteggioViewAppModule"
defFullName="com.websiteitalia.valutazioni.modules.TipoPunteggioAppModule"
configName="TipoPunteggioAppModuleLocal"
releaseMode="stateful" >
<bc4j:viewObjectDef name="TipoPunteggioView" >
<bc4j:rowDef name="UpdateTipoPunteggioView" autoCreate="false" >
<bc4j:propertyKey name="keyTipoPunteggio" />
</bc4j:rowDef>
</bc4j:viewObjectDef>
<bc4j:viewObjectDef name="DecodeStatoView"/>
</bc4j:rootAppModuleDef>
</bc4j:registryDef>
The servlet binding utils seems to be useful in event handler java code but not in PageDescription, because dosn't require the view name, but uses the view object currently scoped!
How we can do?
About the rendering process, it is useful an explanation of the sequence of method that are called from the invocation of the page to its visualization to the browser (sequence diagram?) with a summary of the data structure in memory and/or the classes that interact with it.
For example I cant resolve this problem because I dont know when registry def is loaded, when can I interact with it in the processing phase and which classes are involved. -
We have to put some hidden data for each table row, for example an id number, necessary for further processing. We have tried to use the following syntax inside a column:
<bc4j:formValue name="Empno" attrName="Empno" />
but this does not render any hidden field. With the following syntax, the hidden field is correctly rendered:
<formValue name="Empno" >
<boundAttribute name="value">
<bc4j:attrProperty name="value" />
</boundAttribute>
</formValue>
but it is very tedious... Is there another syntax available?
How can I add an invisible column that contains these hidden fields?
PS: Does it exist a way to tell the renderer to format the html output for debug purposes?There isn't actually a <bc4j:formValue> element. If you try checking the
syntax of your UIX page, that should appear as an error. I'll see
what I can do about getting one added, but: you could wrap up your
tedious syntax in a little template, and save yourself a lot of typing.
For nicely formatted output: in house, we have a handy debug version
of the library that shows formatted output. There's no easy way to
turn on this functionality in the library included with JDev. We hope
to make this functionality easily accessible in 9.0.3. -
UIX/XML BC4J Retaining form values
Whats the best way to retain form values in a UIX page when the user fires some action that makes it refresh? This is especially important in a master-detail page, where the user can for example modify some of the master data and navigate detail list before committing his changes (and therefore leaving that page).
If you set the attribute values in the event handler before leaving the page, using releaseMode="stateful" or releaseMode="reserved", then these values should be available before when you return.
Regards,
John Fallows
Oracle Corporation. -
UIX XML-BC4J: Problem with UIX XML decimal validation
We have a messageTextInput field with the decimal validater:
<bc4j:messageTextInput id="ValPunteggio" attrName="ValPunteggio" name="ValPunteggio" prompt="Valore" >
<onSubmitValidater>
<decimal/>
</onSubmitValidater>
</bc4j:messageTextInput>
But while client-side validation permit to enter a number with the character ',' as decimal separator, the server returns a JBO-25009 Error "attempting to create a oracle.jbo.domain.Number with value 10,4".It's a known NLS bug that'll be fixed in 9.0.3.
There's no good workaround; you're forced to use the "period"
as the decimal separator so that the server-side code doesn't
choke.
Maybe you are looking for
-
Windows 7 no longer boots after upgrade from Lion to Mountain Lion
I got a late 2011 MacBook Pro, on which I installed Windows 7 with Boot Camp. After I upgraded from Lion to Mountain Lion, I can no longer boot Windows. If I keep the option button pressed during boot I only get the OS X and recovery options, and if
-
i updated to iOS 5.1 but my camera buttone form the lock screen is not working what should i do. i tryed restoring but it didnt work . When i try the camera loncher but it's not working
-
How can i test my vpn connection?
so recently i decided to test if ver 1.3.0.3 of the quickvpn client would work better with the 1.3.0.5 rvs4000 firmware. i loaded quickvpn to an xp pro computer (freshly built, i might add) and got to work. in order to test the connection, i attempte
-
How can I add a library of flash movies to my site?
I posted this same question on the Dreamweaver forum and a suggestion was made that I try over here for help, so please excuse the duplicate question. How can I add a library of flash movies to my site? Hey there everyone and thanks for reading my qu
-
Sorry about the long title, but that's the info I need