[Xerte] Re: Implementing routed pages in a pageTemplates / toolkits environment

Tom Reijnders reijnders at tor.nl
Wed Oct 19 12:57:38 BST 2011


I think that the main issue Jonathan is referring to has nothing to do 
with Wizards/Page templates, but with the fact that you can't get to the 
name of an icon (or set it) in templates from the, ehmmm, wizard... (the 
xwd editor). If we can fix that, Jonathan can make his 'wizards' work in 
templates. That would be cool.

Jonathan? Did I understand the issue correctly? By the way, I think this 
discussion is more appropriate on the dev list.

Op 19-10-2011 12:40, Julian Tenney schreef:
>
> I'm not so familiar with the page wizards side of things, but I see 
> what you mean.
>
> From a templates side of things, would it work if you used the name, 
> and asked people to keep them unique? What you then say is that 
> because wizards don't have a name property, then for the author 
> there's messing about to do between the wizard and the icon properties?
>
>
> From my point of view, templates trump wizards as there are many more 
> users of templates.
>
> There is an id generated somewhere, but it's not user friendly if they 
> had to type it in.
>
> *From:* xerte-bounces at lists.nottingham.ac.uk 
> [mailto:xerte-bounces at lists.nottingham.ac.uk] *On Behalf Of *Kemp 
> Johnathan
> *Sent:* 19 October 2011 09:05
> *To:* Xerte discussion list
> *Subject:* [Xerte] Implementing routed pages in a pageTemplates / 
> toolkits environment
>
>  I am currently working on the scenario page that I demonstrated at 
> the recent Xerte Dev and I would like to be able to get this working 
> in a pageTemplates environment, but the way routed pages currently 
> operate will not transfer directly to a pageTemplates environment.
>
> What is required:
>
> A value that the page author can set as a unique identifier for a 
> page. This value will then be entered into the "destination" field of 
> another page so that the second page can send the user to the first 
> page when a condition is met. This value needs to be set from an xwd form.
>
> Solution in Page Wizards:
>
> Use the page icon's "Name" property. ( not ideal as this is not 
> accessible from the xwd form)
>
> When a page's destination field in an xwd form is populated with the 
> name of a page navigation to that page is achieved by
>
> 1. use getChildByName to obtain the pages xml
>
> 2. obtain the pages index by using .index() method of the xml
>
> 3. use gotoPage(page's index) to navigate to the page
>
> (the above is a little simplified but contains the key elements).
>
> This method has a couple of problems
>
> 1. In Page Wizards the page's details are set up in the xwd form, but 
> you have to remember to set the page "name" (and "title" for display 
> purposes) in the page Icon's property page. Ideally there would be a 
> way to pass the "name" value from the xwd form to the property page of 
> the icon.
>
> 2. In Page Templates there is no way (that I know of) for the page 
> author to access the "name" field of the page icon and hence no way to 
> set up a unique identifier for the page that can later be used to 
> access the pages index in either a framework or the interface.
>
> 3. In Page Templates the xwd form's "name" field is used to set the 
> Page Title display. This compromises the use of the name field in the 
> xwd for use as a destination as titles tend to be verbose and contain 
> spaces and may not be unique, whilst an identifier field would ideally 
> be concise and free of spaces. This could be solved by adding an 
> optional identifier field to an xwd form but there still would need to 
> be a way of using this to populate the page Icon's name field.
>
> Is there an approach I can use that I am unfamiliar with or is this an 
> opportunity for a new method to be added to the Xerte engine, e.g. a 
> setPageName() method?
>
> I note that rootIcon has a setPageTitle method but this does not 
> appear to change the underlying page property, i.e.
>
> if I create a page
>
> set the page icon's title property to "eric"
>
> run a script on the page with rootIcon.setPageTitle("fred");
>
> then when I preview the page
>
> The preview displays the page title as "fred",
>
> The page Icon's property page continues to show the title as "eric"
>
> Kind regards
>
> Johnathan
>
>
> This message and any attachment are intended solely for the addressee 
> and may contain confidential information. If you have received this 
> message in error, please send it back to me, and immediately delete 
> it. Please do not use, copy or disclose the information contained in 
> this message or in any attachment. Any views or opinions expressed by 
> the author of this email do not necessarily reflect the views of the 
> University of Nottingham.
>
> This message has been checked for viruses but the contents of an 
> attachment may still contain software viruses which could damage your 
> computer system: you are advised to perform your own checks. Email 
> communications with the University of Nottingham may be monitored as 
> permitted by UK legislation.
>
>
> _______________________________________________
> Xerte mailing list
> Xerte at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>
> This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.
>
> This message has been checked for viruses but the contents of an attachment
> may still contain software viruses which could damage your computer system:
> you are advised to perform your own checks. Email communications with the
> University of Nottingham may be monitored as permitted by UK legislation.
>
>    

-- 
--

Tom Reijnders
TOR Informatica
Chopinlaan 27
5242HM Rosmalen
Tel: 073 5226191
Fax: 073 5226196


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20111019/eea9ea0f/attachment.html>


More information about the Xerte mailing list