You are hereMonthly archive / December 2009
December 2009
FormPanel validation always succeeds without a Layout being a direct and only child of it
Checkout this link in the Coolite examples explorer. It demonstrates validating controls that are inside a FormPanel. I was working on a similar control hierarchy, but the isValid() method on FormPanel's form was always returning true, even when the form was invalid.
Content Size Adjustment for Localization in ASP.NET
I recently had a situation where many of the controls on my ASP.NET form (with a mixture of ASP.NET, custom & Coolite controls) needed size adjustment depending upon the language in which the form was rendered. Translation of content itself was not that such big a problem with ASP.NET's wonderful support for Localization based on locale-specific resource files.
I tried many options, and I am presenting 3 of them here, that can prove useful in various situations:
Serializing DateTime for client-side Coolite/ExtJs consumption
If you are trying to figure out why Coolite/ExtJs is giving an error while loading DateTime you serialized to Json manually (including serialization to json of records which contain Datetime fields), here is the answer.
Well, as far as I have seen, Coolite/ExtJs components (including the store) only accept one serialization format for DateTime fields, that is the sortable date/time pattern that conforms to ISO 8601 pattern.
Local Variables in a T-Sql loop are not really local
I found this the hard way out. Local variables in a T-Sql loop in Sql Server are not really local in the strict terms of a block-oriented programming language like C/C++.
e.g. In C++, if you have the following:
int i;
for (i = 0; i<=10; i++)
{
int *p = NULL;
if (p == NULL)
p = new int(1);
else
*p = *p + 1;
printf("%d", *p);
}
