Orbeon Tutorial step 5.6

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Orbeon Tutorial step 5.6

Michael Moore-14
Sorry about the further messages about the Orbeon Tutorial. So far, it  
has taken me a week to get to step 5.6 due to trouble getting the  
tutorial to do what it indicates.

In step 5.6, a <select1> is added to the basic XForms document  
constructed in the previous steps. When the form is loaded, the  
tutorial indicates that a pop-up menu should appear. While the pop-up  
is represented in the HTML output as a <select>, it has class "xforms-
disabled" which the default styles set to disaplay:none. This happens  
under both Orbeon Forms 3.6 and the latest nightly build. (Although  
the constraint highlighting supposed to happen in step 5.5 does not  
happen with the nightly build.)

The contents of the document at this point is copied below in case I  
have made some error in copying it from the tutorial. Your tips and  
assistance are greatly appreciated. I swear I am going to get through  
this tutorial.

Thanks sincerely,

-Michael



----

<html xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
   xmlns:xs="http://www.w3.org/2001/XMLSchema"
   xmlns:xforms="http://www.w3.org/2002/xforms"
   xmlns:xhtml="http://www.w3.org/1999/xhtml"
   xmlns:ev="http://www.w3.org/2001/xml-events"
   xmlns="http://www.w3.org/1999/xhtml">
<head>
        <title>XForms Bookcast</title>
        <xforms:model>
                <xforms:instance id="books-instance">
                        <books xmlns="">
                                <book>
                                        <title/>
                                        <author/>
                                        <language/>
                                        <link/>
                                        <rating/>
                                        <notes/>
                                </book>
                        </books>
                </xforms:instance>
                <xforms:bind nodeset="book">
                        <xforms:bind nodeset="title" required="true()"/>
                        <xforms:bind nodeset="author" required="true()"/>
                </xforms:bind>
        </xforms:model>
</head>
<body>
        <xforms:group ref="book">
                <xforms:input ref="title">
                        <xforms:label>Title</xforms:label>
                </xforms:input>
                <br/>
                <xforms:input ref="author">
                        <xforms:label>Author</xforms:label>
                </xforms:input>
        </xforms:group>
        <xforms:select1 ref="language">
                <xforms:label>Language</xforms:label>
                <xforms:item>
                        <xforms:label>Choose one...</xforms:label>
                        <xforms:value/>
                </xforms:item>
                <xforms:item>
                        <xforms:label>English</xforms:label>
                        <xforms:value>en</xforms:value>
                </xforms:item>
                <xforms:item>
                        <xforms:label>French</xforms:label>
                        <xforms:value>fr</xforms:value>
                </xforms:item>
                <xforms:item>
                        <xforms:label>Spanish</xforms:label>
                        <xforms:value>es</xforms:value>
                </xforms:item>
        </xforms:select1>
</body>
</html>




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Orbeon Tutorial step 5.6

Alessandro Vernet
Administrator
Michael,

On Mar 11, 2009, at 11:57 AM, Michael Moore wrote:

> Sorry about the further messages about the Orbeon Tutorial. So far,  
> it has taken me a week to get to step 5.6 due to trouble getting the  
> tutorial to do what it indicates.

Thanks for including your code; it makes it much easier to see what is  
going on from our side. The drop-down doesn't show in your code,  
because the <xforms:select1 ref="language"> should be inside the  
<xforms:group ref="book">. The ref work in a hierarchical manner:

1) At the top of the view, you are at the level of the root element of  
your first instance (<books>).
2) Then inside the <xforms:group ref="book">, because of the ref you  
get at the level of the <book> element.
3) In the group, you can reference the <title> which is inside <book>  
with <xforms:input ref="title">.
4) But now if you are outside of the group, and put a <xforms:select1  
ref="language">, it is going to look for a <language> directly under  
<books>. It doesn't exist which means that the control is "non-
relevant" and isn't shown to the user.
5) When you look at the HTML markup, you see the control there hidden  
with a class because the we might have to show the control as the user  
interacts with the page if a <language> were to appear directly under  
<books>. (This won't happen in your example, but could happen if an  
<xforms:insert> or instance replacement was done.)

I put the updated code here: http://pastie.org/414349

I hope this helps,

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws