Button Binding in JDEV 9.0.5.2
I'm trying to create a Boolean button binding to a Y/N attribute in a view Object. I want a simple JCheckbox. I created the following in my UiModel with the binding wizard..
<DCControl
id="AcctTypePreAuth"
DefClass="oracle.jbo.uicli.jui.JUButtonDef"
SubType="DCButton"
IterBinding="AcctTypeViewIter"
ApplyValidation="false"
ListOperMode="0"
StaticList="true"
BoolVal="true" >
<AttrNames>
<Item Value="AcctTypePreAuth" />
</AttrNames>
<ValueList>
<Item Value="Y" />
<Item Value="N" />
</ValueList>
</DCControl>
I haven't done anything with it yet (ie there's no code in my UI that refers to it, its only in my UiModel.xml), but when I got to rerun my app I get this:
oracle.jbo.InvalidObjNameException: JBO-25005: Object name for type Application Definition is invalid
at oracle.jbo.uicli.jui.JUPanelBinding.initializeApplicationModule(JUPanelBinding.java:230)
at oracle.adf.model.binding.DCBindingContainer.getDataControl(DCBindingContainer.java:210)
at oracle.adf.model.binding.DCIteratorBinding.initDataControl(DCIteratorBinding.java:1591)
at oracle.adf.model.binding.DCIteratorBinding.getDataControl(DCIteratorBinding.java:1573)
at oracle.jbo.uicli.jui.JUPanelBinding.initializeApplicationModule(JUPanelBinding.java:209)
at oracle.adf.model.binding.DCBindingContainer.getDataControl(DCBindingContainer.java:210)
at oracle.adf.model.binding.DCIteratorBinding.initDataControl(DCIteratorBinding.java:1591)
at oracle.adf.model.binding.DCIteratorBinding.getDataControl(DCIteratorBinding.java:1573)
at oracle.jbo.uicli.jui.JUPanelBinding.initializeApplicationModule(JUPanelBinding.java:209)
at oracle.adf.model.binding.DCBindingContainer.getDataControl(DCBindingContainer.java:210)
at oracle.adf.model.binding.DCIteratorBinding.initDataControl(DCIteratorBinding.java:1591)
at oracle.adf.model.binding.DCIteratorBinding.getDataControl(DCIteratorBinding.java:1573)
at oracle.adf.model.binding.DCIteratorBinding.getApplicationModule(DCIteratorBinding.java:2309)
at oracle.adf.model.binding.DCIteratorBinding.getViewObject(DCIteratorBinding.java:1009)
at oracle.adf.model.binding.DCIteratorBinding.getAttributeDefs(DCIteratorBinding.java:1996)
at oracle.jbo.uicli.binding.JUCtrlValueBinding.getAttributeDefs(JUCtrlValueBinding.java:222)
at oracle.jbo.uicli.binding.JUCtrlListBinding.convertValueList(JUCtrlListBinding.java:466)
at oracle.jbo.uicli.jui.JUButtonDef.createControlBindingInstance(JUButtonDef.java:95)
at oracle.adf.model.binding.DCControlBindingDef.createControlBinding(DCControlBindingDef.java:178)
at oracle.adf.model.binding.DCControlBindingDef.createControlBinding(DCControlBindingDef.java:185)
at oracle.adf.model.binding.DCBindingContainerDef.createControls(DCBindingContainerDef.java:234)
at oracle.adf.model.binding.DCBindingContainerDef.createBindingContainer(DCBindingContainerDef.java:274)
at oracle.adf.model.binding.DCBindingContainerReference.getBindingContainer(DCBindingContainerReference.java:32)
at oracle.adf.model.BindingContext.findBindingContainer(BindingContext.java:244)
If I remove the DCControl tag, everything works fine. I've Double checked all the value in the DCControl tag that refer to attribute names/iter names and they all seem correct. I have other Bindings that I am using bound to the iter and other attributes....
any hints....
Please report this as a bug with Oracle support with your testcase so that we can trace where things are going wrong. Similar button binding usages have worked in our tests.
Similar Messages
-
How change row hight in a button binding LOV?
Can I change row hight in a button binding LOV?
And also the font, the size of LOV window, the location of LOV window.You may see the source for JClient as to howit installs an LovPanelInterface implementation with the button. You may create another custom implementation of this panel and then host it in it's own dialog (quite like oracle.jbo.uicli.controls.JULovDialog)
The relevant sources are in :
oracle.jbo.uicli.jui.JULovButtonBinding (look for MyLovPanel)
and
oracle.jbo.uicli.controls.JULovDialog
and the sources are in BC4J\src\bc4juisrc.zip -
Based on the examples
here
and
here
I have a datagrid which uses an XML object as its dataprovider. The
xml goes like this:
<questions>
<question>
<prompt>What are your heroes?</prompt>
<answers>
<answer>
<correct>true</correct>
<text>Luther Higgs</text>
</answer>
<answer>
<correct>false</correct>
<text>Barney Fife</text>
</answer>
</answers>
</question>
</questions>
Well formed (if a bit confusing) xml. In my datagrid I have
two columns. The second column binds to
questions.question.answers.answer.text and works just fine. The
datagrid's editable property is set to true, and I'm able to click
on the second colum and type and it saves the answer back into the
xml object just fine. The problem lies in my first column. The mxml
looks like this:
<mx:DataGridColumn headerText="Correct">
<mx:itemRenderer>
<mx:Component>
<mx:VBox horizontalAlign="center">
<mx:RadioButton id="myRadioButton"
buttonMode="true" useHandCursor="true"
group="{outerDocument.myRadioButtonGroup}"
selected="{data.correct}"/>
</mx:VBox>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
The problem is that the radio buttons' selected properties
aren't bound to the xml, that is the one that is true doesn't
display as selected. If I set the datagridcolumn's editable
property to false, clicking on the radio button doesn't affect the
xml at all either. If I leave the editable property of the
datagridcolumn as the inherited default of true (based on the
parent datagrid's editable property) when I click on the radio
button the default itemEditor appears (a text input box) which
contains the following text:
</answer>
and when I leave the editor (click outside or hit enter) the
xml then looks like this:
<answers>
<answer>
<correct>true</correct>
<text>Luther Higgs</text>
</answer>
<answer>
<correct>false</correct>
<text>Barney Fife</text>
<null><answer>
<correct>false</correct>
<text>Barney Fife</text>
</answer></null>
</answer>
</answers>
I have seen controls that don't have the xml path written
correctly display the entire xml node rather than just the
contained data, but I can think of no reason anything should Ever
reference just the closing tag. To me this looks like a bug in the
data bindings between the radio button and the xml object.
Just to clear the air to avoid suggestions that will work but
not meet the design requirements, what I need is a datagrid that
has a radio button group (only one correct answer out of the group)
in the first column and strings in the second column which need to
be editable. I suppose I could write some hairy event listener code
and manually hack things together, but aside from avoiding that
headache, I'd love to use data bindings for what they were intended
for - I just need to know why it doesn't appear to be working
right. Much thanks in advance for any and all help.Searching the LiveDocs revealed the answer. Under the topic
"Using an E4X expression in an <mx:Binding> tag" I found that
if instead of
<mx:RadioButton id="myRadioButton"
buttonMode="true" useHandCursor="true"
group="{outerDocument.myRadioButtonGroup}"
selected="{data.correct}"/>
I have
<mx:RadioButton id="myRadioButton"
buttonMode="true" useHandCursor="true"
group="{outerDocument.myRadioButtonGroup}"/>
<mx:Binding source="myRadioButton.selected"
destination="data.correct" />
It works just perfectly.
Apparently binding between XML and the selected property of a
radio button (which is of type boolean) needs the <mx:Binding
/> rather than the in-tag curly brace notation.
P.S. The link on livedocs is here:
http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Live Docs_Book_Parts&file=databinding_091_05.html#177459 -
Hi,
I would like to initialize a bind variable with current date -7 days
I saw the post regarding this request but it was for jdev11 and the solution doesn't work in jdev10.
Have you any idea to do that in jdev10
Thanks.A bind variable used in SQL statement
It's the same problem discussed in this post : current date as default date
The only difference is that i'm using Jdev 10 !
Dan. -
Master table detail table with SQL based read only VO with bind variables
i have a page where i am displaying data as master table and detail table. both table VOs are based on SQL queries which use bind variables.
i have a view link between vos of type 1:M
i created master table detail table page by dropping detail iterator from data control panel under master and selecting master table detail table
on my page i see detail table records getting populated only for first record of parent table.
on changing parent record, child table shows same records and does not refresh
i am using partial triggers on both tables to be populated on a button click as i need to pass some bind variables to VOs which are taken as input from users
how can i show corresponding rows in detail table when parent record in table changes
is it possible declaratively to have master detail table view when both VOs have bind variables
jdev 11 1 1 5
these are the SQLs used
Parent SQL Based VO Query
SELECT to_char(d.status_date,'yyyymmddhh24') TIME123, count(DISTINCT d.c4)
FROM t1 d,
t2 w
WHERE w.c1 = nvl(:ou, w.c1)
AND UPPER(w.c2) = UPPER(nvl(:tt, w.c2))
AND d.c3 >= :startTime AND :startTime IS NOT NULL
AND d.c3 <= :endTime AND :endTime IS NOT NULL
AND d.c4 = w.c4
AND UPPER(d.status) = 'CLOSED'
GROUP BY to_char(status_date,'yyyymmddhh24') ORDER BY to_char(status_date,'yyyymmddhh24') DESC
Child SQL Based VO Query
SELECT w.c1,
w.c5 - w.c6 processing_time,
w.c3,
w.c6,
w.c7,
w.c8,
to_char(d.status_date,'yyyymmddhh24') TIME123 FROM t1 d,
t2 w
WHERE w.c2 = nvl(:ou, w.c2)
AND UPPER(w.c3) = UPPER(nvl(:tt, w.c3))
AND d.c4 >= :startTime AND :startTime IS NOT NULL
AND d.c4 <= :endTime AND :endTime IS NOT NULL
AND d.c1 = w.c1
AND UPPER(d.status) = 'CLOSED' ORDER BY to_char(status_date,'yyyymmddhh24') DESC
view link is based on column TIME123Instead of doing the master-detail layout by dragging the details over, can you try a new page where you first drag the master VO over and then drag the detail VO over, and then set partialTrigger from the detail to point to the master?
-
Enable/disable problem with button on table toolbar
Hello *,
In my WD (ABAP) application, on a view I have a table, a toolbar within it and buttons on the toolbar. I am trying to control 'enable' property of one button, binding it to an attribute in view's context.
When I do this trick just for any button on the view which is not on the toolbar, it works just fine. But when the button is placed on table's toolbar - it just stays disabled all the time.
Normally I bind enable property to an attribute in the <b>root</b> node. When I change attribute value, the 'normal' button responds correctly (getting enabled or disabled), but the <u>table toolbar button</u> <b>does not</b>. I start wondering if table controls (like toolbar and its buttons) has something to do with a node the table is bound to?
Any comments about special features of toolbar and its buttons being placed in a table?
Thanks!Looks like a bug to me. There is nothing special with toolbar buttons vs. "normal" buttons (at least not in Web Dynpro Java).
Armin -
Need to render the edit button when table is not Empty
Hi,
I want to render the edit button , only when we have some records in the table to select.so is there a way to check the view is empty or has some records in the backing bean of my page.Please suggest me,if u have some deas which would work..
thanks in advanceHey guys,I just did that and it is so simple.I just wanted to share it with u guys.It is all the power of EL language.
For the rendered property of the Edit button ,Bind it to the iterator like (bindings.SatAppliViewObj1Iterator.currentRow!=null).thats it, now the button will only be rendered if the table has some records.Have a lot of facilities ,but no proper giude to enunciate them...So guys please keep sharing ur experiences with us ..
Message was edited by:
user526927 -
Hi All,
Not quite follow what dev guide says about radio button and group implementation.
I tried but always got strange behavior.
I have a subtab with two radio buttons (rbt1 and rbt2)
rbt1 property defined as:
Initial Value: Y
Checked Value: Y
Unchecked Value: N
rbt2 property defined as:
Initial Value: Y
Checked Value: N
Unchecked Value: Y
Also, In my subtab PR, I init these two bts as a group:
OAMessageRadioButtonBean colButton1 =
(OAMessageRadioButtonBean)webBean.findChildRecursive("rbt1");
colButton1.setName("colGroup");
colButton1.setSelectedValue("Y");
OAMessageRadioButtonBean colButton2 =
(OAMessageRadioButtonBean)webBean.findChildRecursive("rbt2");
colButton2.setName("colGroup");
colButton2.setSelectedValue("N");
When the subtab render first time, rbt1 is checked and rbt2 is unchecked as expected. but when I go to other subtab then come back, the rbt1 is unchecked and rbt2 is checked (switch automatically).
The subtab PR is the only place I set this radio button value and group as showing above. Somewhere wrong with my logic or setting?
Regards,
KJHi All,
Got issue resolved. When I was replying Ranjit previous post, I mentioned both of buttons bind to same VO attribute. Since the first rbt1 has defined checked and unchecked values (Y & N) and both of buttons are defined in same group, so I took off second rbt2 attribute binding then it works (won't switch automatically anymore).
I still defined init values for both of buttons and also removed setSelectedValue() method calls from PR.
Thanks again for the great helping.
KJ -
I created new table in database and want to bind with system form
Hi All,
1) i created new table in database and want to bind with system form .
2) How i bind this field to system form sale order where i added new folder tab in that i added some fields that fields i want to bind with database. when i click on the next ,previous ,first and last button
bind value should change.
Awaiting soon reply
Rajkumar G.hi,
try this
Public Sub BindDataToForm()
Dim oItem As SAPbouiCOM.Item
Dim oEdit As SAPbouiCOM.EditText
Dim oComboBox As SAPbouiCOM.ComboBox
'// getting the matrix column by the UID
'oItem = oForm.Items.Item("docname")
'oComboBox = oItem.Specific
'oComboBox.DataBind.SetBound(True, "OSRI", "BaseType")
'oItem = oForm.Items.Item("docno")
'oEdit = oItem.Specific
'oEdit.DataBind.SetBound(True, "OSRI", "BaseEntry")
oColumn = oColumns.Item("Code")
'oColumn.DataBind.SetBound(True, "", "DSCardCode")
oColumn.DataBind.SetBound(True, "OSRI", "ItemCode")
oColumn = oColumns.Item("Serial")
oColumn.DataBind.SetBound(True, "OSRI", "IntrSerial")
Try
oColumn = oColumns.Item("Inspection")
oColumn.DataBind.SetBound(True, "OSRI", "U_Inspection")
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
oColumn = oColumns.Item("Quality")
oColumn.DataBind.SetBound(True, "OSRI", "U_Quality")
oColumn = oColumns.Item("Status")
oColumn.DataBind.SetBound(True, "OSRI", "U_Status")
oColumn = oColumns.Item("Finish")
oColumn.DataBind.SetBound(True, "OSRI", "U_Finish")
oColumn = oColumns.Item("Thickness")
oColumn.DataBind.SetBound(True, "OSRI", "U_Thickness")
oColumn = oColumns.Item("uom")
oColumn.DataBind.SetBound(True, "OSRI", "U_NetUOM")
oColumn = oColumns.Item("length")
oColumn.DataBind.SetBound(True, "OSRI", "U_Length")
oColumn = oColumns.Item("height")
oColumn.DataBind.SetBound(True, "OSRI", "U_Height")
oColumn = oColumns.Item("sqf")
oColumn.DataBind.SetBound(True, "OSRI", "U_sqf")
oColumn = oColumns.Item("sqm")
oColumn.DataBind.SetBound(True, "OSRI", "U_sqm")
End Sub -
Programatic Contextual Event on Disclosure Listener - jdev 11.1.2.3
Hello:
I want to programatically fire a contextual event from a DisclosureListener(when a showDetailItem is disclosed in tabbed panel). When I detect the tab is opened I want to publish the Contextual Event.
See code below
It compiles ok, but the error I get is:
oracle.jbo.uicli.binding.JUEventBinding cannot be cast to oracle.binding.ControlBinding
What am I missing here???
Thanks for the help...
===============================================================
package com.xxx.dbmstr.sbe.view.beans;
import com.xxx.ptnr.cc.uc1.common.JSFUtils;
import javax.faces.event.ActionEvent;
import javax.faces.event.ActionListener;
import oracle.adf.model.BindingContext;
import oracle.adf.model.binding.DCBindingContainer;
import oracle.binding.BindingContainer;
import oracle.jbo.domain.Number;
import oracle.jbo.uicli.binding.JUCtrlActionBinding;
import oracle.jbo.uicli.binding.JUEventBinding;
import org.apache.myfaces.trinidad.event.DisclosureEvent;
public class DBMstrTabs {
private String isOpen = "QA";
public DBMstrTabs() {
super();
public void doCE(){
SBEPayload p = (SBEPayload) JSFUtils.getManagedBeanValue("SBEPayloadBean");
if (p == null){
p = new SBEPayload();
Number empKey = (Number)JSFUtils.resolveExpression("#{bindings.empKey_t.inputValue}");
p.setEmpKey(empKey);
JSFUtils.setManagedBeanValue("SBEPayloadBean", p);
DCBindingContainer bc = (DCBindingContainer) BindingContext.getCurrent().getCurrentBindingsEntry();
JUCtrlActionBinding actionBnd = (JUCtrlActionBinding) bc.getControlBinding("eventBinding");
((DCBindingContainer)bc).getEventDispatcher().queueEvent(actionBnd.getEventProducer(),p);
((DCBindingContainer)bc).getEventDispatcher().processContextualEvents();
public void checkQA(DisclosureEvent disclosureEvent) {
if (disclosureEvent.isExpanded()){
setIsOpen("QA");
doCE();
public void checkSTANDARDS(DisclosureEvent disclosureEvent) {
if (disclosureEvent.isExpanded()){
setIsOpen("STANDARDS");
doCE();
}Here is a small work around that might help until an ideal solution is discovered. Since the CE ActionEvent can be easily created declaratively, you can fake an producer event by programatically queuing an ActionEvent on a button binding from the disclosurelistener.
fragment code:
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<af:panelAccordion id="pa1">
<af:showDetailItem text="showDetailItem 1" id="sdi1" disclosureListener="#{TesterBean.tabdisclosed}"/>
<af:showDetailItem text="showDetailItem 2" id="sdi2"/>
</af:panelAccordion>
<af:commandButton text="commandButton 1" id="cb1" binding="#{TesterBean.buttonbinding}"
actionListener="#{bindings.eventBinding.listener.processAction}" visible="false"/>
</ui:composition>Backing Bean code:
public class TesterBean {
private RichCommandButton buttonbinding;
private String helloStr;
public void tabdisclosed(DisclosureEvent disclosureEvent) {
ActionEvent actionEvent = new ActionEvent(buttonbinding);
actionEvent.queue();
public String getHelloStr() {
return helloStr; //invoked when the CE is fired
...pageDef code:
<eventBinding id="eventBinding" Listener="javax.faces.event.ActionListener">
<events xmlns="http://xmlns.oracle.com/adfm/contextualEvent">
<event name="buttonCE" customPayLoad="#{TesterBean.helloStr}" eventType="Action Event"/>
</events>
</eventBinding>
</bindings>
<events xmlns="http://xmlns.oracle.com/adfm/contextualEvent">
<event name="buttonCE" customPayLoad="#{TesterBean.helloStr}" eventType="Action Event"/>
</events>
...good luck -
My problem exist in the fact that the component have not been rendered when the binding setter is invoked.
Om trying this whith .getParent and .getValue and the first time i call the page they all return null and the > 1 time it returns the correct values, is there any way to force the encode, or is it not the encode thats the trouble?
JSF Code
<x:dataList id="buttonsData" styleClass="ListTableBorder"
var="button"
binding="#{printBean.renderActionButtons}"
value="#{listBean.actionbuttonslist}">
</x:dataList>
Java Code
public void setRenderActionButtons(HtmlDataList in){
htmlDataList = in;
logger.debug("htmlDataList "+htmlDataList);
if(htmlDataList!=null){
Object obj1 = htmlDataList.getValue();
Object obj2 = htmlDataList.getParent();
Object obj3 = htmlDataList.getVar();
logger.debug("obj1 " +obj1 );
logger.debug("obj2 " +obj2 );
logger.debug("obj3 " +obj3 );
}Just to be clear:
The oracle.adf.model.binding.DCBindingContainer (a.k.a. Binding Container) represents the pageDef file for the page/fragment. In a JSF page you can refer to it via the EL expression #{bindings}. As Puthanampatti mentions the Binding Container contains references to the other bindings in your page including Value and Action bindings.
The oracle.adf.model.BindingContext (a.k.a. Binding Context) is a parent class to all the DCBindingContainer instances in your application. In a JSF page you can refer to it via the EL expression #{data}.
Note it is considered bad form to attempt to access the DCBindingContainer of another page/fragment from your current page/fragment. This is because the framework doesn't guarantee the Binding Container for the other page/fragment will be initialized.
Regards,
CM. -
Merging of actions for Submit and action button
Hello,
How to merge actions for submit and Commit operations, in a single button?.
For clarity, I have made a form with ADF table, where user can edit table fields. containing Submit and Commit buttons. Once editing is completed, if submit is pressed, changes will be posted and commit button becomes enabled.
Now i want to be both actions should happen in one button. How to do this?.
Thanks in advance
seshuYou can drag an operation onto an existing button (bind to existing button).
The commit operation will automatically submit the form as well.
To make the commit button enabled clear the "disabled" property of the button. -
Radio Button of two columns to be grouped
Dear Experts,
I have a table with columns like SUBSCRIBE and UNSUBSCRIBE which are wdy_boolean data type and displaying as radio buttons.
The problem is both columns are displaying as selected and want to make these two columns as group so only one can be selected.
I mapped cell variant with other column but its not hit.
Please suggest.
Thanks & Regrads
Siva Mandapudi.Hello Siva,
To achieve this functionality do the following
1. Create one context attribute by name 'selectedValue' ( type string) under the context node of the table
2. create two columns in the table with name SUBSCRIBE and UNSUBSCRIBE (as you did already). let the cell editor be RadioButton. Cell variants are not required
3. Now for the SUBSCRIBE radio button, bind the 'selectedKey' property to 'selectedValue' context attribute. And maintain the 'KeyToSelect' property as 'SUBSCRIBE'
4. for the UNSUBSCRIBE radio button, bind the 'selectedKey' property to 'selectedValue' context attribute. And maintain the 'KeyToSelect' property as 'UNSUBSCRIBE'
so whenever the user selects a radiobutton, corresondinf values SUBSCRIBE or UNSUBSCRIBE will be stored in the selectedValue context attribute.
Hope this helps. you can refer the following article for more details
[http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/d0aba847-ff58-2c10-4a98-c0fad334c5aa]
BR, Saravanan -
How to have a button to reset a field and not the whole form?
Hi,
Can anyone help me with this dilemma please? All tutorials online demonstrates how to have a button to reset the whole form, but i only want the user to clear 1 field in the form.
I have a form which has a field representing a persons name who has booked out a piece of equipment. I would like the administrator to be able to clear the field quickly without having to select the whole name and then delete it, ready to insert the name of another booker.
Any help would be very much appreciated. (If it is using dreamweaver features than that is better.)
Thank you!There's nothing in DW that will do this for you.
This script from the internet seems to do the trick. Add this to the <head> section of your page...
<script type='text/javascript' src='http://code.jquery.com/jquery-1.7.1.js'></script>
<script type='text/javascript'>//<![CDATA[
$(window).load(function(){
function resetForm() {
$(this.previousSibling).val(function() {
return this.defaultValue;
$( "input[type='button']" ).bind( "click", resetForm );
});//]]>
</script>
Then add your form in the <body>...
<form>
<label for="textfield1">Text Field:</label>
<input type="text" name="textfield1" id="textfield1"><input type="button" value="reset" /><br />
<label for="textfield2">Text Field:</label>
<input type="text" name="textfield2" id="textfield2"><input type="button" value="reset" /><br />
<label for="textfield3">Text Field:</label>
<input type="text" name="textfield3" id="textfield3"><input type="button" value="reset" /><br />
<label for="textfield4">Text Field:</label>
<input type="text" name="textfield4" id="textfield4"><input type="button" value="reset" /><br />
</form>
EDIT: Ha! Same script as you found Nancy, posted originally at the exact same time too (I threw a couple modifications in)...
Good times, good times. -
Have to click the button twice to invoke its action!!!!
I am using netbeans 5.5 visual web pack and tomcat server for my JSF project.
In one of my pages i have to click the submit button twice to invoke its action.
I searched forum for the answer but could not find any that could solve my problem.
Whenever i first click the button from the lifecycle listener class i used i found the application goes through following phases:
BeforePhase: RESTORE_VIEW 1
AfterPhase: RESTORE_VIEW 1
BeforePhase: APPLY_REQUEST_VALUES 2
com.sun.rave.web.ui.renderer.UploadRenderer::decode()
com.sun.rave.web.ui.renderer.UploadRenderer:: Looking for id form1:citizenshipFileUPloadField_com.sun.rave.web.ui.upload
com.sun.rave.web.ui.renderer.UploadRenderer:: Found id form1:citizenshipFileUPloadField_com.sun.rave.web.ui.upload
AfterPhase: APPLY_REQUEST_VALUES 2
BeforePhase: RENDER_RESPONSE 6
AfterPhase: RENDER_RESPONSE 6There is no INVOKE_APPLICATION phase in first click. In second click, the status i got is:
BeforePhase: RESTORE_VIEW 1
AfterPhase: RESTORE_VIEW 1
BeforePhase: APPLY_REQUEST_VALUES 2
com.sun.rave.web.ui.renderer.UploadRenderer::decode()
com.sun.rave.web.ui.renderer.UploadRenderer:: Looking for id form1:citizenshipFileUPloadField_com.sun.rave.web.ui.upload
com.sun.rave.web.ui.renderer.UploadRenderer:: Found id form1:citizenshipFileUPloadField_com.sun.rave.web.ui.upload
AfterPhase: APPLY_REQUEST_VALUES 2
BeforePhase: PROCESS_VALIDATIONS 3
AfterPhase: PROCESS_VALIDATIONS 3
BeforePhase: UPDATE_MODEL_VALUES 4
AfterPhase: UPDATE_MODEL_VALUES 4
BeforePhase: INVOKE_APPLICATION 5
AfterPhase: INVOKE_APPLICATION 5
BeforePhase: RENDER_RESPONSE 6
AfterPhase: RENDER_RESPONSE 6Now the INVOKE_APPLICATION phase is invoked.
I have <h:messages /> tag but no errors could be seen.
What can be the reasons behind this problemWell the code that is producing the problem is quite big. Anyway i will post it, hoope you can get something out of it.
The jsp page is:
<ui:body binding="#{ReceptionPage$CompanyPersonPage.body1}" id="body1" style="-rave-layout: grid">
<div align="center">
<ui:staticText binding="#{ReceptionPage$CompanyPersonPage.staticText1}" id="staticText1"
style="font-family: Georgia,'Times New Roman',times,serif; font-size: 18px; font-weight: bold" text="Company Person Page"/>
</div>
<div align="left" style="color:red;font-weight:bold;layout:table;">
<h:messages id="errMsgs"/>
</div>
<ui:form binding="#{ReceptionPage$CompanyPersonPage.form1}" id="form1">
<ul>
<li>
<ui:label binding="#{ReceptionPage$CompanyPersonPage.label1}" id="label1" style="" text="Citizenship Number:"/>
<br/>
<ui:textField binding="#{ReceptionPage$CompanyPersonPage.textField1}" id="textField1" required="true" style="" text="#{CompanyPersonBean.citizenshipNumber}"/>
</li>
<li>
<ui:label binding="#{ReceptionPage$CompanyPersonPage.label2}" id="label2" style="" text="Name:"/>
<br/>
<ui:textField binding="#{ReceptionPage$CompanyPersonPage.textField2}" id="textField2" required="true" style="" text="#{CompanyPersonBean.name}"/>
</li>
<li>
<ui:label binding="#{ReceptionPage$CompanyPersonPage.label3}" id="label3" style="" text="Country:"/>
<br/>
<ui:textField binding="#{ReceptionPage$CompanyPersonPage.textField3}" id="textField3" required="true" style="" text="#{CompanyPersonBean.country}"/>
</li>
<li>
<fieldset style="width:250px;float:left;">
<legend>Temporary Address</legend>
<ui:label binding="#{ReceptionPage$CompanyPersonPage.tempDistrictLabel}" id="tempDistrictLabel" text="District:"/>
<br/>
<ui:dropDown binding="#{ReceptionPage$CompanyPersonPage.tempDistrictDropDown}"
converter="#{ReceptionPage$CompanyPersonPage.integerConverter1}" id="tempDistrictDropDown" immediate="true"
items="#{ReceptionPage$CompanyPersonPage.tempDistrictDataProvider.options['DISTRICT_ID,DISTRICT_NEPALI_NAME']}"
onChange="common_timeoutSubmitForm(this.form, 'ul:li:fieldset:tempDistrictDropDown');" valueChangeListener="#{ReceptionPage$CompanyPersonPage.tempDistrictDropDown_processValueChange}"/>
<br/>
<ui:label binding="#{ReceptionPage$CompanyPersonPage.tempAreaLabel}" id="tempAreaLabel" text="Area(VDC/Municipality):"/>
<br/>
<ui:dropDown binding="#{ReceptionPage$CompanyPersonPage.tempAreaDropDown}"
converter="#{ReceptionPage$CompanyPersonPage.integerConverter3}" id="tempAreaDropDown" items="#{ReceptionPage$CompanyPersonPage.tempAreaDataProvider.options['AREA_ID,AREA_NEPALI_NAME']}"/>
<br/>
<ui:label binding="#{ReceptionPage$CompanyPersonPage.tempWardNoLabel}" id="tempWardNoLabel" text="Ward No:"/>
<br/>
<ui:textField binding="#{ReceptionPage$CompanyPersonPage.tempWardNoTextField}" id="tempWardNoTextField" required="true"/>
<br/>
<ui:label binding="#{ReceptionPage$CompanyPersonPage.tempHouseNoLabel}" id="tempHouseNoLabel" text="House No:"/>
<br/>
<ui:textField binding="#{ReceptionPage$CompanyPersonPage.tempHouseNoTextField}" id="tempHouseNoTextField"/>
</fieldset>
<fieldset style="width:250px;">
<legend>
Permanent Address</legend>
<ui:label binding="#{ReceptionPage$CompanyPersonPage.permDistrictLabel}" id="permDistrictLabel" text="District:"/>
<br/>
<ui:dropDown binding="#{ReceptionPage$CompanyPersonPage.permDistrictDropDown}"
converter="#{ReceptionPage$CompanyPersonPage.integerConverter2}" id="permDistrictDropDown" immediate="true"
items="#{ReceptionPage$CompanyPersonPage.permDistrictDataProvider.options['DISTRICT_ID,DISTRICT_NEPALI_NAME']}"
onChange="common_timeoutSubmitForm(this.form, 'ul:li:fieldset:permDistrictDropDown');" valueChangeListener="#{ReceptionPage$CompanyPersonPage.permDistrictDropDown_processValueChange}"/>
<br/>
<ui:label binding="#{ReceptionPage$CompanyPersonPage.permAreaLabel}" id="permAreaLabel" text="Area(VDC/Municipality):"/>
<br/>
<ui:dropDown binding="#{ReceptionPage$CompanyPersonPage.permAreaDropDown}"
converter="#{ReceptionPage$CompanyPersonPage.integerConverter4}" id="permAreaDropDown" items="#{ReceptionPage$CompanyPersonPage.permAreaDataProvider.options['AREA_ID,AREA_NEPALI_NAME']}"/>
<br/>
<ui:label binding="#{ReceptionPage$CompanyPersonPage.permWardNoLabel}" id="permWardNoLabel" text="Ward No:"/>
<br/>
<ui:textField binding="#{ReceptionPage$CompanyPersonPage.permWardNoTextField}" id="permWardNoTextField" required="true"/>
<br/>
<ui:label binding="#{ReceptionPage$CompanyPersonPage.permHouseNoLabel}" id="permHouseNoLabel" text="House No:"/>
<br/>
<ui:textField binding="#{ReceptionPage$CompanyPersonPage.permHouseNoTextField}" id="permHouseNoTextField"/>
</fieldset>
</li>
<li>
<ui:label binding="#{ReceptionPage$CompanyPersonPage.label4}" id="label4" style="" text="Phone Number:"/>
<br/>
<ui:textField binding="#{ReceptionPage$CompanyPersonPage.textField4}" id="textField4" style="" text="#{CompanyPersonBean.phoneNumber}"/>
</li>
<li>
<ui:label binding="#{ReceptionPage$CompanyPersonPage.label5}" id="label5" style="" text="Mobile:"/>
<br/>
<ui:textField binding="#{ReceptionPage$CompanyPersonPage.textField5}" id="textField5" style="" text="#{CompanyPersonBean.mobileNumber}"/>
</li>
<li>
<ui:label binding="#{ReceptionPage$CompanyPersonPage.label6}" id="label6" style="" text="Email:"/>
<br/>
<ui:textField binding="#{ReceptionPage$CompanyPersonPage.textField6}" id="textField6" style=""
text="#{CompanyPersonBean.emailAddress}" validator="#{ReceptionPage$CompanyPersonPage.textField6_validate}"/>
</li>
<li>
<b>Person Company Relation:</b>
<br/>
<ui:checkbox binding="#{ReceptionPage$CompanyPersonPage.checkbox1}" id="checkbox1" label="Is Promoter" style=""/>
<br/>
<ui:checkbox binding="#{ReceptionPage$CompanyPersonPage.checkbox2}" id="checkbox2" label="Is Board Oof Director" style=""/>
<br/>
<ui:checkbox binding="#{ReceptionPage$CompanyPersonPage.checkbox3}" id="checkbox3" label="Is Shareholder" style=""/>
<br/>
<br/>
</li>
<li>
<ui:label binding="#{ReceptionPage$CompanyPersonPage.label7}" id="label7" style="" text="Citizenship Certificate File"/>
<br/>
<ui:upload binding="#{ReceptionPage$CompanyPersonPage.citizenshipFileUPloadField}"
columns="#{CompanyPersonBean.citizenshipFilePath}" id="citizenshipFileUPloadField" required="true" style=""/>
</li>
<li>
<ui:button action="#{ReceptionPage$CompanyPersonPage.button1_action}" binding="#{ReceptionPage$CompanyPersonPage.button1}"
id="button1" style="height: 23px"
text="Save"/>
||
<ui:button
binding="#{ReceptionPage$CompanyPersonPage.button2}" id="button2" onClick="window.close()" style="height: 24px" text="Close"/>
</li>
</ul>
</ui:form>
</ui:body>
The corresponding bean is:
public class CompanyPerson {
private String citizenshipNumber;
private String name;
private String country;
private String phoneNumber;
private String mobileNumber;
private String emailAddress;
private String citizenshipFilePath;
private String isShareHolder;
private String isBoardOfDirector;
private String isPromoter;
public CompanyPerson() {
public String getCitizenshipNumber() {
return citizenshipNumber;
public void setCitizenshipNumber(String citizenshipNumber) {
this.citizenshipNumber = citizenshipNumber;
public String getName() {
return name;
public void setName(String name) {
this.name = name;
public String getCountry() {
return country;
public void setCountry(String country) {
this.country = country;
public String getPhoneNumber() {
return phoneNumber;
public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
public String getMobileNumber() {
return mobileNumber;
public void setMobileNumber(String mobileNumber) {
this.mobileNumber = mobileNumber;
public String getEmailAddress() {
return emailAddress;
public void setEmailAddress(String emailAddress) {
this.emailAddress = emailAddress;
public int getTemporaryAddressId() {
return temporaryAddressId;
public void setTemporaryAddressId(int temporaryAddressId) {
this.temporaryAddressId = temporaryAddressId;
public int getPermanentAddressId() {
return permanentAddressId;
public void setPermanentAddressId(int permanentAddressId) {
this.permanentAddressId = permanentAddressId;
public String getCitizenshipFilePath() {
return citizenshipFilePath;
public void setCitizenshipFilePath(String citizenshipFilePath) {
this.citizenshipFilePath = citizenshipFilePath;
public String getIsShareHolder() {
return isShareHolder;
public void setIsShareHolder(String isShareHolder) {
this.isShareHolder = isShareHolder;
public String getIsBoardOfDirector() {
return isBoardOfDirector;
public void setIsBoardOfDirector(String isBoardOfDirector) {
this.isBoardOfDirector = isBoardOfDirector;
public String getIsPromoter() {
return isPromoter;
public void setIsPromoter(String isPromoter) {
this.isPromoter = isPromoter;
}No all the properties of the bean has been bind to components.
I also have value change listener methods for two drop down lists whose immediate property is set to true to bypass the validation. If i change the dropdownlist selection then its value change listener method is successfully invoked, then after if i click the submit button, then it will works.
Maybe you are looking for
-
When I play a song on my iPod it immediately skips a song and sometimes doesn't play any song at all
-
Sort array list and using comparable
With the following code I would like to setup a score object for the current player. Change it to a string(Is it correct to say parse it to a string type) Then add it to the arraylist. So I can sort the array list according to the string size. That's
-
Sap fi-sd integration and configuration part
Hi guru, Please tell me fi-sd integration and configuration part. every one knows the t.code - vkoa, apart from this, is there any other related configurations..? Please tell me any other configurations part. With regards, Manas
-
Itunes for windows not running when I open it
Brought new ipod nano, followed all instructions to the letter and have installed, uninstalled, reinstalled etc etc itunes about 20 times already and have had enough. My system is only 2 years old running windows xp and has the appropriate specificat
-
Accessing itunes playlists settings from 'time machine' backups
I accidentally changed the volume levels on many tracks and want to access the settings I had on some playlists before, but not loose the new ones done as of late. CAN ANYONE GUIDE ME THROUGH HOW TO DO THIS PLEASE.