This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Mozilla XML > May 2005 > XForms repeat question
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
XForms repeat question
|
|
| Alex Meyers 2005-05-19, 7:31 pm |
| Testing the repeat control in formsPlayer and Mozilla as the status page
(9.3.5) indicates that it shoudl work partial
(and guess what, different behaviour again, I am getting used to this :))
In formsPlayer the trigger "Insert after" works but the positioning is
always 1 off (the @voor and @na attributes where used to do some tracing
of positions, they show correct values 3 and 4 etc ...)
in Mozilla neither of the insert triggers work (and of course the
setvalue actions destroy the original data)
(the @voor and @na attributes show values 3 and 3 all the time)
Alex
---------------------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<!--This Document was edited using XFormation (Trial) by Focus Software
Limited on donderdag 19 mei 2005 at 14:13.-->
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events">
<head>
<xf:model>
<xf:instance xmlns="">
<cevi voor="" na="">
<persoon naam="Heijl" voornaam="Danny" />
<persoon naam="Meyers" voornaam="Alex" />
<persoon naam="Van Hauthem" voornaam="Andries" />
</cevi>
</xf:instance>
<xf:submission id="SaveLocal" action="./savelocal.xml" method="put"
replace="none" ref="/" />
<xf:submission
action="http://pcplatf01/Scripts/XForms/XForms.dll/ShowXML"
method="post" id="ShowXML" mediatype="application/xml"
encoding="iso-8859-1" includenamespaceprefixes="cevi" standalone="yes" />
</xf:model>
</head>
<body>
<xf:trigger>
<xf:label>Insert After</xf:label>
<xf:setvalue ev:event="DOMActivate" ref="@voor"
value="count(//persoon)" />
<xf:action ev:event="DOMActivate">
<xf:insert nodeset="persoon" at="count(//persoon)" position="after" />
<xf:setvalue ref="persoon[last()]/@naam" />
<xf:setvalue ref="persoon[last()]/@voornaam" />
<xf:setfocus control="naam" />
</xf:action>
<xf:setvalue ref="@na" value="count(//persoon)" ev:event="DOMActivate" />
<xf:setindex repeat="repeater" index="count(//persoon)"
ev:event="DOMActivate" />
</xf:trigger>
<xf:trigger>
<xf:label>Insert Before</xf:label>
<xf:action ev:event="DOMActivate">
<xf:insert nodeset="persoon" at="1" position="before" />
<xf:setvalue ref="/cevi/persoon[1]/@naam" />
<xf:setvalue ref="/cevi/persoon[1]/@voornaam" />
<xf:setindex repeat="repeater" index="1" />
<xf:setfocus control="naam" />
</xf:action>
</xf:trigger>
<br />
<xf:input ref="@voor">
<xf:label />
</xf:input>
<xf:input ref="@na">
<xf:label />
</xf:input>
<br />
<xf:submit submission="ShowXML">
<xf:label>ShowXML</xf:label>
</xf:submit>
<xf:submit submission="SaveLocal">
<xf:label>SaveLocal</xf:label>
</xf:submit>
<br />
<xf:repeat nodeset="persoon" id="repeater">
<xf:input ref="@naam" id="naam" />
<xf:input ref="@voornaam" />
<br />
</xf:repeat>
</body>
</html>
| |
| Allan Beaufour 2005-05-19, 7:31 pm |
| On Thursday 19 May 2005 15:07, Alex Meyers wrote:
> in Mozilla neither of the insert triggers work (and of course the
> setvalue actions destroy the original data)
> (the @voor and @na attributes show values 3 and 3 all the time)
What build are you using? My nightly build works fine.
--
Allan Beaufour
Novell Denmark
Novell, Inc., the leading provider of Net Business Solutions.
www.novell.com
| |
|
|
| Allan Beaufour 2005-05-20, 4:23 am |
| On Friday 20 May 2005 09:06, Alex Meyers wrote:
> Allan Beaufour wrote:
>
> [...]
>
> So following your nightly build question I then followed the URL to the
> nightly XPI trunk of Firefox
> (ftp://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/)
>
> So I installed 2005-05-19-07-trunk/windows-xpi/xforms.xpi
>
> Afterwards nothing of XForms worked anymore and Mozilla started asking
> about a default profile, something he hadn't done before
>
> So I uninstalled Mozilla completely and then reinstalled, everything
> works again as before
>
> So I suppose I need Firefox and not Mozilla ???
You need both a nightly build of the browser and the xforms xpi. I haven't
tried the Mozilla nightlies for some time, but I tried a Windows nightly of
firefox a couple of days ago. Worked fine. Try f.x.:
ftp://ftp.mozilla.org/pub/mozilla.o...2.installer.exe
and
ftp://ftp.mozilla.org/pub/mozilla.o...-xpi/xforms.xpi
--
Allan Beaufour
Novell Denmark
Novell, Inc., the leading provider of Net Business Solutions.
www.novell.com
| |
| Alex Meyers 2005-05-24, 4:23 am |
| Allan Beaufour wrote:
> On Friday 20 May 2005 09:06, Alex Meyers wrote:
>
>
>
> You need both a nightly build of the browser and the xforms xpi. I haven't
> tried the Mozilla nightlies for some time, but I tried a Windows nightly of
> firefox a couple of days ago. Worked fine. Try f.x.:
> ftp://ftp.mozilla.org/pub/mozilla.o...2.installer.exe
> and
> ftp://ftp.mozilla.org/pub/mozilla.o...-xpi/xforms.xpi
>
Thanks Allan,
works indeed with Firefox and XForms nightly of 19/5, but why not with
Mozilla, what is the difference ???
Alex
| |
| Allan Beaufour 2005-05-26, 7:44 pm |
| Tirsdag 24 maj 2005 08:38 skrev Alex Meyers:
> Allan Beaufour wrote:
> works indeed with Firefox and XForms nightly of 19/5, but why not with
> Mozilla, what is the difference ???
Between the Mozilla and FF xpi? Dunno in fact. But if FF works for you, let's
leave it be :-) Or create a bug on bugzilla.mozilla.org.
--
Allan Beaufour,
Novell Denmark
Novell® BrainShare® Barcelona 2005
11-15 September
The CCIB, Barcelona, Spain
www.novell.com/brainshare/europe
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|