Hi The dependencies are a set of other attributes : Right now I have some Labels and Textfields , 1. Label => Name, Textfield => Value 2. Now the Value attribute depends on attributes such as : a. Syntax => String data type => eg : "Integer", "Date/Time", "String" etc. b. Max Value => String data type => eg. "100" c. Min Value => String data type => eg. "10" Now, my question : Depending on the string passed in syntax, the Value (textfield)should format itself to accept the respective datatypes. i.e If a. Syntax => "integer", Value => Integer i/p only b. Syntax => "Date/Time", Value => format itself to accept Date/ Time only. For user i/p a calender should popup c. Syntax => "IPAddress", Value => format itself to accept IPAddress only I'm done with part (a). How do I go about doing part(b) and part(c) ?!!! I hope I'm clear this time. Thanks Meghna
Madhav Lakkapragada
Ranch Hand
Joined: Jun 03, 2000
Posts: 5040
posted
0
Thanks Meghna. Interesting problem. I have one question, When do I know abt the Syntax String, before my form shows up or after, I hit okay. I am assuming that its avail. before I display the form/textfield. Can I assume this? Pl. let me know. regds. - satya
Hi Right now, I'm initialising(hard coding) syntax as "String", "Integer" and so on. So, this data is available before my form shows up. since I already know the data in syntax, I should format my Value field likewise i.e "Hello", "23" and so on. But if it is "Hello" then, it should accept only Strings and it goes on that way. Bottomline, the data in Syntax carries the datatype of the Value field. Any inputs ?!! Thanks Meghna
Madhav Lakkapragada
Ranch Hand
Joined: Jun 03, 2000
Posts: 5040
posted
0
a. Syntax => "integer", Value => Integer i/p only b. Syntax => "Date/Time", Value => format itself to accept Date/ Time only. For user i/p a calender should popup c. Syntax => "IPAddress", Value => format itself to accept IPAddress only One way I would think of is fillin the text fields with the format you expect based on the syntax. then make the form visible. After the user hits ok/submit, validate the response. For Example:
This way the user will know what the system expects. Hope you would agree that if we allow user to fill in something and then validate it behind the scene and popup error msgs, it isn't user friendly. A second thought is because you already know what you are expecting, beside the text field, specify a label. Now set the text of this label based on the Syntax. Also, I would change the COLOR of the label text to be contrasting to the background (typically red) so it grabs the attention of the user when s/he is typing the input. This is a popular idea of saying what to expect in the textfield. I have seen this in many HTML forms for passwd's etc where they say password should be 8 chars or more and thing like that. So I think most users will already be familiar with this kinda approach. While I know little abt usability, these are my most sincere suggestions. HTH. regds. - satya
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.