You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Vicky <ja...@yahoo.com> on 2003/11/17 21:13:47 UTC

1.4 java files into 1.3

Since i am using websphere studio 5.1 which runs on jdk1.3 and i can't use any of the 1.4 swing classes. I have a a requirement to build mask input fields (for date and other format). In 1.4 i can use MaskFormatter and few other swing classes to build this. But i am stuck with 1.3. I also tried compiling those required 1.4 classes in 1.3 but seems like it(1.4) has dependency jar files and i can't use them in 1.3. Its not that simple so that i can include all dependent jar files into 1.3. This idea is not working properly. 
 
Also there is not a seperate swing jar file in 1.4 . Had it been there , it would have made my life easier by just including the jar into 1.3.
 
Does anyone have idea how to resolve this issue? 
 
Thanks,
Vicky


---------------------------------
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard

Re: 1.4 java files into 1.3

Posted by Christian Bollmeyer <ja...@christianbollmeyer.de>.
Am Montag, 17. November 2003 21:13 schrieb Vicky:
> Since i am using websphere studio 5.1 which runs on jdk1.3 and i
> can't use any of the 1.4 swing classes.

But this list is about web applications...and not about Swing. Then,
when it comes to web applications, you always have to deal
with raw Strings in the first place.You *can* of course even
try to validate Dates, but this is tricky in both Java script and
plain Java. There's no such thing as a MaskFormatter in
the web direction. You may, though, validate date Strings
against a pattern and then try to convert them to Dates,
but there's the localization issue involved, and AFAIK there
is no perfect pre-built solution available in this direction.
So there may be a reason why there are standard rules for
emails and credit card numbers, but none for Dates in
Validator, though those are much more common. Note
that when it comes to just formatting Dates and numbers
for display, the JSTL <fmt:*> tags are of great help. The
other way round is the trickier one, and up to now, I'm
doing this in plain Java and in a try..catch block, after
having validated the expected String format both in
JavaScript and Java, basically. 
 
> I have a a requirement to
> build mask input fields (for date and other format). In 1.4 i can use
> MaskFormatter and few other swing classes to build this. But i am
> stuck with 1.3. I also tried compiling those required 1.4 classes in
> 1.3 but seems like it(1.4) has dependency jar files and i can't use
> them in 1.3. Its not that simple so that i can include all dependent
> jar files into 1.3. This idea is not working properly.

Still don't know if your question is web-related, and
if not, you're lucky. But then, I would generally
stop at trying to back-port 1.4 specific features
to earlier Java versions just because you miss
them there. In this case, the problem generally
has to be solved otherwise. The latter is also
true for Swing projects. Java web validation
shouldn't depend on Swing releases and GUI
classes in general. That's a different battlefield. 

> Also there is not a seperate swing jar file in 1.4 . Had it been
> there , it would have made my life easier by just including the jar
> into 1.3.
>
> Does anyone have idea how to resolve this issue?

Probably not, I'm afraid.

> Thanks,
> Vicky

HTH,
-- Chris.


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org