A ServerPage app object allows two framework-supported methods: the InitializeComponent Sub and the OnPageEvent sub meant for handling events raised from the web page.
When adding the OnPageEvent method via the drop-down selection at the top of the IDE page within a ServerPage code tab, the following method stub is added (for a ServerPage called MyServerPage):
Protected Sub MyServerPage_OnPageEvent(ByVal ctl As NextGen.Framework.WebUI.HtmlBuilder.BaseCtl, ByVal evtArgs As NextGen.Framework.WebUI.HtmlBuilderEventArgs)
End Sub
The template sub has the "Handles" assignment missing from the end of the method signature. Without this, the method will not get called when page events are raised. To fix this, just add the following to the end of the signature: Handles Me.OnPageEvent. The above example would then look like this:
Protected Sub MyServerPage_OnPageEvent(ByVal ctl As NextGen.Framework.WebUI.HtmlBuilder.BaseCtl, ByVal evtArgs As NextGen.Framework.WebUI.HtmlBuilderEventArgs) Handles Me.OnPageEvents
End Sub
Showing posts with label IDE. Show all posts
Showing posts with label IDE. Show all posts
Thursday, 17 July 2014
Wednesday, 28 August 2013
External Assemblies - Referencing, Packaging and Applying Across Instances
To reference an external .net assembly in an application object:
- First add the DLL to the \inetpub\webui\bin folder.
- Go to the Code page of the app. object and select the References tab.
- Click the Add button next to References and in the popup window, scroll the tabs right and select the .net Assemblies tab.
- Select the name of the assembly, click the Select button then click OK.
When packaging an extracted object from another instance that references an external assembly, first copy the external assembly to the \utilities\utilities3e folder. Otherwise critical errors will be reported in the Utilities3e Package step and the operation will fail.
Tuesday, 23 October 2012
2.6 - Blank Fields in Report Headers
After upgrading to 3e 2.6 (from 2.5 CP12 in this case), field values in the headers of customised reports are no longer displayed. The report below is displayed with filed values in 2.5 but after upgrading, Client Name, Matter Name, Matter Number and an unlabelled Key Word field have missing values.
The issue is resolved by moving the fields into the group sections, rather than the header. In most cases this can be done without drastically altering the displayed layout:
The issue is resolved by moving the fields into the group sections, rather than the header. In most cases this can be done without drastically altering the displayed layout:
In this case the Key Word field, Client Name, Matter Name and Matter Number have been moved into the Matter grouping section and Currency Code moved to the Currency grouping section.
This new behaviour is welcome as having grouped values in the header is bad practice. The values displayed in 2.5 headers could be any of the distinct values that are returned from the grouping. It was not usually noticed in 2.5 as the reports are normally viewed for specific Matters, Clients etc. where grouped values are the same for each returned record.
Tuesday, 7 February 2012
Project Rename Produces Duplicate
In the IDE, right clicking on the Project node in the Project pane gives an option to "Rename Project ID".
On the face of it, renaming the Project seems to work as expected. However, if the IDE is refreshed (or closed and reopened), both a Project with the old name and a Project with the new name now exist. This can be seen by pressing the Open... button at the top of the Project pane.
To workaround this, best practice when renaming Projects would be to:
![]() |
| Renaming a Project in the 3e IDE |
To workaround this, best practice when renaming Projects would be to:
- Rename the Project.
- Save the Project.
- Refresh the IDE (Refresh button next to Logout).
- Open the Project with the old name.
- Delete the Project with the old name.
- Open the Project with the new name.
This avoids a build up of unnecessary, renamed Projects.
Friday, 3 February 2012
Exception Raising
The standard method of raising exceptions in 3e is to display them in the top Exception panel - the panel shared with other item lists such as the Worklist.
To raise an exception in this way, the Exception property of the Process's underlying Object must be set to an instance of the NxApplicationException class. For example, from within the Object:
Me.Exception = New NxApplicationException(New Guid("430e4f35-2834-46ea-b031-b718054c7f62"))
Or from a Process:
Me.ProfMaster.ProformaCollection(0).Exception = New NxApplicationException(New Guid("430e4f35-2834-46ea-b031-b718054c7f62"))
The GUID value is set to the Id of a Message that describes the error.
To remove the Exception, set the Exception property to null:
Me.Exception = Nothing
![]() |
| Exception raised in Proforma Generation Process |
Me.Exception = New NxApplicationException(New Guid("430e4f35-2834-46ea-b031-b718054c7f62"))
Or from a Process:
Me.ProfMaster.ProformaCollection(0).Exception = New NxApplicationException(New Guid("430e4f35-2834-46ea-b031-b718054c7f62"))
The GUID value is set to the Id of a Message that describes the error.
To remove the Exception, set the Exception property to null:
Me.Exception = Nothing
Thursday, 8 December 2011
Right-Click Cancel on Processes
![]() |
| Cancel a Process from the Action List |
For a right-click cancel to work, the Process must contain a path that leads to an end point without intervening steps.
![]() |
| Right-click cancel possible - A Process with a route to an end point with no steps (the bottom "Cancel" route) |
![]() |
| Right-click cancel not possible - A process without a "no-step" route to a end point |
When a Process does not contain a route without intermediate steps, an error is show when attempting to cancel from the Action List.
![]() |
| Error message from a failed right-click Process cancel |
![]() |
| The Else rule (selected in blue) before the end step |
This way, clean-up functionality can still run when the user cancels from the Action List.
Labels:
Code,
Dashboards,
Front End,
IDE,
Processes
Tuesday, 6 December 2011
Process Else Rules - Accessing the DataObject in Code
Within the Code tab of a Process, the Base Object can be accessed as a property. For example, the evaluation of CUSTOM rules can sometimes require a decision to be made based on a value contained within the Base Object.
However, this Base Object property is not accessible in Else rules. To access it, cast Me.Process to its type and then access individual objects though the object collection.
Public Overrides Sub OnRule()
For Each profMasterItem As ProfMaster In _
CType(Me.Process, NextGen.Application.Process.ProfProcess). _
ProfMasterCollection
NextMessage = profMasterItem.Description
Next
End Sub
![]() |
| Access to the ProfMaster Base Object from a custom rule in Process code |
Function Evaluate As System.Boolean
Return Me.IM_AutoBillEdit.IsOutsideProcess.Value(False)
End Function
However, this Base Object property is not accessible in Else rules. To access it, cast Me.Process to its type and then access individual objects though the object collection.
![]() |
| Access to the ProfMaster Base Object from an ELSE rule in Process code |
For Each profMasterItem As ProfMaster In _
CType(Me.Process, NextGen.Application.Process.ProfProcess). _
ProfMasterCollection
NextMessage = profMasterItem.Description
Next
End Sub
Wednesday, 5 October 2011
Spell Check
Spell check can be called natively on a Narrative type Attribute. In the Object, call Me.<AttributeName>.SpellCheck(), a pop-up window appears if any spelling mistakes are found.
Spell check can also be called on a Card Object by casting to an ICard type and calling RunSpellCheck().
Spell check can also be called on a Card Object by casting to an ICard type and calling RunSpellCheck().
Friday, 16 September 2011
Circular Dependency
Circular dependency in objects is not checked for on the save or build of individual files.
However, errors can arise when trying to:
If both of these processes fail, chances are that a circular dependency exists in at least one of the project's objects.
To find the culprit, build each object individually with a Build Type of 'All AppObjects that use <Obj_Name> (Runtime Only)'. A circular dependency exception will show in the build output of the problem object.
However, errors can arise when trying to:
- Using 'Build Project' from the context menu of a project in IDE.
- Using 'Update 3E - Extract' in the Upgrades section of Utilities 3E.
If both of these processes fail, chances are that a circular dependency exists in at least one of the project's objects.
To find the culprit, build each object individually with a Build Type of 'All AppObjects that use <Obj_Name> (Runtime Only)'. A circular dependency exception will show in the build output of the problem object.
Friday, 20 May 2011
Refresh Form Attributes
Quick Tip: To refresh a Form's available attributes - the drag and drop fields/controls, simply save the form. This is useful when the underlying Object's attributes have been changed and is quicker than a close, refresh, re-open of the Form.
Thursday, 19 May 2011
No Intellisense in IDE
No Intellisense showing in the IDE code page? CTRL + SPACE not showing the helpful drop down?
Sometimes this just happens, especially when the code contains errors. Usually, a CodeDOM rebuild (CTRL + SHIFT + B), then a code parse (CTRL + R) will solve the issue.
However, this doesn't always work - even though you are well within your rights to be shown some Intellisense. In that case, try closing and reopening the object. If that gives on joy, try restarting the IDE.
After that, you're on your own.
Sometimes this just happens, especially when the code contains errors. Usually, a CodeDOM rebuild (CTRL + SHIFT + B), then a code parse (CTRL + R) will solve the issue.
However, this doesn't always work - even though you are well within your rights to be shown some Intellisense. In that case, try closing and reopening the object. If that gives on joy, try restarting the IDE.
After that, you're on your own.
Tuesday, 3 May 2011
Form Labels Not Displayed/Updating
Sometimes, the text of a label on a Form is not displayed in the browser after making a change in the IDE. To force the label to update:
- In the IDE, load the project that contains the problem form.
- Right click the top most project node and select Build Project.
- For Build Type, select "All AppObjects that use any AppObject in <Project Name> (Runtime Only)" and click Start Build.
- After building, close all instances of browsers hosing 3e and open a new instance. The labels should now display correctly.
Tuesday, 5 April 2011
Code vs Collection Code
Applies to Objects and ReportObjects:
- Code interacts with each item (object) in the current dataset. Methods such as BeforeUpdate() and AfterPopulate() will run for each item. The collection that contains the object is accessed via Me.ParentCollection. Use this option for changing the behaviour of on-form controls, such as Attribute read only access and value validation.
- Collection Code runs against the whole dataset. Methods such as BeforeUpdate() and AfterPopulate() will run only once. Individual items in the collection can be access via Me.ActiveItems. Use this option when making comparisons over the whole dataset or when running finalising code after all data has been updated.
Events trigger at the item level before they trigger at the collection item. For example when saving to the database, AfterSave()will be called on the item, then on the item's collection.
Friday, 18 March 2011
Annoyance: Huge Default Report Parts
After creating a new report and giving the Root Object ID property a value, the Header, DetailsHeaderStandard, DetailStandard and Footer have their heights set to massive values. The height value of each has to be manually reduced to make it easier to work with.
Subscribe to:
Posts (Atom)










