Problem validating an two Input Date components !...
Hi to all the users !. I would like to tell my problem... I have two input dates ("from" and "to") and I would like that the value from the "from" component isn't higher than the value from the "to" component... For that, I have use a validateDateTimeRange validator and set the "Maximum" value... My problem is that I don't get validated my inputdates components and additionally, when I select a date it appears with a strange format... Although I set the pattern to "dd/mm/yyyy" !... Let say... If I choose the 23th of July of 2012, the input date show "23/58/2012"... What would be the problem ?... Thankx !...
Navaneetha: Thankx for your help !; I will check it right now... I didn't answer as I was having lunch ! :D Thankx again
Suresh: A friend from another group told me that and the problem was solved !; anyway... Thankx for your time ! :d
Similar Messages
-
Login Module validation against two different data sources
Hi All,
We have the following setup
NW Portal 7.31
Single stack
We are in the process of implementing Employee Self Service 1.50 WDA.
And as part of the requirement , we have implemented LDAP as the UME DataSource.
So, employees log into the portal using the LAN ID and Windows password and are authenticated using the Logon ticket.
Now the client has come up with a requirement to have all German employees login with their ECC user id and password.
NOTE: ECC User ID and LAN IDs are the same, but the passwords are different.
a) Is it possible to use two UME data sources for logon validation.
b) Is customization of the Login module needed for this scenario?? If Yes, what components need to customized?
c) What is the best approach to handle this requirement?
Thanks.
Regards,
Rajcheck this link if it provide any helpful info:
User Mappings in the Authentication Framework of SAP NetWeaver Application Server (AS) Java - Security and Identity Mana…
Also you can search around creating a custom login module for authenticating useres against ECC ,if its possible you need to plugin the custom login module in your authentication stack along with the applicable flag and order so that if user authentication failed at ldap level then the control should go to authenticate it against the ECCcustom login module and logon ticket should be generated in both the cases. -
Problem to update two different data targets from same DSO using DTP
Hi All,
I am trying to upload data from standard DSO 0FIA_DS11 to DSOs 0FIA_DS12 and 0FIA_DS13 using DTP.
I run DTP 0FIA_DS11 -> 0FIA_DS12 and all data is updated on target, but when I run DTP 0FIA_DS11 -> 0FIA_DS13 job stops at data source extraction, endless.
Is there something I missing with new 7.0 approach?
Could someone help me with this problem?!
Any help is welcome!
Thanks in advance,
AlexI'm loading cumulative/planned transactions from 0FI_AA_11 to 0FIA_DS11 just filtering by depreciation area on data package. Data is being successfully load and activated into this data provider.
From 0FIA_DS11 to 0FIA_DS12 I am loading data without filtering and load is finishing successfully.
From 0FIA_DS11 to 0FIA_DS13 I am not using any filter on DTP. I'm removing data with transaction type 'PLN' into start routine, but load is not even achieving this point. It stops during data source extraction.
Any more ideas?
Thanks for your previous reply!! -
I have a select-options on my selection screen. In the database table i have different four values for this. ex EEX01, EEX02, EEX03 and EEX04.
their overall names are DE, HE, IT, TR respectively.
Now the requirement is user will enter this data like DE to TR , i am now confused how do convert these value to the values that i have in table. Because i have to use this for extracting the data from database table.
thanks in advance.hi,
what is the table name for the case.
and jsut list what are the fields .. we'll try to map the same and see if it works..
if for the field there is a check table attached then conversion routine will take care of that .
just check on the field of the domain in the dbtable
like matn1 for dataelement matnr and domain matnr in mara table.
regards,
vijay -
Getting quarters with two input date-parameters
I have to find a way to get all the quarters between a startdate and an enddate, like 01-04-2009 (startdate) and 31-11-2009 (enddate). An extra condition is to count an extra quarter above the enddate, so the last quarter is 2010-01 (first quarter of 2010).
The desired result will be:
2009-02
2009-03
2009-04
2010-01
The start- and enddate are inputparameters.
How do I get this result?Hi,
You're getting a quarter for each 3 values of LEVEL.
To get one more quarter, add 3 to the limit on LEVEL:
select distinct
to_char(qdate,'YYYYQ') quarter
from ( select add_months ( to_date (:start_date, 'DD/MM/YYYY')
, m
) qdate
from ( select level m
from dual
connect by level < 3 + -- Added
ceil ( months_between ( to_date (:end_date, 'DD/MM/YYYY')
, to_date (:start_date,'DD/MM/YYYY')
order by quarter
;Edited by: Frank Kulash on Jan 22, 2010 9:09 AM
By the way, you don't need all those sub-queries.
SELECT TO_CHAR ( ADD_MONTHS ( TO_DATE (:start_date, :date_format)
, 3 * (LEVEL - 1)
, 'YYYYQ'
FROM dual
CONNECT BY LEVEL <= 1 + CEIL ( MONTHS_BETWEEN ( TO_DATE (:end_date, :date_format)
, TO_DATE (:start_date, :date_format)
/ 3
; -
Please help to the earliest.....
Solved!
Go to Solution.And don't use the subject line for your question!
-
Date picker for af:inputDate is not picking up the correct input date
view source:
<af:inputDate value="#{bindings.DateField.attributeValue}" label="#{bindings.DateField.hints.label}"
required="#{bindings.DateField.hints.mandatory}"
valueChangeListener="#{pageFlowScope.CollectApplicantInformation.datesItemChanged}"
columns="#{bindings.DateField.hints.displayWidth}" shortDesc="#{CustomTooltip[DateField]}"
autoSubmit="true" helpTopicId="AppDt" id="DateField" simple="true">
<f:validator binding="#{bindings.DateField.validator}"/>
*<f:converter converterId="CustomConverter"/>*
</af:inputDate>
Here I am not using <af:ConvertDateTime> insted using customConverter, so what code changes do I need to make sure the date picker always picks the already existind date in the inputDate rather picking the current date?
Here is my CustomConverter.java
CustomConverter.java
public class CustomConverter extends DateTimeConverter implements ClientConverter, Converter
public Object getAsObject(FacesContext context, UIComponent component, String value)
String dataType = (String) resolveExpression("#{bindings." + component.getId() + ".attributeDef.javaType.name}");
if (dataType != null && !dataType.equalsIgnoreCase("oracle.jbo.domain.Date") && !dataType.equalsIgnoreCase("oracle.jbo.domain.Timestamp"))
String test = null;
if (context == null || component == null)
throw new NullPointerException();
if (value != null)
// To solve DB transaction dirty issue, Check isEmpty and return null.
if (value.isEmpty())
return null;
// the "value" is stored on the value property of the component.
// The Unified EL allows us to check the type
ValueExpression expression = component.getValueExpression("value");
if (expression != null)
Class<?> expectedType = expression.getType(context.getELContext());
if (expectedType != null)
System.out.println("expectedType Value:::" + expectedType.getName());
// try to convert the value (Object) to the TYPE of the "value" property
// of the underlying JSF component
try
return TypeFactory.getInstance(expectedType, value);
catch (DataCreationException e)
String errorMessage;
if (expectedType.equals(CustomNumber.class))
errorMessage = "You can enter only Numbers in this field";
else
errorMessage = e.getMessage();
if (errorMessage != null)
FacesContext ctx = FacesContext.getCurrentInstance();
FacesMessage fm = new FacesMessage(FacesMessage.SEVERITY_ERROR, "Invalid Format" , errorMessage);
ctx.addMessage(component.getClientId(), fm);
catch (CustomDomainException e)
int errorCode = e.getErrorMessageCode();
String[] errorMessage = e.getErrorMessageParams();
if (errorCode == 7 && errorMessage != null)
String msg = "Invalid " + errorMessage[0];
FacesContext ctx = FacesContext.getCurrentInstance();
FacesMessage fm = new FacesMessage(FacesMessage.SEVERITY_ERROR, "Application Error: ", msg);
ctx.addMessage(component.getClientId(), fm);
catch (JboException e)
Throwable cause = e.getCause();
if (cause == null)
cause = e;
test = "not good format";
throw e;
return null;
else
return value != null? value: null;
public String getAsString(FacesContext context, UIComponent component, Object value)
return value != null? value.toString(): null;
public String getClientLibrarySource(FacesContext context)
return null;
@Override
public Collection<String> getClientImportNames()
return Collections.emptySet();
@Override
public String getClientScript(FacesContext context, UIComponent component)
String formatMask = (String) resolveExpression("#{bindings." + component.getId() + ".format}");
if (formatMask != null)
String dataType = (String) resolveExpression("#{bindings." + component.getId() + ".attributeDef.javaType.name}");
if (dataType.equalsIgnoreCase("oracle.jbo.domain.Date") || dataType.equalsIgnoreCase("oracle.jbo.domain.Timestamp"))
if (component == null)
_LOG.severe("The component is null, but it is needed for the client id, so no script written");
return null;
// Add a JavaScript Object to store the datefield formats
// on the client-side. We currently store the format string
// for each and every field. It'd be more efficient to have
// an array of formats, then store for each field the
// index of the format, especially if we could delay outputting
// these objects to when the <form> closes.
String clientId = component.getClientId(context);
if (clientId != null)
// =-=AEW Only if Javascript...
Map<String, Object> requestMap = context.getExternalContext().getRequestMap();
// this fetch could be at the place where we append, but has been
// moved ahead to optimize use of StringBuilder
String jsPattern = getJSPattern(context, component);
String loc = _getLocaleString(context);
// FIX - figure out size!!!
// 127 chars for javascript + length of jspattern + locale + 12 chars for
// tranforming to name in the worst case.
StringBuilder buff = new StringBuilder(139 + jsPattern.length() + loc.length());
if (requestMap.get(_PATTERN_WRITTEN_KEY) == null)
requestMap.put(_PATTERN_WRITTEN_KEY, Boolean.TRUE);
// only create the _dfs object if it doesn't exist, so we don't
// wipe out _dfs[xxx] values if we ppr the first date field on a
// page with multiple date fields.
buff.append("if(window['_dfs'] == undefined){var _dfs=new Object();}if(window['_dl'] == undefined){var _dl=new Object();}");
buff.append("_dfs[\"");
buff.append(clientId);
buff.append("\"]=");
buff.append(jsPattern);
buff.append(";");
buff.append("_dl[\"");
buff.append(clientId);
buff.append("\"]=");
buff.append(loc);
buff.append(";");
return buff.toString();
else
LOG.severe("NULLCLINET_ID_NO_SCRIPT_RENDERED");
return null;
else
return null;
else
return null;
private String _getLocaleString(FacesContext context)
Locale dateTimeConverterLocale = getLocale();
if (dateTimeConverterLocale != null)
Locale defaultLocale = RenderingContext.getCurrentInstance().getLocaleContext().getFormattingLocale();
if (!(dateTimeConverterLocale.equals(defaultLocale)))
String loc = dateTimeConverterLocale.toString();
StringBuffer sb = new StringBuffer(2 + loc.length());
sb.append("'");
sb.append(loc);
sb.append("'");
return (sb.toString());
return "null";
@Override
@Deprecated
public String getClientConversion(FacesContext context, UIComponent component)
String formatMask = (String) resolveExpression("#{bindings." + component.getId() + ".format}");
if (formatMask != null)
String dataType = (String) resolveExpression("#{bindings." + component.getId() + ".attributeDef.javaType.name}");
if (dataType.equalsIgnoreCase("oracle.jbo.domain.Date") || dataType.equalsIgnoreCase("oracle.jbo.domain.Timestamp"))
String jsPattern = getJSPattern(context, component);
Map<String, String> messages = new HashMap<String, String>();
if (jsPattern != null)
Class<?> formatclass = formatMask.getClass();
System.out.println("FormatClass::" + formatclass);
System.out.println(" Format Mask : " + formatMask);
// SimpleDateFormat sdfDestination = new SimpleDateFormat(formatMask);
String pattern = formatMask; //getPattern();
if (pattern == null)
pattern = getSecondaryPattern();
String key = getViolationMessageKey(pattern);
Object[] params = new Object[]
{ "{0}", "{1}", "{2}" };
Object msgPattern = getMessagePattern(context, key, params, component);
//if hintFormat is null, no custom hint for date, time or both has been specified
String hintFormat = _getHint();
FacesMessage msg = null;
String detailMessage = null;
if (msgPattern != null)
msg = MessageFactory.getMessage(context, key, msgPattern, params, component);
detailMessage = XhtmlLafUtils.escapeJS(msg.getDetail());
Locale loc = context.getViewRoot().getLocale();
SimpleDateFormat formatter = new SimpleDateFormat(pattern, loc);
java.lang.Object obj = resolveExpression("#{bindings." + component.getId() + ".attributeValue}");
String databaseDate=null;
if(obj!=null)
databaseDate = obj.toString();
DateFormat df = new SimpleDateFormat(pattern,loc);
System.out.println("DateComponent input value :::::::::::::::::::::::::"+databaseDate);
Date today;
try {
// System.out.println("Before Conversion::::::::::::"+df.parse(databaseDate).toString());
if(databaseDate!=null)
today = df.parse(databaseDate);
else
today = new Date();
System.out.println("After Conversion Date :::::::::::::::::::::::::::::"+today.toString());
//Date today = new Date();
String dt = formatter.format(today);
String exampleString = dt;
String escapedType = XhtmlLafUtils.escapeJS(getType().toUpperCase());
StringBuilder outBuffer = new StringBuilder();
outBuffer.append("new TrDateTimeConverter(");
outBuffer.append(jsPattern);
// loc = getLocale();
if (loc != null)
outBuffer.append(",'");
outBuffer.append(loc.toString());
outBuffer.append("','");
else
outBuffer.append(",null,'");
outBuffer.append(exampleString);
outBuffer.append("','");
outBuffer.append(escapedType);
outBuffer.append("'");
if (msgPattern != null || hintFormat != null)
messages.put("detail", detailMessage);
messages.put("hint", hintFormat);
outBuffer.append(',');
// try
// JsonUtils.writeMap(outBuffer, messages, false);
// catch (IOException e)
// outBuffer.append("null");
outBuffer.append(')'); // 2
return outBuffer.toString();
catch(ParseException e)
System.out.println("Parse Exception :::::::::::::::::::::"+e);
return null;
else
// no pattern-matchable date
return null;
else
return null;
else
return null;
protected String getJSPattern(FacesContext context, UIComponent component)
String jsPattern = null;
String datePattern = (String) resolveExpression("#{bindings." + component.getId() + ".format}");
if (datePattern != null)
String secondaryPattern = getSecondaryPattern();
if (datePattern != _NO_JS_PATTERN)
int length = datePattern.length() * 2 + 2;
if (secondaryPattern != null)
length = length + 3 + secondaryPattern.length() * 2;
StringBuilder outBuffer = new StringBuilder(length);
jsPattern = _getEscapedPattern(outBuffer, datePattern, secondaryPattern);
else
jsPattern = datePattern;
return jsPattern;
private static void _escapePattern(StringBuilder buffer, String pattern)
buffer.append('\'');
XhtmlUtils.escapeJS(buffer, pattern);
buffer.append('\'');
private static String _getEscapedPattern(StringBuilder buffer, String pattern, String secondaryPattern)
if (secondaryPattern != null)
buffer.append('[');
_escapePattern(buffer, pattern);
if (secondaryPattern != null)
buffer.append(",'");
XhtmlUtils.escapeJS(buffer, secondaryPattern);
buffer.append("']");
return buffer.toString();
private String _getHint()
String type = getType();
if (type.equals("date"))
return getHintDate();
else if (type.equals("both"))
return getHintBoth();
else
return getHintTime();
public static Object resolveExpression(String pExpression)
FacesContext facesContext = FacesContext.getCurrentInstance();
Application app = facesContext.getApplication();
ExpressionFactory elFactory = app.getExpressionFactory();
ELContext elContext = facesContext.getELContext();
ValueExpression valueExp = null;
valueExp = elFactory.createValueExpression(elContext, pExpression, Object.class);
return valueExp.getValue(elContext);
private static final String _NO_JS_PATTERN = new String();
private static final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(DateTimeConverter.class);
// RenderingContext key indicating the _dateFormat object
// has been created
private static final String _PATTERN_WRITTEN_KEY = "org.apache.myfaces.trinidadinternal.convert.DateTimeConverter._PATTERN_WRITTEN";
*Problem is if any input date componet is displaying other than current date then the date picker is always picking the current date rather existing date*
Please suggest me where to make changes?
Edited by: 858782 on Oct 3, 2011 7:43 AM
Edited by: 858782 on Oct 3, 2011 11:44 PMI need custom date foramts to be applied for different inputDates which are not defined in <af:convertDateTime>
Thanks
Edited by: 858782 on Oct 13, 2011 4:59 PM -
Input Date does not work correctly In dynamic region
Hello everyone.
I created a view with a dynamic region. When switch to a region with Input Date components, if I click the "Choose Date" button, this region will exit to default region without any error message.
The component works well in default region but not in regions switched by Link.
I tried it in a completely new application and i am sure there is no any problem except the component and the region themselves.
SO, if someone tied doing this and know what cause it and how to fix it?
Edited by: 1007000 on 2013-5-20 下午8:49Well, i find out the problem. I set the managed bean of the region backing scope, and Input Date is a server-side component. So the taskflow id will lost when i click the Choose Date button.
change the scope to pageflow, and it works. -
How to input data in a database table without knowing in advance table and column configurations
Hi,
I have a problem using LabVIEW for input data (manually) in a SQL database. I have about 40 tables in the database, each of them is related to a specific engine component. I need to create a user interface (maybe visualizing the table with a table control) where the users can insert data in the database table fields. Could someone give me some suggestion on how to do it?
Using the DB tools insert data.vi I need to know in advance the column configuration of the table, but in my database each table has its own structure! So do I have to create 40 different masks, one for every different table?
Thanks in advance.
MichelaI have not actually used the LV SQL Toolkit, but I will try and offer high level ideas :-)
when you have retrieved the construction data for a table, you should be able to use array and cluster indexing to aquire the names of the fieds, enough to create a labelled table on the LV Front panel.
After completing a new entry you can INSERT the entry into the database using the same data.
Is the SQL toolkit an additional purchase, or included in newer versions as standard? If you post a sample of the cluster/array that you retrieve, I could give you a sample VI to give you some pointers in creating the User Interface table
- Cheers, Ed -
Hi
i used the Build JDEVADF_11.1.1.4.0
I want to make compare validation between two input text Are equal or not . same Thing when i create new email i must enter the password and re enter password if not equal he give me messageHi,
for a validation String, you can put autosubmit=true and in the valuechangeListener make the comparation.
How to compare two Strings in java? http://stackoverflow.com/questions/513832/how-do-i-compare-strings-in-java -
Hi,
I have an adf page with two input date component, one for start date and one for end date with following constraint:
1. start data must have with min date current date
2. end date must be included between current date and start date + 90 days
how can do this?
Jdev version 11.1.2.3
Thk
L-Please follow https://forums.oracle.com/thread/2227956
-
EPM add-in problem with input data,retrieve dimension or members
Hello everyone,
I am trying to use data write back (input data) function with EPM add-in in Dashboards. I managed successfully bringing results of an EPM report. I've created a local connection at EPM, and created a connection at data manager for"Planning and consolidation, version for SAP netweaver platform". And i could get the values via refreshing connection at preview mode, so far so good. Now i want to add a connection which will serve as data write back function to a specific BPC cube. The problem is, I can retrieve data source name and environment name. But when i click to retrieve model names, it retrieves empty results. The problem exist in, "retrieve dimension" and"retrieve dimension members" functionalities too. I realized that i could retrieve model names for only one specific environment, but even i could get these, when i try to retrieve "cell definition" i am facing an error. You can see related screenshots below.
I am using Dashboards 4.1 SP2, EPM connector 10 SP 17. I created two connections as local and business planning and consolidation for netweaver. I selected same environment and model name for these connections. Neither did work. Any ideas?
Update: The reason i could see some model names and some others not was i didn't specified the model as data source at:
Enable BPC Model as reporting data source
Logon to BPC 10.0 NW web client -> Planning and Consolidation Administration -> Dimensions and Models -> Models -> Select the Model -> Edit -> Features Used with the Model -> mark check box 'Use as Source of Data' -> Save.
I will update here if i could find a solution for the other issue. (First screenshot).
Update_2: The problem was occuring because i wasn't connecting to transient cube, created automatically by applying the step at Update_1. While creating a local connection, you shouldn't connect to the original cube, but to the transient one instead to use input data functionality.
Regards,
Onur
Message was edited by: Onur GöktaşHI,
I believe it is definitely the support pack. I posted an issue on this forum and I saw your post. Your issue is very similar to mine. I saw Andy's reply to you about the SP 18 and looked into it. Thanks Andy. SP 18 resolved my issue. See my post. Kathy -
Compound date (dd.MM.yyyy HH:mm) from two input fields
Hi,
I need to compound a date field in format dd.MM.yyyy HH:mm from two input fields(date and time field). I was trying a lot but could not get it to work. So right now I'm trying to start it simple but still have a couple of problems.
1.) To start easy I wanted to fill a hardcoded date into my field.
setAttribute(MYDATE, "01.01.2005 12:10");
brings (java.lang.IllegalArgumentException) Timestamp format must be yyyy-mm-dd hh:mm:ss.fffffffff
2.) setAttributeInternal(MYDATE, "01.01.2005 12:10");
brings JBO-27018: AttrSetValException Cause: The type of attribute value provided as an argument to the set() method for this attribute is not an instance of the Java type that this attribute expects.
3.) The thing that I reall need is something like:
DateFormat sim = new SimpleDateFormat("dd.MM.yyyy HH:mm");
java.util.Date datum = new java.util.Date();
try
datum = sim.parse("01.01.2005 12:30");
} catch (ParseException e)
setAttributeInternal(MYDATE, datum);
but right now this also ends with the JBO-27018
I also did try different types (timestamp and date) in my entity object and different format masks. Not working at all. All the threads I found are pointing to articles from Steve, which are not available anymore (the links don't work). So any help is appreciated.
Regards, PeterThankyou for the hint. I get it to work with
public void whatever
DateFormat simple = new SimpleDateFormat("dd.MM.yyyy HH:mm");
java.util.Date javaDate = new java.util.Date();
try
javaDate = simple.parse("01.01.2005 12:30");
} catch (ParseException e)
java.sql.Timestamp sqlDate = new java.sql.Timestamp(javaDate.getTime());
oracle.jbo.domain.Date nowDate = new oracle.jbo.domain.Date(sqlDate);
setAttributeInternal(MYDATE, nowDate);
but is there an easier and more 'beautiful' way to do this? Like using a date formatter on oracle.jbo.domain.Date instead using the SimpleDateFormat? btw. did I mention that I'm a Forms and PL/SQL programmer ;-)
Regards, Peter -
Revision: 10214
Author: [email protected]
Date: 2009-09-13 07:33:58 -0700 (Sun, 13 Sep 2009)
Log Message:
This fixes the problem that if two text components share the same textFlow there is an infinite loop involving updateDisplayList -> damageHandler -> invalidateDisplaylist -> back to updateDisplayList. The bug file was for TextArea which is RET but the same bug was in RichText as well.
This example with a renderer exposed it because the typicalItem that is composed to figure out sizes and the actual first item in the list share the same textFlow. It actually has nothing to do with useVirtualDisplay other than it was sharing a textFlow.
It turns out that the TextFlowFactory dispatches damage events every time the textFlow is composed. Unlike when the flowComposer is used, it always considers the flow damaged. It was exacerbated by each of the two components having a damage handler for the same textFlow.
The solution is to use the textFlow generation number. In the damageHandler if the generation is the last known generation number, assume no changes, and return immediately from the damage handler.
QE notes: There are 1 TextArea, 6 TextInput and 2 NumericStepper failuers, with or without my changes. The common link seems to be DispatchKeyEvent. Most were testing maxChar, displayAsPassword and restrict. I tested these and they seem to be working correctly.
Doc notes:
Bugs: SDK-23002
Reviewer: Gordon
Tests run: checkintests, TextArea, TextInput and NumericStepper
Is noteworthy for integration: no
Ticket Links:
http://bugs.adobe.com/jira/browse/SDK-23002
Modified Paths:
flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RichEditableText.as
flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RichText.as
flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/RichEditable TextContainerManager.asRevision: 10214
Author: [email protected]
Date: 2009-09-13 07:33:58 -0700 (Sun, 13 Sep 2009)
Log Message:
This fixes the problem that if two text components share the same textFlow there is an infinite loop involving updateDisplayList -> damageHandler -> invalidateDisplaylist -> back to updateDisplayList. The bug file was for TextArea which is RET but the same bug was in RichText as well.
This example with a renderer exposed it because the typicalItem that is composed to figure out sizes and the actual first item in the list share the same textFlow. It actually has nothing to do with useVirtualDisplay other than it was sharing a textFlow.
It turns out that the TextFlowFactory dispatches damage events every time the textFlow is composed. Unlike when the flowComposer is used, it always considers the flow damaged. It was exacerbated by each of the two components having a damage handler for the same textFlow.
The solution is to use the textFlow generation number. In the damageHandler if the generation is the last known generation number, assume no changes, and return immediately from the damage handler.
QE notes: There are 1 TextArea, 6 TextInput and 2 NumericStepper failuers, with or without my changes. The common link seems to be DispatchKeyEvent. Most were testing maxChar, displayAsPassword and restrict. I tested these and they seem to be working correctly.
Doc notes:
Bugs: SDK-23002
Reviewer: Gordon
Tests run: checkintests, TextArea, TextInput and NumericStepper
Is noteworthy for integration: no
Ticket Links:
http://bugs.adobe.com/jira/browse/SDK-23002
Modified Paths:
flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RichEditableText.as
flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RichText.as
flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/RichEditable TextContainerManager.as -
Problem concerning parsing int from .dat input
The following program takes information form a ".dat" file, stores it and manipulates it. However, I am having a weird problem. Whenever I try to parse a n int from a certain point in the file (the end of a line) I keep getting thrown a java.lang.NumberFormatException. I understand why this would be thrown if I was sending it a wrong number, but, I am not. In fact the token before the last one sends it the same number and it parses fine. Here is the problem code;
public void getPrice(Scanner scanner)
while(scanner.hasNextLine())
//puts into string the next scan token
String s = scanner.next();
//takes the scan toke above and puts it into an editable enviroment
stringToken = new StringTokenizer(s, " ", false);
while(stringToken.hasMoreTokens())
//moves position within string in file by one
position++;
/*Starts data orignazation by reading from each perspective field
* 1 = day
* 2 = day of month
* 3 = month
* 4 = year
if(position == 1)
String dayFromFile = stringToken.nextToken();
int dayNum = Integer.parseInt(dayFromFile);
System.out.print(days[dayNum-1] +" ");
else if(position == 2)
System.out.print(stringToken.nextToken() + "/");
else if(position == 3)
System.out.print(stringToken.nextToken() + "/");
else if(position == 4)
System.out.print(stringToken.nextToken() +"\n");
//if it is in [buy] area, it prints
else if(position == 8)
String buy = stringToken.nextToken();
System.out.println("Buy: " +buy );
currentBuyPrice = Integer.parseInt(buy);
if(currentBuyPrice < 0)
currentBuyPrice = 0;
if(currentBuyPrice > buyPrice)
buyPrice += currentBuyPrice;
if(currentBuyPrice == buyPrice)
buyPrice +=0;
else
buyPrice -= currentBuyPrice;
//if it is in [sell] area, it prints, and resets the position to zero because line is over
else if(position == 9)
String sell = stringToken.nextToken();
System.out.println("Sell: " +sell);
**currentSellPrice = Integer.valueOf(sell).intValue();;
if(currentSellPrice < 0)
currentSellPrice = 0;
else if(currentSellPrice > sellPrice)
sellPrice += currentSellPrice;
else if(currentSellPrice == sellPrice)
sellPrice +=0;
else
sellPrice -= currentSellPrice;
scanner.nextLine();
position = 0;
if(scanner.hasNextLine() == false)
System.out.println("Net change of buy price: " buyPrice "\n Net change of sell price: " +sellPrice);
//discards all other string areas
else
stringToken.nextToken();
**The problem is here. The string prints as a perfect number, no spaces or anything. I thought it could be because the number was "-1" but I tried it without the "-" and it still threw the same thing. The really weird thing is that the buy code works fine, and it parses all ints I send it fine.
EDIT:
Here is how the .dat looks;
1 5 15 2006 18 26 12 -1 -1
1 5 15 2006 18 32 20 -1 -1
1 5 15 2006 18 38 29 -1 -1
It is the last "-1" that can not be parsed. I tried putting an excape character at the end so it looked;
1 5 15 2006 18 26 12 -1 -1 &
1 5 15 2006 18 32 20 -1 -1 &
1 5 15 2006 18 38 29 -1 -1 &
That did nothing.import java.io.*;
import javax.swing.*;
import java.awt.*;
import java.util.*;
import java.awt.event.*;
public class CSE extends JFrame implements ActionListener
//GUI COMPONENTS
JTextField input = new JTextField(20);
JButton submit = new JButton("submit");
//COMPONENTS FOR DATE; OBTAINING CORRECT FOLDER
String days[] = {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"};
Calendar calSource = Calendar.getInstance();
int day = calSource.get(Calendar.DAY_OF_MONTH);
int month = calSource.get(Calendar.MONTH);
int year = calSource.get(Calendar.YEAR);
int monthCheck [] = {Calendar.JANUARY, Calendar.FEBRUARY, Calendar.MARCH, Calendar.APRIL, Calendar.MAY, Calendar.JUNE, Calendar.JULY, Calendar.AUGUST, Calendar.SEPTEMBER, Calendar.OCTOBER, Calendar.NOVEMBER, Calendar.DECEMBER};
int dayS;
int monthS;
int yearS;
//if there is file found
boolean proceed = false;
//int data for analysis
int buyPrice;
int currentBuyPrice;
int sellPrice;
int currentSellPrice;
//toold for parsing and decoding input
String inputS = null;
String s = null;
StringTokenizer stringToken = null;
Scanner scanner;
int position = 0;
public CSE()
super("Test CSE");
setDefaultCloseOperation(EXIT_ON_CLOSE);
input.setBackground(new Color(0, 80, 250));
submit.addActionListener(this);
getContentPane().add(input, BorderLayout.SOUTH);
getContentPane().add(submit, BorderLayout.NORTH);
setSize(500, 500);
setVisible(true);
public void actionPerformed(ActionEvent e)
getMonth();
inputS = input.getText();
FileReader newRead = null;
try {
newRead = new FileReader(monthS +"-" +day +"-" +year +"/" +inputS +".dat");
proceed = true;
catch(FileNotFoundException f)
System.out.println("File not found");
proceed = false;
if(proceed)
BufferedReader bufferedReader = new BufferedReader(newRead);
scanner = new Scanner(bufferedReader);
scanner.useDelimiter("\n");
getPrice(scanner);
public void getPrice(Scanner scanner)
while(scanner.hasNextLine())
//puts into string the next scan token
String s = scanner.next();
//takes the scan toke above and puts it into an editable enviroment
stringToken = new StringTokenizer(s, " ", false);
while(stringToken.hasMoreTokens())
//moves position within string in file by one
position++;
/*Starts data orignazation by reading from each perspective field
* 1 = day
* 2 = day of month
* 3 = month
* 4 = year
if(position == 1)
String dayFromFile = stringToken.nextToken();
int dayNum = Integer.parseInt(dayFromFile);
System.out.print(days[dayNum-1] +" ");
else if(position == 2)
System.out.print(stringToken.nextToken() + "/");
else if(position == 3)
System.out.print(stringToken.nextToken() + "/");
else if(position == 4)
System.out.print(stringToken.nextToken() +"\n");
//if it is in [buy] area, it prints
else if(position == 8)
String buy = stringToken.nextToken();
System.out.println("Buy: " +buy );
currentBuyPrice = Integer.parseInt(buy);
if(currentBuyPrice < 0)
currentBuyPrice = 0;
if(currentBuyPrice > buyPrice)
buyPrice += currentBuyPrice;
if(currentBuyPrice == buyPrice)
buyPrice +=0;
else
buyPrice -= currentBuyPrice;
//if it is in [sell] area, it prints, and resets the position to zero because line is over
else if(position == 9)
String sell = stringToken.nextToken();
System.out.println("Sell: " + sell);
currentSellPrice = Integer.valueOf(sell).intValue();;
if(currentSellPrice < 0)
currentSellPrice = 0;
else if(currentSellPrice > sellPrice)
sellPrice += currentSellPrice;
else if(currentSellPrice == sellPrice)
sellPrice +=0;
else
sellPrice -= currentSellPrice;
scanner.nextLine();
position = 0;
if(scanner.hasNextLine() == false)
System.out.println("Net change of buy price: " +buyPrice +"\n Net change of sell price: " +sellPrice);
//discards all other string areas
else
stringToken.nextToken();
public void getMonth()
for(int x=0; x < monthCheck.length; x++)
if(month == monthCheck[x])
monthS = (x+1);
x = monthCheck.length;
public static void main(String [] args)
CSE cs = new CSE();
}Make a folder named whatever the current date is, and put a .dat file in there with this;
1 5 15 2006 0 3 52 -1 -1
1 5 15 2006 0 29 52 -1 -1
1 5 15 2006 0 36 1 -1 -1
1 5 15 2006 0 42 9 -1 -1
1 5 15 2006 0 48 18 -1 -1
1 5 15 2006 0 54 29 -1 -1
1 5 15 2006 1 0 37 -1 -1
1 5 15 2006 1 6 44 -1 -1
1 5 15 2006 1 12 53 -1 -1
1 5 15 2006 1 19 1 -1 -1
1 5 15 2006 1 25 9 -1 -1
1 5 15 2006 1 31 18 -1 -1
1 5 15 2006 1 37 27 -1 -1
1 5 15 2006 1 43 37 -1 -1
1 5 15 2006 1 49 46 -1 -1
1 5 15 2006 1 55 53 -1 -1
1 5 15 2006 2 2 1 -1 -1
1 5 15 2006 2 8 10 -1 -1
1 5 15 2006 2 14 27 -1 -1
1 5 15 2006 2 20 37 -1 -1
1 5 15 2006 14 12 45 -1 -1
1 5 15 2006 14 20 36 -1 -1
1 5 15 2006 14 26 44 -1 -1
1 5 15 2006 14 32 52 -1 -1
1 5 15 2006 14 39 0 -1 -1
1 5 15 2006 14 45 8 -1 -1
1 5 15 2006 14 51 17 -1 -1
1 5 15 2006 14 57 26 -1 -1
1 5 15 2006 15 3 35 -1 -1
1 5 15 2006 15 9 43 -1 -1
1 5 15 2006 15 15 51 -1 -1
1 5 15 2006 15 21 59 -1 -1
1 5 15 2006 15 28 6 -1 -1
1 5 15 2006 15 34 15 -1 -1
1 5 15 2006 15 40 24 -1 -1
1 5 15 2006 15 46 33 -1 -1
1 5 15 2006 15 52 40 -1 -1
1 5 15 2006 15 58 48 -1 -1
1 5 15 2006 16 4 56 -1 -1
1 5 15 2006 16 11 5 -1 -1
1 5 15 2006 16 17 14 -1 -1
1 5 15 2006 16 23 24 -1 -1
1 5 15 2006 16 29 32 -1 -1
1 5 15 2006 16 35 39 -1 -1
1 5 15 2006 16 41 47 -1 -1
1 5 15 2006 16 47 55 -1 -1
1 5 15 2006 16 54 4 -1 -1
1 5 15 2006 17 0 13 -1 -1
1 5 15 2006 17 6 23 -1 -1
1 5 15 2006 17 12 31 -1 -1
1 5 15 2006 17 18 39 -1 -1
1 5 15 2006 17 24 46 -1 -1
1 5 15 2006 17 30 55 -1 -1
1 5 15 2006 17 37 3 -1 -1
1 5 15 2006 17 43 12 -1 -1
1 5 15 2006 17 49 20 -1 -1
1 5 15 2006 17 55 29 -1 -1
1 5 15 2006 18 1 36 -1 -1
1 5 15 2006 18 7 44 -1 -1
1 5 15 2006 18 13 53 -1 -1
1 5 15 2006 18 20 2 -1 -1
1 5 15 2006 18 26 12 -1 -1
1 5 15 2006 18 32 20 -1 -1
1 5 15 2006 18 38 29 -1 -1
1 5 15 2006 18 44 36 -1 -1
1 5 15 2006 18 50 45 -1 -1
1 5 15 2006 18 56 54 -1 -1
1 5 15 2006 19 3 3 -1 -1
1 5 15 2006 19 9 10 -1 -1
1 5 15 2006 19 15 18 -1 -1
1 5 15 2006 19 21 26 -1 -1
1 5 15 2006 19 27 34 -1 -1
1 5 15 2006 19 33 44 -1 -1
1 5 15 2006 19 39 53 -1 -1
1 5 15 2006 19 46 3 -1 -1
1 5 15 2006 19 52 12 -1 -1
1 5 15 2006 19 58 20 -1 -1
1 5 15 2006 20 4 30 -1 -1
1 5 15 2006 20 10 38 -1 -1
1 5 15 2006 20 16 50 -1 -1
1 5 15 2006 20 23 0 -1 -1
1 5 15 2006 20 29 9 -1 -1
1 5 15 2006 20 35 17 -1 -1
1 5 15 2006 20 41 24 -1 -1
1 5 15 2006 20 47 32 -1 -1
1 5 15 2006 20 53 40 -1 -1
1 5 15 2006 20 59 49 -1 -1
1 5 15 2006 21 5 59 -1 -1
1 5 15 2006 21 12 8 -1 -1
1 5 15 2006 21 18 16 -1 -1
1 5 15 2006 21 24 23 -1 -1
1 5 15 2006 21 30 31 -1 -1
1 5 15 2006 21 36 40 -1 -1
1 5 15 2006 21 42 49 -1 -1
1 5 15 2006 21 48 57 -1 -1
1 5 15 2006 21 55 5 -1 -1
1 5 15 2006 22 1 12 -1 -1
1 5 15 2006 22 7 20 -1 -1
1 5 15 2006 22 13 28 -1 -1
1 5 15 2006 22 19 38 -1 -1
1 5 15 2006 22 25 48 -1 -1
Maybe you are looking for
-
How to download adobe flash player onto MacBook pro
Hi, can anyone tell me how to download adobe flash player onto my new MacBook Pro with retina display please? I don't know what operating system it has?
-
PHP reads decimals with commas instead dots
I have a script that copies Oracle table to Firebird/Interbase. Oracle database is set to: NLS_NCHAR_CHARACTERSET AL16UTF16 NLS_LANGUAGE POLISH NLS_TERRITORY POLAND NLS_CURRENCY zl NLS_ISO_CURRENCY POLAND NLS_NUMERIC_CHARACTERS , I have a problem wit
-
PO errors.....?
hi gurus Can any body giv som solution for below error ..? While creating PO i m getting these below errors "1.No configuration yet maintained for material xxxx 2.Material xxxxx mainly procured internally (please check your input) 3.Configured BOM c
-
Are States a Big Part of Flex apps?
Hi, I'm a flex newbie and I've been making considerable progress in the past few weeks. I just learned about states and have been heavily experimenting with them. I just want to know if states are an essential part to making Flex apps or is it one
-
I have an HP Laserjet CP1515n -- 4 years old or so. It has been working great with our iMac until a few weeks ago, when the printer heads went out of alignment. It prints B&W fine, but color is a mess. I tried calibrating using the control pad --