Validator not firing?
I have an input text with a validator like validator="#{MyBean.validate}", but I put some logging in that method and it looks like it's not being called. What are the possible reasons I should check out?
Not sure if relevant, but I copied the bean from another application where the validator was working fine.
Just to be 100% certain, do you really want to have your validation in the managed bean? Might it be better placed in the business service? I'm just hi-lighting since ti might be we are answering your specific question in a way that lets you implement something incorrectly.
regards
Grant
Similar Messages
-
How to realize the function only a validator is fired when submit
Sorry for my question.
In a web Page here are a inputText of a code ,a search button Searching by the Code , others inputText s and a 'OK ' button.
the question is how to fired a only 'code' validator when searching
I made the search button immediate="true" ,So I wanted to fire the code validator by actionListener, the others validator were not fired .
But in this way i find i can't get the code's number not only by binding
but also by value. so What shall i do?
the actionListener is this:
public void commandButton_search(ActionEvent e){
UIViewRoot UIroot=FacesContext.getCurrentInstance().getViewRoot();
UIComponent uicomponent=UIroot;
String strCode= (String)this.inputText1.getValue();
MemberValidator aValidator=new MemberValidator();
aValidator.searchAddressCheck(uicomponent,strCode);As I posted before a response for your post,
if you want to use the input value in an action,
you should not use immediate="true";
otherwise you need to do everything JSF will do.
The most simple way is to have two <h:form>s in the page.
One <h:form> includes the <h:inputText> of a code and the search button.
Another <h:form> includes other components.
If the OK button also use the seach code, you can use Javascript to copy the
code value from the <h:inputText> in the first form to some <h:inputHidden>
in the second form. -
iam using spry to validate controls in a popup.in that
validations are working fine but the problem is when we click
cancel button also thse validations are firing...
i am using
javascript:Spry.Widget.Form.destroyAll() to destroy
validations...but it is not working.
when we click on cancel button how to destroy the validations
as well as hide the popup...
can anyone help me...Thanks! (While I'm REALLY not comfortable with code yet (working on it :-) I atleast understood that it was a PHP issue (yay).
Studied the code in the examples in the book. And added:
<pre>
<?php if ($_POST) {print_r($_POST);} ?>
</pre>
It worked. (I'm local testing, with no connection to a database yet. Just trying to get the basic pages to work first.)
Hopefully the more I work on all of this, the more I'll begin to "get it"! And I'm almost up to the Chapter on PHP. So, I'm hoping to will become clearer as I read on.
Thanks for the help in pointing me in the right direction!!!
-- Jami -
Popup not firing on closing browser or refreshing
Hi ADF experts,
I have set the af:document tag uncommittedDataWarning="on". But my popup not firing.
I have made inputText's autoSubmit="true"
Please help me out.
Thanks.Hi Frank,
Yes I made a POJO in model layer and created a datacontrol from that. After that I dragged to the jsff as a table with 2 columns.
The 2 columns are inputText.
The below scenario happened
Created a sample taskflow and a jsff page fragment
Created model based on POJO.
The POJO datacontrol dragged onto a jsff page as a table with 2 fields.(The fields made inputtext).
First field I kept autoSubmit=”true” and added a valuechangeListener
Second field kept as it is.
Tested as below:
I tried entering a value in the first textbox. And closed the browser it got closed(No warning message)
Second textbox after I entered value and closed browser(warning message shown)
Difference: valuechangeListener implemented in first.
Product.java
public class Product {
private String productId;
private String productName;
public Product() {
super();
public Product(String productId,String productName) {
this.productId=productId;
this.productName=productName;
public void setProductId(String productId) {
this.productId = productId;
public String getProductId() {
return productId;
public void setProductName(String productName) {
this.productName = productName;
public String getProductName() {
return productName;
ProductBean.java
public class ProductBean {
private List<Product> products=new ArrayList();
public ProductBean() {
this.createData();
private void createData(){
products.add(new Product("101","Alto"));
products.add(new Product("102","Benz"));
products.add(new Product("103","Chevrolet"));
products.add(new Product("104","Cruze"));
products.add(new Product("105","Accord"));
public List<Product> findAllProducts() {
return products;
jsff
<af:table value="#{bindings.Product.collectionModel}" var="row"
rows="#{bindings.Product.rangeSize}"
emptyText="#{bindings.Product.viewable ? 'No data to display.' : 'Access Denied.'}"
fetchSize="#{bindings.Product.rangeSize}" rowBandingInterval="0"
filterModel="#{bindings.ProductQuery.queryDescriptor}"
queryListener="#{bindings.ProductQuery.processQuery}"
filterVisible="true" varStatus="vs"
selectionListener="#{bindings.Product.collectionModel.makeCurrent}"
rowSelection="multiple" id="t1">
<af:column sortProperty="#{bindings.Product.hints.productId.name}"
filterable="true" sortable="true"
headerText="#{bindings.Product.hints.productId.label}" id="c1">
<af:inputText value="#{row.bindings.productId.inputValue}"
label="#{bindings.Product.hints.productId.label}"
required="#{bindings.Product.hints.productId.mandatory}"
columns="#{bindings.Product.hints.productId.displayWidth}"
maximumLength="#{bindings.Product.hints.productId.precision}"
shortDesc="#{bindings.Product.hints.productId.tooltip}"
valueChangeListener="#{pageFlowScope.managedBean1.sdas}" autoSubmit="true" id="it2">
<f:validator binding="#{row.bindings.productId.validator}"/>
</af:inputText>
</af:column>
<af:column sortProperty="#{bindings.Product.hints.productName.name}"
filterable="true" sortable="true"
headerText="#{bindings.Product.hints.productName.label}"
id="c2">
<af:inputText value="#{row.bindings.productName.inputValue}"
label="#{bindings.Product.hints.productName.label}"
required="#{bindings.Product.hints.productName.mandatory}"
columns="#{bindings.Product.hints.productName.displayWidth}"
maximumLength="#{bindings.Product.hints.productName.precision}"
shortDesc="#{bindings.Product.hints.productName.tooltip}"
id="it3">
<f:validator binding="#{row.bindings.productName.validator}"/>
</af:inputText>
</af:column>
</af:table>
Please help..Shall I raise it as a bug.
Thanks,
Roy -
ItemEditEnd not firing in DataGrid
In one particular DataGrid it's not firing - all other in my
app work fine. I've had another Flex developer to look at my code
just in case I'm going mad or something, and he thinks it's a bug
in Flex framework somewhere. I'm using Flex Builder 2.0.1 FWIW
Here is isolated code that exhibits the same behaviour
(breakpoint in onEdit event listener func does not trigger). Much
of it may seem superfluous but in actual app it's neccessary in the
actual app (I just tried to isolate the cause!).
Any ideas?
quote:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
creationComplete="onInit();"
>
<mx:Canvas
xmlns:mx="
http://www.adobe.com/2006/mxml"
xmlns:woccu="org.woccu.components.*"
width="100%" height="100%" id="ccc"
paddingTop="0" paddingLeft="0" paddingRight="0"
>
<mx:Script>
<![CDATA[
import mx.events.DataGridEvent;
import mx.events.DataGridEventReason;
import mx.collections.ArrayCollection;
// Dataprovider
private var _dp:ArrayCollection;
// This will contain array (hash) accessible by bottombar or
somesync
[Bindable]
public var bottomBar:Array;
public function onInit():void
_dp=new ArrayCollection([{PK: 'Matt', label: "XXX", col1:
'Matthews', col2: 'XEXE', level: 1}]);;
entrygrid.dataProvider=_dp;
trace('init');
public function refresh():void
// TODO: check if entity ID and other props are not blank!
// Refresh contents or somesync
// Callback function - when the data arrives
protected function onData(result:Array):void
// Builds our dataprovider or somesync
var tmpDPRow:Array;
var _bottomBar:Array=new Array();
_dp=new ArrayCollection();
for ( var j:String in result ) {
// First, check level. If 0 this row belongs to bottombar
if ( result[j]["level"] == "0" ) {
var pk:String=result[j]["PK"];
pk=pk.replace("-","_"); // - is not valid in object ID, so
we replace with _
_bottomBar[pk]=new Object();
_bottomBar[pk]["label"]=result[j]["label"];
_bottomBar[pk]["value"]=result[j]["col2"];
} else {
// Go over fields
tmpDPRow=new Array();
tmpDPRow["PK"]=result[j]["PK"];
tmpDPRow["label"]=result[j]["label"];
tmpDPRow["col1"]=result[j]["col1"];
tmpDPRow["col2"]=result[j]["col2"];
_dp.addItem(tmpDPRow);
// Apply bottom bar
this.bottomBar=_bottomBar;
// Apply all data to datagrid
this.entrygrid.dataProvider=_dp;
public function onEdit(event:DataGridEvent):void {
trace ('fire in the whole!');
if ( event.reason == DataGridEventReason.CANCELLED ) {
return;
// MUST URGENTLY UPDATE frickin database!
this.refresh(); // Subtotals have changed - need refresh
]]>
</mx:Script>
<!--
Note the hack below: column widths are absurdly large values
The idea is that Flex will resize down and keep the
proportions
-->
<mx:DataGrid xmlns:mx="
http://www.adobe.com/2006/mxml"
width="100%" height="100%" showHeaders="false"
itemEditEnd="onEdit(event)" id="entrygrid">
<mx:columns>
<mx:DataGridColumn width="0" visible="false"
dataField="PK">
</mx:DataGridColumn>
<mx:DataGridColumn width="70000"
itemRenderer="mx.controls.TextInput" editable="false"
dataField="label">
</mx:DataGridColumn>
<mx:DataGridColumn width="15000"
itemRenderer="mx.controls.TextInput" editable="false"
dataField="col1">
</mx:DataGridColumn>
<mx:DataGridColumn width="15000"
itemRenderer="mx.controls.TextInput" rendererIsEditor="true"
editable="true" dataField="col2">
</mx:DataGridColumn>
</mx:columns>
</mx:DataGrid>
</mx:Canvas>
</mx:Application>Never mind... found the cause. Turns out DataGrid wont fire
itemEditEnd unless it's editable property is true. Of course this
is not documented anywhere... -
Validation not happening on commit
Hi,
We have an inputText whose validation is defined at EO attribute level. There are two validations: a rangeValidator (0 to 100) and a method validator. We have an applicationsPanel which has 'Save' and 'Save and Close' buttons. In the task flow, Save action leads to 'Commit' and then to a router. Save and close action leads to 'Commit' and then back to parentAction.
The validation for the inputText is getting fired for Save but not for Save and Close.
We want the validation to be fired for both the buttons. Since Attribute validations are fired on commit, I do not understand why it is not getting fired on 'Save and Close'. Please help.Check if the "Save and Close" button has been set with <tt>immediate="true"</tt>. Actions of command components having <tt>immediate="true"</tt> are executed early at APPLY_REQUEST_VALUES phase and then processing goes directly to RENDER_RESPONSE phase thus skipping any data submission and processing of other components (e.g. the data fields are neither submitted not validated). In this way the commit action would be processed before any data is submitted to the model layer. This is not a bug, it is so by design.
Dimitar -
Partial triggers not Fired on partial submit when invalidate component
Can somebody tell me why Partial triggers are not Fired on partial submit when invalidate component in the validator. Neither error message next to the component is displayed.
Does somebody has an idea how can i solve this?
Thank you very much in advanceHi, that is a test case which i have promised you:
The .jspx page contains two fields , one of which has autosubmit = true; You will see, that when invalidate test field 2 partial triigers on field 1 are not fired neither faces message next
to the field 2 appears.
If you add programatically Field 1 and Field 2 partial trigerrs this solve the problem.
I'm waiting for your response.
Regards,
Krasi
<?xml version='1.0' encoding='windows-1251'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:af="http://xmlns.oracle.com/adf/faces"
xmlns:afh="http://xmlns.oracle.com/adf/faces/html">
<jsp:output omit-xml-declaration="true" doctype-root-element="HTML"
doctype-system="http://www.w3.org/TR/html4/loose.dtd"
doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
<jsp:directive.page contentType="text/html;charset=windows-1251"/>
<f:view>
<afh:html>
<afh:head>
<meta http-equiv="Content-Type"
content="text/html; charset=windows-1251"/>
<title>pprTest</title>
</afh:head>
<afh:body>
<af:form>
<af:panelLabelAndMessage label="Test Field 1">
<af:outputText binding="#{testBean.testField1Comp}"
partialTriggers="testField2"/>
</af:panelLabelAndMessage>
<af:inputText label="Test Field 2"
id="testField2"
autoSubmit="true"
binding="#{testBean.testField2Comp}"
partialTriggers="testField2"
validator="#{testBean.testField2_validator}" />
</af:form>
</afh:body>
</afh:html>
</f:view>
</jsp:root>
import javax.faces.application.FacesMessage;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import oracle.adf.view.faces.component.UIXInput;
import oracle.adf.view.faces.component.core.input.CoreInputText;
import oracle.adf.view.faces.component.core.output.CoreOutputText;
import javax.faces.application.FacesMessage.Severity;
public class TestBean {
private CoreOutputText testField1Comp;
private CoreInputText testField2Comp;
public TestBean() {
public void testField2_validator(FacesContext facesContext,
UIComponent uiComponent, Object value) {
// If input equals "invalidate" set value of the
// testField1Comp on "Component is invalid"
// Invalidate input and add an error message
if (((String)value).equals("invalidate")) {
testField1Comp.setValue("Component is invalid");
invalidateInput( (UIXInput)uiComponent,"TestField2","Test Field 2 is invalid!");
// If input not equals "invalidate" set value of the
// the testField1Comp on "Component is valid"
else{
testField1Comp.setValue("Component is valid");
//Dynamic adding of the partial targets , solves the problem
// with losing of partial triggers
//AdfFacesContext.getCurrentInstance().addPartialTarget(testField1Comp);
//AdfFacesContext.getCurrentInstance().addPartialTarget(uiComponent);
public void setTestField1Comp(CoreOutputText testField1Comp) {
this.testField1Comp = testField1Comp;
public CoreOutputText getTestField1Comp() {
return testField1Comp;
public void setTestField2Comp(CoreInputText testField2Comp) {
this.testField2Comp = testField2Comp;
public CoreInputText getTestField2Comp() {
return testField2Comp;
public static void invalidateInput(UIComponent uiComp,String compName, String message) {
showErrorMessage(uiComp , message);
if (uiComp instanceof UIXInput){
((UIXInput) uiComp).setValid(false);
public static void showErrorMessage(UIComponent component, String message) {
showMessage(component, message, FacesMessage.SEVERITY_ERROR);
private static void showMessage(UIComponent component, String message, Severity severity) {
String compId = component.getId();
FacesContext ctx = JSFUtils.getFacesContext();
FacesMessage facesMessage = new FacesMessage(
severity, component.getId() , message);
ctx.addMessage(compId,facesMessage );
} -
Why is validationEvent not fired?(SOS)
oracle team:
I use validation on AttributeLevel ,but sometimes it is fired,sometimes not to be fired.
our business logic is more complex,so i use
validationListener and validationEvent,but validationEvent is not fired,
it is a core function programming a user interface I think.
If its a bug and there is no workaround,
i can't continue my work.
please help me !
nulluse jdeveloper3112,validation_event is fired, all is good!
null -
Key-nextrec not firing in forms 10g
I have a code in the above trigger, but it is not firing, I have it in the block property and no other place in the form
message('In key next rec----'); message(' ');
IF :SYSTEM.Last_Record = 'TRUE' Then
Null;
Else
next_record;
End If;when-new-record-instance runs when you navigate to the next record.
Key-Nxtrec (Nxtrec is the correct spelling) only runs when you press the key assigned to call that trigger. In my environment, it is the Shift+ Down-Arrow key, but it could be just Down-Arrow -- it all depends on what key sequence is assigned to Forms Function Number 67 in your Forms Resource file, FMRWEB.res (or fmrusw.res).
So if the trigger runs when you press the correct keyboard key, and you issue the message but do not call the Next_Record; built-in, focus will not navigate to the next record in your running form. -
Output--- automatic mail is not firing to sold to party.
Dear Gurus,
My client requirement is to sent mail to sold party when saving a sales order.
For this I creted a new output type with following assignments
In General data tab:acess sequence assigned and Access to conditions is checked
In Default values tab: Dispatch time(send immadiately), transmission medium(External send), partner function(Sp
),Communication strategy(CS01) assigned.
In Time tab: no information given
In Storage system tab :Storage mode(print and archive),Document type(SDOORDER) info given.
In Print tab: print parameters(sales org) assigned.
In mail tab: nothing assigned.
In sort order tab:nothing assigned
In mail title and texts: En and DE languages are assigned.
in processing routines: program and form routine is assgned.
in partner functions: External send+ SP is maintained.
and in condtion record maintained in VV11 tcode with details
Partner function and in communication assigned printer and selected check box print immadiately and release after out.
But automatic mail is not firing when saving the sales order, but in change sales order in menu bar selected sales document and issue output to and selected print then mail is firing to the sold to party, pls tell me where i had done the mistake.
Rgrads,
kishore.
Edited by: kishore gopala on Sep 13, 2008 1:42 PMCheck whether you have maintained the email address in the customer master of Sold to party in the General Data>Address Tab> Under Communication Area??
In the SCOT Transaction, check under SMTP (SMTP Mail Server)-->under INT (Internet) --> an '*' asterisk has been maintained or not.
Check the status of the email output in the Sales Order, is it showing with a green traffic light???
If it is showing with a green traffic light you can manually see the status of the mail mesages in Transaction SOST.(by executing, by putting the Sender Id)
If they have not gone you will be able to see them queued up there.
Select the individual messages and press execute button. By doing this email outputs will be released.
Hope this helps you.
Caution: One word of caution is that SCOT is a very critical transaction. And if you are working on a live server, do not play with it as it controls the entire SAPconnect Administration Nodes.
Hope this helps.
Regards,
Vivek -
WHEN-NEW-ITEM-INSTANCE TRIGGER NOT FIRING IN FORM PERSONLIZATION
We are upgrading to R12, when-new-item-instance trigger written for radio group not firing. using USO-821 Order Administrator Responsibility the function order capture.After clicking on actions push button
opening Copy Quote for this Form Personalization written.
For Radio Group Copy-Group when-new-item-instance trigger written but this trigger not firing,but In 11i Instance its Firing.
trigger-event: when-new-item-instance
Trigger-object:copy_group
condition:when copy_group='ALL'
Action: showing message.
The same when-new-instance trigger written in form item level and trigger execution hierarchy properties 'OVERRIDE'.
Just I am thinking this overriding by Item level trigger of form.
Please kindly help me quickly .What I need to do?
How can I make trigger to Fire?
Please kindly give solution.....Its very urgent Requirement.pls help me.
Regards,
BasavarajPlease kindly help me quickly .What I need to do?
> Please kindly give solution.....Its very urgent Requirement.pls help me.
Kindly log a SR for urgent issues.
Thanks,
Hussein -
WHEN-NEW-ITEM-INSTANCE TRIGGER NOT FIRING IN FORM PERSONLIZATION(R12 UPGRAD
We are upgrading to R12, when-new-item-instance trigger written for radio group not firing. using USO-821 Order Administrator Responsibility the function order capture.After clicking on actions push button
opening Copy Quote for this Form Personalization written.
For Radio Group Copy-Group when-new-item-instance trigger written but this trigger not firing,but In 11i Instance its Firing.
trigger-event: when-new-item-instance
Trigger-object:copy_group
condition:when copy_group='ALL'
Action: showing message.
The same when-new-instance trigger written in form item level and trigger execution hierarchy properties 'OVERRIDE'.
Just I am thinking this overriding by Item level trigger of form.
Please kindly help me quickly .What I need to do?
How can I make trigger to Fire?
Please kindly give solution.....Its very urgent Requirement.pls help me.
Regards,
BasavarajPlease kindly help me quickly .What I need to do?
> Please kindly give solution.....Its very urgent Requirement.pls help me.
Kindly log a SR for urgent issues.
Thanks,
Hussein -
Hello Dev's,
I am having a problem in only one project and I have even tried to recreate the project with no success but previous projects created years prier (made with previous versions of FB) are not experiencing this.
I am trying to place breakpoints on functions in deep rooted classes (a class that is loaded by a class by a class, its a smaller component from a greater project) which I know is firing as I see the results on the screen.
However the break point does not fire and remains a blue circle, indicating it won't fire. If I remove and re add the break point while the app is running, it will become checked but once I run the debugger the break point turns back into a blue dot.
If I put a break point in one of the first lines of the application class, like in it's constructor, it will trigger and then my deeper break points will fire. But if I don't make this out of the way break point (in the main class) the following break points are not firing.
Thoughts?
Flex Builder 4.5
SDK 4.5.1
Debugger 11.6.5.635 (in FireFox)I haven’t seen that before, but in theory would be possible if several SWFs are being loaded and you get a class collision and the breakpoint in the app changes the timing of the loaded SWFs.
-
Hi,
I have a custom visual web part that I've developed for SharePoint 2013 Foundation. I am using Visual Studio 2013 to develop this web part.
In my visual web part I have GridView that I use to update data in a SQL 2008 R@ Server Database. In dev and test the OnRowUpdatingEvent fires properly, but in production it does not. I have the same version of SharePoint running on dev/test/prod.
The main difference between the three environments is the hardware. Production has a much beefier sever than dev and test. Dev and test are also virtual machines where production is.
At first I thought my problem was cache related, and I made adjustments per this article:
http://www.dmcinfo.com/latest-thinking/blog/id/8657/fix-sharepoint-2013-distributed-cache-timeouts
That didn't help because the event is still not firing. I took my test application and pointed it to the production database, and that event still fires in test but not in production. So I believe that eliminates database permission errors since I'm
using the same credentials in both instances.
My guess is that I need to change some settings in the production environment, but I'm not sure at this point what that might be.
Any suggestions on what settings to look at?
Brian
Brian Hochgurtel
My blogTry this solution :
http://stackoverflow.com/questions/5893373/c-sharp-rowupdating-method-not-called-when-update-is-clicked-in-a-gridview -
I have buy 4s it's unlocked and its working ok with different carriers in Bahrain, but in Pakistan I try to use different carriers's sims but its showing sim is not valid , not compatible? any one please help me out this?
Try restoring the iPhone to factory settings. If you are having difficult restoring, put the iPhone into Recovery Mode and see if that then works:
http://support.apple.com/kb/ht1808
If not, or if a restore to factory settings does not fix the problem, then your iPhone may have a hardware problem. You can only get the iPhone serviced by Apple in Canada, so you will have to take the iPhone there or send it to someone you know in Canada who can get the iPhone serviced and send it back to you. The only option for getting service in Pakistan would be to pay some unauthorized repair shop to attempt a repair, after which Apple will no longer provide any service even in Canada.
Regards.
Maybe you are looking for
-
Error on OS 10.4.6 update : peflight script problem
Hi there folks. i posted in the G5 Display forum a problem i had with my computer hanging during startup (the grey screen with the apple logo) after a powersurge/cut last week. i was running 10.4.11 and i tried every diagnostic, but to no avail. i ma
-
Mirroring with apple tv screen size on projector issue
Hello, my name is Dave. I do praise and worship music at a small church. I want to mirror my ipad on a projection TV. I have the ipad and apple tv but it's not using the entire projection screen. It only uses about 40% of the screen. I also want to u
-
Color profile reset after screensaver
Running Leopard 10.5.1. Dual screen setup with my external monitor having configured as a custom color profile to compensate for a little bit of gamma. Strange thing that always when the screen saver comes on, and I move the mouse so that the screen
-
Hi, the problem with my iweb site is that when one is browsing through different pages it works just fine but if you try to return to the product page again (product photographs are placed here) it won't open up. You have to go to another page & then
-
Chart series can't change color
I create different type series in the series block only the columnserie can affect my specified color. The other two serie only use the default color. The color like this: <mx:ColumnChart id="myChart4" width="527" height="178" showDataTips="tr