on 04-18-2007 11:01 AM
Hi,
I defined in the context a field with type bigdecimal.
At the begining the field is null but if i enter something (go to the server),and after that i remove what i entered..now the field instead of having a null value has 0.
Florin
Florin,
*By default a varible value is null when its get declared.
*You can reassign as <b>null</b> for that variable.
Regards,
Ram.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Florin,
Once the object is initialized, by default it takes 0. So if you dont want any value to be displayed/stored, reinitialize to null.
Thanks.
Best Regards,
Shiva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
could you please let me know when do you want to use 0 and when you want to use null
you can take use of boolean values lets say flag, which will be set true if user fills something and then deletes it , just like what we have in wdmodifyView() , "Firsttime".
Same way you can set that flag to true in Modify(), so when it does server round trip it will be set to true and u can then track the change done by user
hope it helps
regards
Message was edited by:
Abhijeet
okay, so i understand there are two scenario,
1) when user explicitly set it to 0 and,
2) when he removes corrent value and let it be blank(in this case 0 gets stored after server round trip right?).
1) when user explicitly set it to 0 : In this case when application is about to do server round trip the value in input field is 0, ie value is 0 before it returns from server round trip, so you can directly check the value
2)when he removes corrent value and let it be blank : here there is nothing before server round trip so you can directly check this for blank, or if it is not 0 or any other value, coz in this scenario 0 gets stored after server round trip
hope it helps
regards
User | Count |
---|---|
81 | |
10 | |
10 | |
8 | |
7 | |
7 | |
7 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.