Wednesday, October 13, 2010

Dynamic table - On multiple tabs

Updating tabular data in tabbed panel when table (repeat panel) is present on multiple tabs. And the data is coming from the same data source (notes document or oracle table).

All the data sources present in repeat panel would be saved on submit event (irrespective of the tab it belongs to , another bug). Which would cause save conflict.

Solution: set scope property of all data sources that point to tabular data to session

Monday, September 27, 2010

Thursday, August 26, 2010

java -jar xjc.jar schema1.xsd -p www.webserviceX.NET -d WWW
java -jar xjc.jar schema1.xsd -p www.webserviceX.NET -d WWW

Xpage article Link

Awesome article:

Sunday, August 15, 2010

If error msg is :

08/15/2010 04:26:06 PM Agent error: java.security.AccessControlException: Acce ss denied (java.util.logging.LoggingPermission control)


permission java.util.logging.LoggingPermission "control";

Tuesday, March 16, 2010

'Sys' is undefined in ASP.NET AJAX Web pages or trying to AJAX enable your exisitng Web Applicaitons.

Introduction
You might receive the error 'Sys' is undefined when running ASP.NET AJAX Web pages or trying to AJAX enable your exisitng Web Applicaitons.
Why this error?
This error occurs specifically when you try upgrading your existing ASP.NET 2.0 Applications to AJAX by using the ASP.NET AJAX controls like UpdatePanel, etc., The common cause for this error is that you havent updated the Web.Config file of the application to enable the runtime understand ASP.NET AJAX. Let me explain a little more.When you install ASP.NET AJAX your Visual Studio 2005 gets the toolbox updated with ASP.NET AJAX Server side controls like ScriptManager, ScriptManagerProxy, UpdatePanel, UpdateProgress etc., You already have your existing ASP.NET 2.0 application pages and you can add ScriptManager, UpdatePanel and other controls from Toolbox to your pages. When you run the page, you would get 'Sys' is undefined javascript error. The reason being that, your web.config of the existing ASP.NET 2.0 application misses certain settings that require to be added to make it understand the ASP.NET AJAX Server side controls like UpdatePanel, UpdateProgress etc.,
Resolution
To resolve the issue, I am providing herebelow the steps:-Open the Web.Config file and start adding the following settings to the same:- (Forewarning: Modifying Web.Config incorrectly makes your site inaccessible and I would suggest you take a back up of your existing web.config file before making the following changes. This article is intended for people with prior experience in dealing with web.config file, settings etc., and if you arent very convenient working with the Web.Config file, make your administrator or other experienced developers make these changes) 1. Below the tag, add the following settings:-












What we have done in this step is registering the System.Web.Extensions namespace, the assembly and its various handlers that are useful in handling AJAX for your ASP.NET 2.0 Application.2. Then, below the add the following settings:-





In this step, we registered the tagprefix of ASP for the ASP.NET AJAX Server controls like UpdatePanel so that we can use the same 3. Then find the and you need to replace this line with the following settings:-





This step enables compilation for your website and adds the reference assembly for System.Web.Extensions.4. Then below the compilation settings (above step), add the following:-









What we have done here is to register the Http Handler and specify that Web Services might be handled using Javascript (asynchronous callback) as well as add the ScriptModule Http Module.5. Then, after the
end tag, add the following system.web.extensions settings:-













In this step, we have additional steps where we can play with JSON Serialization settings and enabling some of the Application Services like AuthenticationService, ProfileService etc.,6. Thereafter, add the following system.webServer settings:-












The above steps registers the ScriptHandlerFactory for Webservices and the AXD that needs to handle the requests.Once you have added the above steps to your web.config file, you would be able to add ScriptManager, UpdatePanel and other ASP.NET AJAX Controls and would be able to run the page. This should solve the 'Sys' is undefined error message.These settings are not required if you are creating a "File - New - AJAX Enabled Website" using Visual Studio 2005 since all the above settings are added automatically to your web.config file.
Visual Studio 2008
Similarly, with Visual Studio 2008 any ASP.NET Website created will automatically have these settings as a part of the web.config file enabling you to directly use the ASP.NET AJAX Server side controls as well as the client scripts.

'Sys' is undefined - ASP.NET AJAX

Introduction
You might receive the error 'Sys' is undefined when running ASP.NET AJAX Web pages or trying to AJAX enable your exisitng Web Applicaitons.
Why this error?
This error occurs specifically when you try upgrading your existing ASP.NET 2.0 Applications to AJAX by using the ASP.NET AJAX controls like UpdatePanel, etc., The common cause for this error is that you havent updated the Web.Config file of the application to enable the runtime understand ASP.NET AJAX. Let me explain a little more.When you install ASP.NET AJAX your Visual Studio 2005 gets the toolbox updated with ASP.NET AJAX Server side controls like ScriptManager, ScriptManagerProxy, UpdatePanel, UpdateProgress etc., You already have your existing ASP.NET 2.0 application pages and you can add ScriptManager, UpdatePanel and other controls from Toolbox to your pages. When you run the page, you would get 'Sys' is undefined javascript error. The reason being that, your web.config of the existing ASP.NET 2.0 application misses certain settings that require to be added to make it understand the ASP.NET AJAX Server side controls like UpdatePanel, UpdateProgress etc.,
Resolution
To resolve the issue, I am providing herebelow the steps:-Open the Web.Config file and start adding the following settings to the same:- (Forewarning: Modifying Web.Config incorrectly makes your site inaccessible and I would suggest you take a back up of your existing web.config file before making the following changes. This article is intended for people with prior experience in dealing with web.config file, settings etc., and if you arent very convenient working with the Web.Config file, make your administrator or other experienced developers make these changes) 1. Below the tag, add the following settings:-












What we have done in this step is registering the System.Web.Extensions namespace, the assembly and its various handlers that are useful in handling AJAX for your ASP.NET 2.0 Application.2. Then, below the add the following settings:-





In this step, we registered the tagprefix of ASP for the ASP.NET AJAX Server controls like UpdatePanel so that we can use the same 3. Then find the and you need to replace this line with the following settings:-





This step enables compilation for your website and adds the reference assembly for System.Web.Extensions.4. Then below the compilation settings (above step), add the following:-









What we have done here is to register the Http Handler and specify that Web Services might be handled using Javascript (asynchronous callback) as well as add the ScriptModule Http Module.5. Then, after the
end tag, add the following system.web.extensions settings:-













In this step, we have additional steps where we can play with JSON Serialization settings and enabling some of the Application Services like AuthenticationService, ProfileService etc.,6. Thereafter, add the following system.webServer settings:-












The above steps registers the ScriptHandlerFactory for Webservices and the AXD that needs to handle the requests.Once you have added the above steps to your web.config file, you would be able to add ScriptManager, UpdatePanel and other ASP.NET AJAX Controls and would be able to run the page. This should solve the 'Sys' is undefined error message.These settings are not required if you are creating a "File - New - AJAX Enabled Website" using Visual Studio 2005 since all the above settings are added automatically to your web.config file.
Visual Studio 2008
Similarly, with Visual Studio 2008 any ASP.NET Website created will automatically have these settings as a part of the web.config file enabling you to directly use the ASP.NET AJAX Server side controls as well as the client scripts.

Tuesday, March 9, 2010

Issue : Calendar Extender Inside GridView and UpdatePanel

Problem Description:

The calendar extender works ok in a GridView. BUT if you put the Gridview inside an UpdatePanel, the Calendar does not draw properly and becomes unusable.

Links to codeplex thread
http://www.codeplex.com/AjaxControlToolkit/WorkItem/View.aspx?WorkItemId=8368

The imagebutton when clicked for the first time would display a calendar without the theme (transprant calender ) but once the date is select and the imagebutton is clicked for the secondtime (in the same browser session) the css would be loaded properly. Css is being loaded in the Autopostback associated with the textcontrol.

Applies to:

ASP.NET & Sharepoint

Issue faced in:
Trace Application

RCA:

The calendar extender-template field, image and associated calendar etender are not drawn on the page load event (since these are not visible initially and are made visible on RowEditing event of the gridview) Hence the required CSS (calendar.css) is not loaded on the pageload event which causes the calendar to draw without a theme.

Resolution:

Create another calenderextender, associated textcontrol and imagebutton (copy and paste the existing code from grigview-template field) outside of the updatepanel. Make sure these controls are not visible. These new controls would cause the css to be loaded in the page load event.

Link - http://forums.asp.net/p/1078690/1797384.aspx

Tuesday, February 9, 2010

AJAXToolkit:CalendarExtension usage simple example

Create a CSS stylesheet with name calendar.css and save to in the same directory having the asp.net web page in which you want to link it.
Copy and paste the following CSS code in calendar.css file.
CSS code:
.cal_Theme1 .ajax__calendar_container
{
background-color: #e2e2e2; border:solid 1px #cccccc;
}
.cal_Theme1 .ajax__calendar_header
{
background-color: #ffffff; margin-bottom: 4px;
}
.cal_Theme1 .ajax__calendar_title,
.cal_Theme1 .ajax__calendar_next,
.cal_Theme1 .ajax__calendar_prev
{
color: #004080; padding-top: 3px;
}
.cal_Theme1 .ajax__calendar_body
{
background-color: #e9e9e9; border: solid 1px #cccccc;
}
.cal_Theme1 .ajax__calendar_dayname
{
text-align:center; font-weight:bold; margin-bottom: 4px; margin-top: 2px;
}
.cal_Theme1 .ajax__calendar_day
{
text-align:center;
}
.cal_Theme1 .ajax__calendar_hover .ajax__calendar_day,
.cal_Theme1 .ajax__calendar_hover .ajax__calendar_month,
.cal_Theme1 .ajax__calendar_hover .ajax__calendar_year,
.cal_Theme1 .ajax__calendar_active
{
color: #004080; font-weight:bold; background-color: #ffffff;
}
.cal_Theme1 .ajax__calendar_today
{
font-weight:bold;
}
.cal_Theme1 .ajax__calendar_other,
.cal_Theme1 .ajax__calendar_hover .ajax__calendar_today,
.cal_Theme1 .ajax__calendar_hover .ajax__calendar_title
{
color: #bbbbbb;
}
HTML code for AJAX Calendar Control ASP.Net web page


AJAX Calendar Theme







TargetControlID="TextBox1" PopupPosition="Right">






Note: CssClass Property of ajaxToolkit CalendarExtender is set as cal_Theme1.
It will inherit the styles defined in the calendar.css file to change the look and feel of the calendar control.

ajaxtoolkit:calendarextension css properties

Calendar Css Classes

.ajax__calendar_container : The outer rectangular container that supplies the border around the calendar element. Child Css classes: .ajax__calendar_header,.ajax__calendar_body,.ajax__calendar_footer.
.ajax__calendar_header : A container element that holds the next and previous arrows and the title of the current view. Child Css classes: .ajax__calendar_prev, .ajax__calendar_title, .ajax__calendar_next.
.ajax__calendar_prev : An element that displays the arrow to view the previous set of data in the view(previous month/year/decade). Child Css classes: none.
.ajax__calendar_title : An element that displays the title of the current view (month name, year, decade). Child Css classes: none.
.ajax__calendar_next : An element that displays the arrow to view the previous set of data in the view (previous month/year/decade). Child Css classes: none.
.ajax__calendar_body : A container element that holds the days, months, and years panes. Also provides a fixed rectangle with hidden overflow that is used for transitioning between views (next/previous month, or days/months/years).Child Css class: .ajax__calendar_days, .ajax__calendar_months, .ajax__calendar_years.
.ajax__calendar_days : A container element that holds the layout for the days in a month. Child Css classes: .ajax__calendar_dayname, .ajax__calendar_day
.ajax__calendar_dayname : An element that displays the short name of the day of the week. Child Css classes: none.
.ajax__calendar_day : An element that displays the day of the month. Child Css classes: none
.ajax__calendar_months : A container element that holds the layout for the months in a year. Child Css classes: .ajax__calendar_month.
.ajax__calendar_month : An element that displays the month of the year. Child Css classes: none
.ajax__calendar_years : A container element that holds the layout for the years in a decade. Child Css classes: .ajax__calendar_year.
.ajax__calendar_year : An element that displays the year in a decade. Child Css classes: none
.ajax__calendar_footer : A container element that holds the current date. Child Css classes: .ajax__calendar_today.
.ajax__calendar_today : An element that displays the current date. Child Css classes: none.
.ajax__calendar_hover : This is applied to an element in the DOM above a day, month or year and is used to apply CSS attributes that show a hover state. Child Css classes: .ajax__calendar_day, .ajax__calendar_month, .ajax__calendar_year
.ajax__calendar_active : This is applied to an element in the DOM above a day, month or year and is used to apply CSS attributes that show the currently selected value. Child Css classes: .ajax__calendar_day, .ajax__calendar_month, .ajax__calendar_year.
.ajax__calendar_other : This is applied to an element in the DOM above a day or year that is outside of the current view (day not in the visible month, year not in the visible decade). Child Css classes: .ajax__calendar_day, .ajax__calendar_year.