UIP Application Block Learning Series (9) elements of UIP Application Block-graph Navigator)

Source: Internet
Author: User

GraphnavigatorClass SourceNavigatorClass.View. Navigation Chart passedViewThe list encapsulates the workflow functions that can be transferred (Navigation graphs encapsulate workflow functionality through a list of views and allowed transitions). They allow you to check which one is in the user interface processViewExisting and valid transfer for each node. A navigation chart contains a Start Node, an end node, and0Or multiple nodes between them. Between the start and end nodes is a simple linear path, or contains branch and loop paths. 1. An example of a navigation chart is shown:

Create and start a graphical navigator and pass the name of the navigator as a parameter in the configuration file. If the navigator reloads a job, it passes along with the job information. When the startnavigationtask method is called, the graphic navigator confirms the job and the State object and State persistence provider are created. controller tells the graphic navigator to which node it should be passed, this is achieved by calling the navigate method and passing a node name as a parameter. The navigator checks the navigation chart in the uipconfigsettings class to ensure the transfer is legal. if the transfer is invalid, an exception is generated. A valid node also lists the subnodes of the current node or the specified shared transmission. ( A valid node is either listed as a child of the current node or specified in a shared transition. )

When usingUIP Application BlockWhen you are in yourXMLConfiguration File<Navigationgraph>Define a navigation chart. Each node element of each graph corresponds to oneView,Node element inclusion<Navigateto>It defines different paths. The followingCodeShowsXML.

<Navigationgraph

Iviewmanager = "winformviewmanager"

Name = "shopping"

State = "state"

Statepersist = "sqlserverpersiststate"

Startview = "cart">

<Node view = "cart">

<Navigateto navigatevalue = "resume" view = "browsecatalog"/>

<Navigateto navigatevalue = "checkout" view = "checkout"/>

<Navigateto navigatevalue = "fail" view = "error"/>

</Node>

<Node view = "browsecatalog">

<Navigateto navigatevalue = "additem" view = "cart"/>

<Navigateto navigatevalue = "fail" view = "error"/>

</Node>

<Node view = "error">

<Navigateto navigatevalue = "resume" view = "cart"/>

</Node>

<Node view = "checkout">

<Navigateto navigatevalue = "passcheckout" view = "congrats"/>

<Navigateto navigatevalue = "failcheckout" view = "checkout"/>

</Node>

<Node view = "congrats">

<Navigateto navigatevalue = "resume" view = "browsecatalog"/>

</Node>

</Navigationgraph>

Share Transfer in the graphics Navigator

An application Program may have a View, many or all nodes in the graph point to it. These views are shared transfer ( shared transitions ). This function is useful. For example, if you want to send errors to the same page, or you want to display a common help page. The shared transfer and repeated navigateto elements have the same effect. Any node specified transfer overrides global shared transfer. ( Any node-specific transitions override the global shared transitions. )

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.