Top.Mail.Ru
April 26th, 2006 - Java developers — LiveJournal
? ?

Java developers

April 26th, 2006

10:05 am - masha_q1

Not exactly a Java issue, but maybe someone will have some ideas...
I'm writing a web app using JSF and need to solve a localization issue. In the UI a user can select the language of the application(English, French). This setting is kept in a session backing bean and funneled to each subsequent page the user views by setting <f:view locale="#{mySessionBean.locale}"> . This works fine for simply translating the UI. However, I need to format the dates according to the actual user locale. So, for example, if the user wants to view the application in French, but is located in the states, he/she will see the French version but the dates will be formatted according to US standards.
Any ideas are greatly appreciated! Thanks.

05:33 pm - kc_kc_kc - Java Objects and Input Streams

Hi, my problem is this:

I have a LOAD method (from JasperReports API) that either takes in an XML file, an InputSource, or an InputStream object. My program loads an XML file and modifes it on-the-fly. Once I've modifed the XML file, how can I pass to that LOAD method without having to write the modified XML out to an actual file and then passing it to that method? Is there a way to pass java objects to InputStreams?

Thanks!
 

06:59 pm - albatordomi - Timer & update problems

Hi y'all, I've been a member for a while but this is the first time I've been so stumped that I actually post with a problem.

I'm writing an app for Java wireless/mobility. I dunno how this would make any difference but the problem is this:
Whenever I use a Timer which runs an instance of the Update class, I always have problems with whole swathes of the code not being read, even discounting the effect of the time interval being too short to allow the machine to read through the entire bytecode.
I mean, even code which is placed BEFORE the Timer object was instantiated seems not to be read. This is the only way I can account for my variables and objects not being initialised correctly.

Has anyone else had hassles with Timers in any variety of Java? How did you cope with them?
On my previous app I simply extended the period from 200ms to 250ms. I suppose this allowed the entire Update code to be read before the next iteration.
This time however, I fear I'm having problems of an entirely different kind, as described before ie: code which occurs before and outside the loop not being read.
Powered by LiveJournal.com