• русский (Россия)
    • English (United States)
    • العربية (مصر)
    • Deutsch (Deutschland)
    • Español (España, alfabetización internacional)
    • français (France)
    • हिंदी (भारत)
    • italiano (Italia)
    • 日本語 (日本)
    • 한국어 (대한민국)
    • Nederlands (Nederland)
    • polski (Polska)
    • ไทย (ไทย)
    • Türkçe (Türkiye)
    • Tiếng Việt (Việt Nam)
    • 中文(中华人民共和国)
    • 中文(香港特別行政區)
  • Вход
  • Зарегистрироваться

DotNetAge

Скрыть боковую панель

Creating and managing widgets


    • Подаваемым на основании:
    • Content editing
  • 0


Overview



This article describes how to use DotNetAge widget editor to create widgets, and how to use the widget manager to register, update the widget catalog and save the widget installation package. This article focuses on the management of widgets and creating the html widgets. For more advanced development topics of widgets, please refer to [How to create widgets]

Widget manager



The widget manager use to register/unregistered the widgets to the widget catalog. Then the widget explorer list all registered widgets in widget catalog, allow users to add to the web page.

widget_man

Through the widget manager, administrators can visually understand the installation and use of each widget, if the widget definition file changes, widget manager automatically detects changes , and prompts the administrator synchronization the changes to the widget catalog.

Feature descriptions:
  • Detect - Discover the widgets within assembly files which not shows in widget manager.
  • Resolve - Conflict resolution and synchronization changes.When the widget manager found installed widget definition files and runtime version is not the same, or when the content has been changed, there will be "conflict" shows on the top of the widget list. Use this feature to update latest changes to the widget catalog and resolve the conflicts.
  • Export - Export the widget definition files to installation package that can be share to other DotNetAge web sites or upload to the DotNetAge gallery.
  • Edit - Edit the widget source code with the widget editor.
  • Register - Register the widget to the widget catalog that allow users to add it to the web page.
  • Unregistered - Remove the widget from the widget catalog.

Creating widgets



Select the "Widget->Create" on the top site console and use widget wizard to create a new widget:

widget_wizard


Widget engine



View engine will decide which language to develop a widget based on the actual use of your skills and needs.

  • Html- Use html and javascript to write the widget
  • ASP.NET Form- Use C# or vb in ASP.NET FORM synatx.
  • Razor - Use Razor synatx to write the widget.

There are some suggestions for choosing View Engine:
  1. Razor and ASP.NET Form are server side view engines differ only by writing syntax.They can better support the SEO and invoke the services on server. For server side developers they are the best choice.
  2. The Html engine is a client side html container,it has high preformance, independent thread and strong compatibility. It's a good choice for integrating with other external web pages or scripts.

Name



Specify the name of the widget, in the same category the widget name is unique. After the widget creation the name field can not be changed. (Note: the widget name can not be separated with a space)

Category



Specify what the widget will be stored in the category path, if you enter the class directory does not exist, it will automatically create the directory.

Title



The widget display title,it will be used as the default display text in widget header.

Icon



The default icon of the widget it will be display on the left of the widget header.

Image



The widget image that shows in WidgetExplorer and WidgetManager.

Description



Describe you widget ,it will be display in WidgetExplorer and WidgetManager.

Widget source code editor



When complete the widget creation form the DotNetAge will redirect to the widget source code editor and generate the base code for the widget. It looks like this:

widget_editor


After save the changes to server the widget source code editor will show the runtime result on the preview box.

Example:Create a GoogleMap widget




1.Using the widget creation form to create a Html Widget

google_map_form


2.Copy the Google Map source code from code.google.com and paste to the source code editor



<link href="http://code.google.com/apis/maps/documentation/javascript/examples/default.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true">script>



Save and view the runtime result:



3.Back to the widget manager and click "Register".
Register_GoogleMap

4.Open any dynamic web page design mode and click "Add content" then add the GoogleMap widget to the page.
add_content


 


    Average:
  • Читает
    (1095)
  • (0)
  • Постоянная ссылка
Предыдущий:Wiki markup reference
Следующий:Writing and posting articles
Доля в:

Комментарии (0)


  • rss
  • atom

Существует никаких комментариев, установленных в данной статье.
Valid XHTML 1.0!