Article Network

Working with XML Documents in PHP jQuery

by Vijay Joshi | December 2010 | Open Source PHP

In this article, by Vijay Joshi, author of PHP jQuery Cookbook, we will cover:

  • Loading XML from files and strings using SimpleXML
  • Accessing elements and attributes using SimpleXML
  • Searching elements using XPath
  • Reading an XML using DOM extension
  • Creating an XML using DOM extension
  • Modifying an XML using DOM extension
  • Parsing XML with jQuery
Read Working with XML Documents in PHP jQuery in full

Working with Windows Phone Controls

by Lohith G.N. | June 2013 | Enterprise Articles Microsoft

Silverlight runtime for Windows Phone provides a variety of controls as part of the framework itself. This article by Lohith G.N., author of Windows Phone 7.5 Application Development with F#, is all about getting to know the controls supported by the framework and understanding how to work with those controls. We will go through each control, understand its usage, and finally learn how to write code to work with those controls.

Read Working with Windows Phone Controls in full

Working with Windows Phone Controls

by Lohith G.N. | June 2013 | Enterprise Articles Microsoft

Silverlight runtime for Windows Phone provides a variety of controls as part of the framework itself. This article by Lohith G.N., author of Windows Phone 7.5 Application Development with F#, is all about getting to know the controls supported by the framework and understanding how to work with those controls. We will go through each control, understand its usage, and finally learn how to write code to work with those controls.

Read Working with Windows Phone Controls in full

Working with Value Extractors and Simplifying Queries in Oracle Coherence 3.5

by Aleksandar Seovic Mark Falco Patrick Peralta | April 2010 | Oracle

Usually you can access data in the Coherence cache using identity-based operations, such as get and put. In many cases this will be exactly what you need, but there will also be many other situations where you either won't know an object's identity or you will simply need to look up one or more objects based on attributes other than the identity.

In this article by Aleksandar Seovic, Mark Falco and Patrick Peralta, authors of Oracle Coherence 3.5, we will cover:

  • Built-in filters for querying the Data Grid
  • Implementing a custom value extractor
  • Implementing a FilterBuilder class that will allow us to define the queries in a simpler way
Read Working with Value Extractors and Simplifying Queries in Oracle Coherence 3.5 in full

Working with User Defined Values in SAP Business One

by Gordon Du | June 2011 | Enterprise Articles SAP

The User-Defined Values function enables SAP Business One users to enter values, originated by a predefined search process, for any field in the system (including user-defined fields). This function enables the user to enter data more efficiently and – perhaps most importantly – more accurately. In fact, the concept is sort of a "Workflow Light" implementation. It can both save user time and reduce data double entries.

In this article by Gordon Du, author of Mastering SQL Queries for SAP Business One, we will see how to work with User-Defined Values.

Read Working with User Defined Values in SAP Business One in full

Working with Tooltips

by Alex Libby | December 2013 | Open Source Web Development

In this article by Alex Libby, the author of jQuery UI 1.10: The User Interface Library for jQuery, we will looked at how, with just a little underlying HTML and a single line of jQuery-flavored JavaScript, we can implement the default tooltip widget.

Introduced as a part of the HTML 3 standard, and using the title attribute as its text, tooltips are a common element used to provide context within a page. You could find them in use in a variety of situations, although it is most likely that they will be found when providing assistance in correcting errors as part of the submission of a form (particularly when it concerns payment for products!).

Read Working with Tooltips in full

Working with Time

by Sherry Li | September 2013 | Cookbooks Enterprise Articles

In this article by Sherry Li, author of MDX with Microsoft SQL Server 2012 Analysis Services Cookbook we will cover:

  • Calculating the YTD (Year-To-Date) value
  • Calculating the YoY (Year-over-Year) growth (parallel periods)
  • Calculating moving averages
Read Working with Time in full

Working with the Report Builder in Microsoft SQL Server 2008: Part 2

by Jayaram Krishnaswamy | April 2009 | .NET Microsoft

In the previous part of the article, we had a look at the Report Builder overview and described the Report Builder 2.0 interface. In this part by Jayaram Krishnaswamy, we will discuss about Enabling and reviewing My Reports, and will see how to Modify a basic report.

Read Working with the Report Builder in Microsoft SQL Server 2008: Part 2 in full

Working with the Report Builder in Microsoft SQL Server 2008: Part 1

by Jayaram Krishnaswamy | March 2009 | .NET Microsoft

Report Builder 2.0 is feature-rich reporting tool with the latest Microsoft Office look and feel. In this two part article by Jayaram Krishnaswamy, we will see how the Report Builder 2.0 provides an extremely flexible GUI with user friendly wizards for creating the Tablix data regions, a versatile construct that includes tables, matrix, and charts and gauges. Report Builder 2.0 supports server resources such as shared Data Sources, works with SQL Server Data Sources and many third party products, and can directly open and edit server hosted reports. Report Builder together with Report Manager provides powerful support for building and managing a bewildering array of report types.

Read Working with the Report Builder in Microsoft SQL Server 2008: Part 1 in full

Working with the Basic Components That Make Up a Three.js Scene

by Jos Dirksen | October 2013 | RAW Open Source Web Development

In this article by Jos Dirksen, the author of Learning Three.js: The JavaScript 3D Library for WebGL, we'll dive a bit deeper into the Three.js library and explain the basic components that make up a Three.js scene. In this article we'll explore the following topics:

  • Which components are used in a Three.js scene
  • What you can do with the THREE.Scene() object
  • How geometries and meshes are related
  • The difference between the orthographic camera and the perspective camera

We will start by looking at how you can create a scene and add objects.

Read Working with the Basic Components That Make Up a Three.js Scene in full

Working with Templates in Apache Roller 4.0

by | December 2009 | Beginner's Guides Content Management Java Open Source

This three part article series by Alfonso V. Romero, teaches you how to create and edit your first template in Roller, along with some basics about the Velocity template language, and how to create your first Roller theme from scratch. You'll also learn about Roller's model and data objects, and how to use these objects' properties, methods, and macros in a custom template to show data from your weblog.

Basically, in this article series you shall:

Read Working with Templates in Apache Roller 4.0 in full

Working with Simple Associations using CakePHP

by Ahsanul Bari Anupom Syam | December 2008 | MySQL Open Source PHP

Database relationship is hard to maintain even for a mid-sized PHP/MySQL application, particularly, when multiple levels of relationships are involved because complicated SQL queries are needed. CakePHP offers a simple yet powerful feature called 'object relational mapping' or ORM to handle database relationships with ease.In CakePHP, relations between the database tables are defined through association—a way to represent the database table relationship inside CakePHP. Once the associations are defined in models according to the table relationships, we are ready to use its wonderful functionalities. Using CakePHP's ORM, we can save, retrieve, and delete related data into and from different database tables with simplicity, in a better way—no need to write complex SQL queries with multiple JOINs anymore!
In this article by Ahsanul Bari and Anupom Syam, we will have a deep look at various types of associations and their uses. In particular, the purpose of this article is to learn:

  • How to figure out association types from database table relations
  • How to define different types of associations in CakePHP models
  • How to utilize the association for fetching related model data
  • How to relate associated data while saving
Read Working with Simple Associations using CakePHP in full

Working with SBS Services as a User: Part 2

by David Overton | April 2009 | .NET Microsoft

In the previous part of the article by David Overton, we discussed E-mail, Calendar, and Contact functionality of SBS 2008. In this part, we will discuss File Management and Remote access to the server, network, and services functionality provided by SBS 2008.

Read Working with SBS Services as a User: Part 2 in full

Working with SBS Services as a User: Part 1

by David Overton | April 2009 | .NET Microsoft

Your SBS 2008 server, network, computers, and users will now be configured for use. However, to get the business benefit, you will need to embed the use of the services and facilities into the user's psyche to enable them to benefit from it and use it.

In this two part article by David Overton, we will cover the following areas:

  • E-mail, Calendar, and Contacts
  • File Management
  • Remote access to the server, network, and services

In this part, we will discuss E-mail, Calendar, and Contact functionality of SBS 2008.

Read Working with SBS Services as a User: Part 1 in full

Working with Revision Logs in TortoiseSVN

by Lesley Harrison | January 2011 | Beginner's Guides Open Source

TortoiseSVN is a popular and easy-to-use Subversion client for Microsoft Windows. It is a Windows Shell extension, and is not limited to any particular IDE. TortoiseSVN is a free software which has been released under the GNU General Public License.

In this article by Lesley Harrison, author of TortoiseSVN 1.7, we shall learn about differences and changelists in TortoiseSVN 1.7

Read Working with Revision Logs in TortoiseSVN in full

Working with remote data

by James R. Lamar | August 2013 | Java Web Development

This article created by James R. Lamar, the author of Instant Kendo UI Grid, demonstrates how to work with remote data such as cross-domain JSONP.

Read Working with remote data in full

Working with Rails – Setting up and connecting to a database

by Elliot Smith Rob Nichols | November 2007 | Open Source

The first thing to grasp is that Rails is often referred to as opinionated software (see http://www.oreillynet.com/pub/a/network/2005/08/30/ruby-rails-david-heinemeier-hansson.html. It encapsulates an approach to web application development centered on good practice, emphasizing automation of common tasks and minimization of effort. Rails helps developers make good choices, and even removes the need to make choices where they are just distractions.

In this article, authors Elliot Smith and Rob Nichols explain the setup of a new Rails application and how to integrate it with other data sources.

Read Working with Rails – Setting up and connecting to a database in full

Working with Rails – ActiveRecord, Migrations, Models, Scaffolding, and Database Completion

by Elliot Smith Rob Nichols | November 2007 | Open Source

In the previous article, we covered setting up a new Rails application and connecting it to a database. In this article, we take this a little further and deal with ActiveRecord, Migrations, Models, the Scaffold, and demonstrate how to complete the Database with the required tables using migrations

Read Working with Rails – ActiveRecord, Migrations, Models, Scaffolding, and Database Completion in full

Working with Microsoft Dynamics AX Forms

by Mindaugas Pocius | May 2012 | Microsoft

Forms in Dynamics AX represent the user interface and are mainly used for entering or modifying data. They are also used for running reports, executing user commands, validating data, and so on.

Normally, forms are created using the AOT by creating a form object and adding form controls such as tabs, tab pages, grids, groups, data fields, images, and others. Form behavior is controlled by its properties or the code in its member methods. The behavior and layout of form controls are also controlled by their properties and the code in their member methods. Although it is very rare, forms can also be created dynamically from the code.

In this aticle by Mindaugas Pociusco-author of Microsoft Dynamics AX 2012 Development Cookbook, we will look at:

  • Creating a dialog
  • Handling a dialog event
  • Building a dynamic form
  • Adding a form splitter
  • Creating a modal form

Creating a dialog

Dialogs are a way to present users with a simple input form. They are commonly used for small user tasks, such as fi lling in report values, running batch jobs, presenting only the most important fi elds to the user when creating a new record, and so on. Dialogs are normally created from X++ code without storing actual layout in the AOT.

The application class Dialog is used to build dialogs. Other application classes, such as DialogField , DialogGroup , DialogTabPage , and others, are used to create dialog controls. A common way of using dialogs is within the RunBase framework classes, where user input is required.

In this example, we will demonstrate how to build a dialog from the code using the RunBase framework class . The dialog will contain customer table fi elds shown in different groups and tabs for creating a new record. There will be two tab pages, General and Details. The first page will have Customer account and Name input controls. The second page will be divided into two groups, Setup and Payment, with relevant fields inside each group. The actual record will not be created, as it is out of scope of this example. However, for demonstration purposes, the information specifi ed by the user will be displayed in the Infolog.

How to do it...

Carry out the following steps in order to complete this recipe:

  1. Open the AOT, and create a new class CustCreate with the following code:
  2. code 1

  3. In order to test the dialog, run the class. The following form should appear with the General tab page open initially:
  4. Click on the Details tab page to see the following screen:
  5. Enter some information into the fi elds and click on OK. The results are displayed in the Infolog:
  6. How it works...

    First, we create a new class CustCreate. By extending it from RunBase, we utilize a standard approach of developing data manipulation functions in Dynamics AX. The RunBase class defines a common structure and automatically adds additional controls, such as OK and Cancel buttons to the dialog. Then we declare class member variables, which will be used later. Variables of the DialogField type represent user input fields. Other variables are used to store the actual user input.

    The pack() and unpack() methods are normally used to convert an object to a container, which is a format to store an object in the user cache (SysLastValue) or to transfer it between Server and Client tiers. RunBase requires those two methods to be implemented in all its subclasses. In this example, we are not using any of the pack()/unpack() features, but because those methods are mandatory, we return an empty container from pack() and true from unpack().

    The layout of the actual dialog is constructed in the dialog() member method. Here, we define local variables for the dialog itself—tab pages and groups. Those variables, as opposed to the dialog fields, do not store any value for further processing.

    The super() of the RunBase framework creates the initial dialog object for us. The object is created using the Dialog application class. The class actually uses an AOT form named Dialog as a base, as a base, automatically adds the relevant controls, including OK and Cancel buttons, and presents it to the user as a dialog.

    Additional controls are added to the dialog by using the addField(), addGroup(), and addTabPage() methods. There are more methods to add different types of controls, such as addText(), addImage(), addMenuItemButton(), and others. All controls have to be added to the dialog object directly. Adding an input control to groups or tabs is done by calling addField() right after addGroup() or addTabPage(). In the previous example, we added tab pages, groups, and fields in logical sequence top down. Notice that it is enough only to add a second tab page, the first one labeled General is added automatically by the RunBase framework.

    Values from the dialog controls are assigned to variables by calling the value() member method of DialogField class. If a dialog is used within the RunBase framework, as in this example, the best place to assign dialog control values to variables is the getFormDialog() member method. RunBase calls this method right after the user clicks OK.

    The main processing is done in the run() method. For demonstration purposes, this class only shows the user input the Infolog.

    In order to make this class runnable, the static method main() has to be created. Here, we create a new CustCreate object, invoke user dialog by calling the prompt() method, and once the user finishes entering customer details by clicking OK, we call the run() method to process the data.

    Handling a dialog event

    Sometimes in the user interface, it is required to change the status of one field, depending on the status of another field. For example, if the user marks the Show filter checkbox, then another field, Filter, appears or becomes enabled. In AOT forms, this can be done using input control modified() event. However, if this feature is required on runtime dialogs, handling events are not that straightforward.

    Very often, existing dialogs have to be modified to support eventing. The easiest way of doing that is of course to convert a dialog into an AOT form. However, in cases when the existing dialog is complex enough, probably a more cost effective solution would be to implement dialog event handling instead of converting it into an AOT form. Event handling in dialogs is not as flexible as in AOT forms, but in most cases it does the job.

    In this recipe, we will create a dialog very similar to the previous one, but instead of entering the customer number, we will be able to select it from the list. Once the customer is selected, the rest of the fields will be completed automatically by the system from the customer record.

    How to do it...

    Carry out the following steps in order to complete this recipe:

    How it works...

    The new class CustSelect is actually a copy of the CustCreate class from the previous recipe with a few changes. In its class declaration, we leave all DialogField declarations and remove the rest of the variables.

    The methods pack()/unpack() remain the same as we are not using any of their features. In the dialog() member method, we call the allowUpdateOnSelectCtrl() method with the argument true to enable input control event handling. We also disable all controls apart from the Customer account by calling enable() with parameter false for each control. The member method dialogSelectCtrl() of the RunBase class is called every time the user modifies any input control in the dialog. It is the place where we have to add all the required code to ensure that, in our case, all controls are populated with the correct data from the customer record, once the Customer account is chosen.

    The static main() method ensures that we can run this class.

    There's more

    Usage of the dialogSelectCtrl() method sometimes might appear a bit limited as this method is only invoked when the dialog control loses its focus. Also, no other events can be controlled, and it can become messy if events on multiple controls need to be processed.

    The Dialog class does not provide direct access to the underlying form's event handling functions, but we can easily access the form object within the dialog. Although we cannot create the usual event handling methods on runtime form controls, we can still control this in a slightly different way. Let us modify the previous example to include more events. We will add an event on the second tab page, which is triggered once the page is activated.

    First, we have to override the dialogPostRun() method on the CustSelect class:

    code 3

    Here, we enable event overloading on the runtime form after it is fully created and is ready for displaying on the screen. We also pass the CustSelect object as an argument to the controlMethodOverloadObject() method to make sure that the form knows where the overloaded events are located.

    Next, we have to create a method that will be executed once the tab page is opened:

    code 4

    The method name consists of the control name and event name joined with an underscore. Now run the class again, and select the Details tab page. The message should be displayed in the Infolog.

    Before creating such methods, we first have to get the name of the runtime control. This is because the dialog form is created dynamically, and the system defines control names automatically without allowing the user to choose them. In this example, we have to temporarily add the following code to the bottom of the dialog(), which displays the name of the Details tab page control. Just replace the following code:

    code 5

    With the following code:

    code 6

    Running the class would display the name of the control in the Infolog.

    Note that this approach may not work properly if the dialog contains an automatically-generated query. In such cases, control names will change if the user adds or removes query ranges.

Read Working with Microsoft Dynamics AX Forms in full
Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software