setting format at runtime

Hi,I have to set the format of a textfield at runtime to null or to alphanumeric.Something like setFormatIn JSP i have given it as DATE format which cannot be changed.thxallam
[252 byte] By [Guest] at [2007-11-25 9:30:06]
# 1

Remove the JSP tag format attribute.

c

allambadshah wrote:

> Hi,

> I have to set the format of a textfield at runtime to null or to

> alphanumeric.

> Something like setFormat

>

> In JSP i have given it as DATE format which cannot be changed.

>

> thx

> allam

>

>

>

>

>

> To download the latest version of S1AF (JATO), please visit one of the

> following locations:

>

> Framework + IDE plugin for Sun ONE Studio 4 Update 1, Community Edition:

> <a href="http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_CE.html"> ;http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_CE.html</a>

>

> Framework + IDE pluign for Sun ONE Studio 4 Update 1, Enterprise Edition:

> <a href="http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_EE.html"> ;http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_EE.html</a>

>

> Previous versions of JATO:

> <a href="http://www.sun.com/software/download/developer/5102.html">http://www.s un.com/software/download/developer/5102.html</a>

>

>

[Non-text portions of this message have been removed]

Guest at 2007-7-1 16:36:32 > top of Java-index,Development Tools,Java Tools...
# 2

Iv tried using

TextField tf= (TextField)getChild

(CHILD_TXBULLETINSTARTDATE);

DisplayFieldDescriptor dfd = tf.getDescriptor();

if( condition)

{

dfd.setAttribute

(DisplayFieldDescriptor.FORMAT_ENABLED_PROP,"false");

dfd.setAttribute

(DisplayFieldDescriptor.FORMAT_TYPE_PROP,new Integer

(HtmlUtil.NO_FORMAT_TYPE));

dfd.setAttribute

(DisplayFieldDescriptor.FORMAT_MASK_PROP,"AlphaNumeric");

tf.setDescriptor(dfd);

}

return true;

--

or

--

if( condition)

{

dfd.setAttribute

(DisplayFieldDescriptor.FORMAT_ENABLED_PROP,"false");

dfd.setAttribute

(DisplayFieldDescriptor.FORMAT_TYPE_PROP,new Integer

(HtmlUtil.NO_FORMAT_TYPE));

dfd.setAttribute

(DisplayFieldDescriptor.FORMAT_MASK_PROP,"AlphaNumeric");

tf.setDescriptor(dfd);

tf = new TextField(tf.getParent(), tf.getModel

(), tf.getName(), tf.getBoundName(),tf.getValue(), dfd);

}

return true;

in begindsiplay of the child, but this doesnt seem to work.

My colleagues told ne that many DisplayFieldDescriptor properties

dont work.

Is this the case, y the above coding is not helping me at all.

I have also seen that the mask( or other such properties) are only

taken care at TAG's portion but not in bean children part. meaning

such properties are not used to set or bring in a change in TextField

but does bring channge in TextFieldTag and the likes.

Is my observation correct?

thx

allam

In <a href="/group/SunONE-JATO/post?protectID=246075234167171124217231170221059165026 144204051183019182055105236158076086020224">SunONE-JATO@yahoogroups.com</a >, "allambadshah

<<a href="/group/SunONE-JATO/post?protectID=243128235237038202169223000004147187136 158139046209">allambadshah@y...</a>>" <<a href="/group/SunONE-JATO/post?protectID=243128235237038202169223000004147187136 158139046209">allambadshah@y...</a>> wrote:

> Craig,

>

> not feasible in this context, its the same validation situation

that

> i have been telling to you,

> When a user enters invalid/junk data in date fields, he is

redirected

> back to that same page. At this moment when the junk is getting

> inserted into that date fields, i get ParseException.

> Currently i have blacked dates when returning with error.

> is there anything else possible.

>

> thx

> allam

>

> In <a href="/group/SunONE-JATO/post?protectID=246075234167171124217231170221059165026 144204051183019182055105236158076086020224">SunONE-JATO@yahoogroups.com</a >, "Craig V. Conover"

> <<a href="/group/SunONE-JATO/post?protectID=219212113009229091025149066024064239039 098031046209130">craig.conover@s...</a>> wrote:

> > Remove the JSP tag format attribute.

> > c

> >

> >

> > allambadshah wrote:

> >

> > > Hi,

> > > I have to set the format of a textfield at runtime to null or to

> > > alphanumeric.

> > > Something like setFormat

> > >

> > > In JSP i have given it as DATE format which cannot be changed.

> > >

> > > thx

> > > allam

> > >

> > >

> > >

> > >

> > >

> > >

> > > To download the latest version of S1AF (JATO), please visit one

> of the

> > > following locations:

> > >

> > > Framework + IDE plugin for Sun ONE Studio 4 Update 1, Community

> Edition:

> > >

>

<a href="http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_CE.html"> ;http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_CE.html</a>

> > >

> > > Framework + IDE pluign for Sun ONE Studio 4 Update 1,

Enterprise

> Edition:

> > >

>

<a href="http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_EE.html"> ;http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_EE.html</a>

> > >

> > > Previous versions of JATO:

> > > <a href="http://www.sun.com/software/download/developer/5102.html">http://www.s un.com/software/download/developer/5102.html</a>

> > >

> > >

> Service

> >

> >

> >

> >

> > [Non-text portions of this message have been removed]

Guest at 2007-7-1 16:36:32 > top of Java-index,Development Tools,Java Tools...
# 3

I'm not really understanding the full issue here.What is it that you

want to do versus what is happening?

c

allambadshah wrote:

> Craig,

>

> not feasible in this context, its the same validation situation that

> i have been telling to you,

> When a user enters invalid/junk data in date fields, he is redirected

> back to that same page. At this moment when the junk is getting

> inserted into that date fields, i get ParseException.

> Currently i have blacked dates when returning with error.

> is there anything else possible.

>

> thx

> allam

>

> In <a href="/group/SunONE-JATO/post?protectID=246075234167171124217231170221059165026 144204051183019182055105236158076086020224">SunONE-JATO@yahoogroups.com</a >, "Craig V. Conover"

> <<a href="/group/SunONE-JATO/post?protectID=219212113009229091025149066024064239039 098031046209130">craig.conover@s...</a>> wrote:

> > Remove the JSP tag format attribute.

> > c

> >

> >

> > allambadshah wrote:

> >

> > > Hi,

> > > I have to set the format of a textfield at runtime to null or to

> > > alphanumeric.

> > > Something like setFormat

> > >

> > > In JSP i have given it as DATE format which cannot be changed.

> > >

> > > thx

> > > allam

> > >

> > >

> > >

> > >

> > >

> > >

> > > To download the latest version of S1AF (JATO), please visit one

> of the

> > > following locations:

> > >

> > > Framework + IDE plugin for Sun ONE Studio 4 Update 1, Community

> Edition:

> > >

> <a href="http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_CE.html"> ;http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_CE.html</a>

> > >

> > > Framework + IDE pluign for Sun ONE Studio 4 Update 1, Enterprise

> Edition:

> > >

> <a href="http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_EE.html"> ;http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_EE.html</a>

> > >

> > > Previous versions of JATO:

> > > <a href="http://www.sun.com/software/download/developer/5102.html">http://www.s un.com/software/download/developer/5102.html</a>

> > >

> > >

> Service

> >

> >

> >

> >

> > [Non-text portions of this message have been removed]

>

>

>

>

>

>

> To download the latest version of S1AF (JATO), please visit one of the

> following locations:

>

> Framework + IDE plugin for Sun ONE Studio 4 Update 1, Community Edition:

> <a href="http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_CE.html"> ;http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_CE.html</a>

>

> Framework + IDE pluign for Sun ONE Studio 4 Update 1, Enterprise Edition:

> <a href="http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_EE.html"> ;http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_EE.html</a>

>

> Previous versions of JATO:

> <a href="http://www.sun.com/software/download/developer/5102.html">http://www.s un.com/software/download/developer/5102.html</a>

>

>

[Non-text portions of this message have been removed]

Guest at 2007-7-1 16:36:32 > top of Java-index,Development Tools,Java Tools...