How to set the format mask
Hi,
Good Evening,
How to set the format mask to text fields based on currencies.
Hi Anil,
i am taking one method for setting the format mask to front end values
like this
public String xxformatmask(String test,String currency,OAPageContext pageContext)
String currencyFormattedNumber="";
try {
java.lang.Double num = new java.lang.Double(test);
currencyFormattedNumber = pageContext.getOANLSServices().formatCurrency(num,currency);
catch(Exception e) {
System.out.println("the exception is"+e);
return currencyFormattedNumber;
every time call this method
for text fields like this,
OAMessageTextInputBean commval=(OAMessageTextInputBean)webBean.findChildRecursive("commval");
String lesscomm=commval.getValue(pageContext).toString();
String lesscommformat=xxformatmask(lesscomm,currency,pageContext);
float lesscomm1=Float.parseFloat(lesscommformat);
i got the error at runtimeee
oracle.apps.fnd.framework.OAException: java.lang.NumberFormatException: For input string: "1,000.00"
at oracle.apps.fnd.framework.OAException.wrapperException(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
at OA.jspService(_OA.java:71)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
## Detail 0 ##
java.lang.NumberFormatException: For input string: "1,000.00"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1224)
at java.lang.Float.parseFloat(Float.java:394)
at crm.oracle.apps.xxcrm.crmmgmt.quotationmgmt.server.xxcrmQuotationMgmtAMImpl.forserviceformvalsetting(xxcrmQuotationMgmtAMImpl.java:1994)
at crm.oracle.apps.xxcrm.crmmgmt.quotationmgmt.webui.xxcrmServiceCostSheetCO.processFormRequest(xxcrmServiceCostSheetCO.java:345)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
at OA.jspService(_OA.java:71)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
Similar Messages
-
Dynamically setting the format mask - JDev 10.1.2 - JClient
I would like to let the user choose how dates are displayed. Is there any way to dynamically set a format mask on a View Object?
For some reason my example code was erased from the message.
I based my general method on following one:
see:
http://www.oracle.com/technology/products/jdev/howtos/10g/jcmultiform/index.html
int count = 0;
private DCBindingContainer createDetailBinding()
String detailBCName = "DetailFormUIModel"+count;
if (panelBinding.getBindingContext().get(detailBCName) == null)
DCBindingContainerDef bcdef = DCBindingContainerDef.findDefObject("sample.DetailFormUIModel");
DCBindingContainer bc = bcdef.createBindingContainer(panelBinding.getBindingContext());
bc.setName(detailBCName);
panelBinding.getBindingContext().put(detailBCName, bc);
++count; //make sure the next name is unused thus far.
return bc;
return null;
My method:
========
private DCBindingContainer createBindingContainer(String packageName, String panelModelName)
StringBuffer sb = new StringBuffer(packageName);
sb.append(ViewConstants.STRING_DOT);
sb.append(panelModelName);
DCBindingContainerDef bcdef = DCBindingContainerDef.findDefObject(sb.toString()); //NOTE THE NAME.
if (bcdef == null)
throw new JboException("System error, "+getClass().getName()+".createBindingContainer, DCBindingContainerDef: "+sb.toString()+" not found");
DCBindingContainer bc = bcdef.createBindingContainer(panelBinding.getBindingContext());
bc.setName(panelModelName);
panelBinding.getBindingContext().put(panelModelName, bc);
return bc;
Any suggestion for replacing createBindingContainer with the 10.1.3 adequate method?
Thanks
Fred -
How to set the format of DATETIME without second
Default format of DATETIME is "yyyy/MM/dd HH:mm:ss". But I need to remove the "ss", so I write the coding as below:
oracle.cabo.ui.validate.Formatter formatter =
new oracle.apps.fnd.framework.webui.OADateValidater("yyyy/MM/dd HH:mm", "yyyy/MM/dd HH:mm:ss");
webBean.findChildRecursive("SagyouStart").setAttributeValue(ON_SUBMIT_VALIDATER_ATTR, formatter);
However, when I click the submit button, a error message about date format error will be shown in the page.
If I set attribute of the submit button, which "serverUnvalidated" is TRUE, the page can be fine.
Still, have other ways? Thank.1. Are you planning to insert the data into the table or just display purpose?
2. if you want to insert into the table, then you modify thru
OANLSServices Class. You can get instantiate thru transaction.getOANLSServices. This class has many methods to chage from String to DateTime or DateTime to JavaDate .
Hope this helps.
Thanks
RK -
How to set the format '1' to '001' for textfield?
Hi,
In jsc2.1 , I'm using the follow code to set format , but error,
int intRows;
String strMaxid;
intRows = 1;
strMaxid = String.format("%1$03d",Integer.valueOf(intRows)) ;
Thanks.
SmileHi yossarian ,
Thank you very much!
But I want to get a formated string. It's id of the table,The type of id field is char(3).
In adding page get the value ( max row + 1) from requestbean of the main page, this value only Indicate to the user. In stateless session bean I use getmaxid() method to regenerate the true id .
In jbuilder 2005 , this code strMaxid = String.format("%1$02d",Integer.valueOf(intRows)) is fine. Why is wrong in jsc?
Thanks.
Smile -
How to set the format 123,456.78 by using DecimalFormat
hi all,
i have issue with display of following format number :123,456.78
i have used the foll pattern for it: "#,##0.0#"
Output is: 12,345,678.00
Needed is: 123,456.78
pls help me out.We are having a serious issue in our project.looking fwd for a immediate reply.
cheers,
sharathhi all,
i have issue with display of following format
mat number :123,456.78
i have used the foll pattern for it: "#,##0.0#"
Output is: 12,345,678.00
Needed is: 123,456.78
pls help me out.We are having a serious issue in our
project.looking fwd for a immediate reply.
cheers,
sharathI suppose you're passing number "12345678" instead of "123456.78"
try dividing the number by 100... -
how to set raw format for canon powershot a1100 is ? ,,according to the specs online it can.
It requires the Canon Hacker's Developement Kit (CHDK). It runs off of your SD card and does not harm your camera. Download a program called Stick-
http://zenoshrdlu.com/stick/stick.html
Follow the directions and you will be able to shoot in RAW along with some other deatures not available on your camera previously. -
How set the format of map scale(e.g. 1/2000) in the JTextField?
Hi, folks. My company buy a third party component, it contains a scale editor which is subclass of JTextField. However, I don't why this map scale editor allows people to entry number , ,alpha and space in it(it means every letter shown on the keyboard can be typed in the scale editor). My just want to know to how to set the certain format to let people to only type in the following format: 1/200000.
By the way, because it is part of the third party component, so all I can do is get the instance of the JTextField from the component and set the format to it.
Thanks in advance.Hi, folks. My company buy a third party component, it contains a scale editor which is subclass of JTextField. However, I don't why this map scale editor allows people to entry number , ,alpha and space in it(it means every letter shown on the keyboard can be typed in the scale editor). My just want to know to how to set the certain format to let people to only type in the following format: 1/200000.
By the way, because it is part of the third party component, so all I can do is get the instance of the JTextField from the component and set the format to it.
Thanks in advance. -
How do you set the format of a text field
I have a form with a text field that I want to set to either date format or number format depending on the selection of a radio button. Is there a way to do that via javascript?
var f = getField("txtAgeDOB1");
var initVal = f.value;
if (initVal == "Age") {
f.format = number;
} else {
f.format = date;One can set the format of the field to "None" and then by checking the value of a check box or some other logical test make a decision as to what format and value to fill the text box with. One can use the util.printf, util.printx, or the util.printd method to format the value.
-
Changing the format mask of a numberic field in a report
Hi,
I'm fethcing some numeric values from the DB and displaying them in the report. I'd like to use comma as the decimal separator but I can't get it to work. I'm very lost with all the NLS settings. I've tried using the format mask ad '9999990D00' but it still displays as dot as the decimal separator. What do I have to do in order to use comma as the decimal separator?
ThanksTry putting
SRW.DO_SQL('alter session set NLS_NUMERIC_CHARACTERS='', ''');
in the Before Report Trigger.
The setting might be reused for the next report if Reports is set to reuse the database connection.
To avoid this, I guess you change it back to default in the After Report Trigger.
Hope this helps!
Morten -
Ho to set the format of an InputField of type integer?
Hello,
I have an input field bound to context attribute of simple type integer. I want to have the number entered into this input field in this format 57000. Currently when I enter a number then navigate to another view and then return to this view where the input field is the number entered into the field become formatted like this 57,000 which is not what I want. Do you know how to explicitly set the format to such input field?
Thanks
Best Regards,
JenyHi,
Set the format you required as ##### in Representation Tab of Simpletype of type integer you have created previously
Have a look at this thread,
Re: How to change the format of a decimal input field?
Regards
Saravanan K -
How to set the BARCODE width and length for label printing..
Hi All,
How to set the Code 39 barcode label format in the sizxe of 0.20" * 1.4". By default while printing barcode size exceeds my current requirement. Please let me know to customize the size of barcode labels.
Thanks.I don't know what you mean by "Code 39" because my Output Designer software doesn't offer that barcode (or do you mean "code 3 of 9?). In any case, are you trying to control the size of the text (which is what I think of when you refer to "label")? If you are, then just change the font & size. If you are wanting to modify the physical characteristics of the barcode itself (height & length for a certain number of characters) then you are probably out of luck. Or at least in for some trial & error.
There are a series of "barcode.xxx" files in the 'config' folder where Output Designer was installed to. These are text files that contain the physical characteristics of the various barcodes for various printers. The parameters that you would be interested in is the height and width of the bars (black & white). For example, a barcode might be defined as .400 high with narrow bars 3 "dots" wide, wide bars 9 "dots" wide and white space the same or different. Presumably changing these values would affect the generated barcode. For example, in this example the wide bars are 3 times the width of the narrow bars so I would assume that relationship would have to remain. To make the resulting barcode shorter you would then use 2 for the narrow and 6 for the wide.
You would have to make the change in the file(s) that would be used for your printer(s).
There are four width values for each of the parameters. Most of the barcodes only use 2 but some have 4. I'm assuming that when there are 4, like in "4 8 12 16", that the barcode definition has 4 different widths of bars and/or spaces.
There is no guarantee that the scanning hardware & software will "see" and interpret the resulting barcode correctly. -
How to set the source property of image control dynamically?
Hi,
I have different fxg files which I want to display in a list. For each row in the List, I define which fxg file to be displayed in my database.
I need to know how to set the image1.source = (the fxg path) as a string from database?
Is there any conversion needed in this case? If so, can you please help me how to do this?Hi,
Thank you for your response. I am new to Adobe Flash Builder, Flex and action script. I don't get your answer straight away.
What I basically need is, I need to set image1.source = strFXG. Right now, this does not show the image. I don't understand fxgObject.pathid.source => how to give this?
Moreover, when I did google search, there is somethink like fxg converter which converts the fxg to a component. I thought this is a very simple problem on how to convert the fxg string to an object format. But now, it looks like it might be a big problem. Can anyone help me in this?
import spark.components.Image;
protected function view1_creationCompleteHandler(event:FlexEvent):void
// TODO Auto-generated method stub
var strFXG:String = 'assets.DB_Actief_Graphics';
var image1:Image = new Image();
image1.x = 100;
image1.y = 100;
image1.source = strFXG;
addElement(image1);
Regards,
Chella -
How to set MQMD format to String through JMS?
any inputs on how to set the message format (MQFMT) to string (MQSTrforcibly using JMS?
I have an application which writes a TextMessage to a remote Queue which is being received in MQHRF2 format.
This needs to be in MQSTR format.According to "http://www.share.org/proceedings/sh98/data/S1104.PDF"
You can do something like
queue.setTargetClient(JMSC.MQJMS_CLIENT_NONJMS_MQ);
To set the Target as NONJMS client, so that it will accept Text message.
Hope this helps... -
How to set the data fields column wide at sqlplus
Dear Sir/Madam
I would like to know how to set the data fields column wide at sqlplus
Thanks
Francissee
http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ch6.htm#sthref1131
and the FORMAT clause of the COLUMN command in
http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ch12013.htm#BACHCABF -
How to change the format of a date field inheriting format from subclass.
Currenctlty date filed is inheriting the format from a property class. The date format in my property class is 'dd/mm/rrrr'.
Now my requirement is to change the format mask according to my applications user from 'dd/mm/rrrr/ to 'dd/mon/rrrr'.
Some may use 'dd/mm/rrrr' and some may use 'dd/mon/yyyy'.
Thanks.Some may use 'dd/mm/rrrr' and some may use 'dd/mon/yyyy'.
I want a generic solution to change the date format at runtime These two seem to conflict. How will you decide which one to change and which not?
Maybe you are looking for
-
When I use yahoo images and open an image in a new window, the page, once I click its tab causes the entire browser to scramble graphically, making it nearly impossible to navigate further. I right-clicked and selected close tab. That regains the vis
-
Hello, I have a radio button that uses a named LOV, with values High, Low, Medium. I want to be able to reset the radio button. I have tried this: onchange="$s('P5_RISK', '')"When I click on the selected button, it resets the radiogroup, but when I t
-
Table Relationship Between AP Down Payment And AP Invoice
Hello Experts, I would like to know how an A/P Invoice table and A/P Down Payment table are linked each other. For example, when you click the button "Total Down Payment" in the A/P Invoice screen, the list of down payments is shown. How does SBO sea
-
Does skype run through safari?
Hiya, I'm really not technically minded so please bare with me! My parents are going on a cruise to the Caribbean from the UK and we were trying to work out the best way to keep in touch. So me and my dad (we both have iphone 4's) have down loaded th
-
How to calculate file tranfer rate
I am working on applet which uplaod the files on ftp now i want to add progress bar on it which tell me exactly how much time it takes to upload or how manay percent it completed. import cz.dhl.ftp.Ftp; import cz.dhl.ftp.FtpConnect; import cz.dhl.ftp