Bug when inserting <xhtml:img> elements within <xforms:repeat>?

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

Bug when inserting <xhtml:img> elements within <xforms:repeat>?

Larry T. Chen
Hi All,

Normally Orbeon Forms prepends the webapp name to a absolute URL path in
an <img> element, for example <xhtml:img src="/images/delete.gif" >  
becomes <img src="/ops/images/delete.gif"> in the final output HTML if
the name of your webapp is "ops".  However, this automatic URL
manipulation is not happening when the <img> element is inserted via
xforms:insert.  See attached XForms-sandbox ready sample for a
demonstration of this problem.  The delete icon shows up fine on the
first row, but when additional rows are inserted, the icons do not
appear.  If you look at the HTML source, the img src URL in the inserted
rows remains the same as in the XForms source).
This does appear to be a bug.  Has anybody else seen this problem?

Larry T. Chen
Intelenet Communications, Inc.




--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Bug when inserting <xhtml:img> elements within <xforms:repeat>?

Ryan Puddephatt
Larry,
    Is it <img> or <xhtml:img> as I noticed in other case that Orbeon only prepend the context to elements in the xhtml namespace

Ryan

Ryan Puddephatt
Software Engineer
 
Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP
 
e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108
w> www.teleflex.com

"Measuring programming progress by lines of code is like measuring aircraft building progress by weight." - Bill Gates
"If you lie to the compiler, it will get its revenge." - Henry Spencer
"It's hard enough to find an error in your code when you're looking for it; it's even harder when you've assumed your code is error-free." - Steve McConnell
"If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization." - Gerald Weinberg



Larry T. Chen wrote:
Hi All,

Normally Orbeon Forms prepends the webapp name to a absolute URL path in an <img> element, for example <xhtml:img src="/images/delete.gif" >  becomes <img src="/ops/images/delete.gif"> in the final output HTML if the name of your webapp is "ops".  However, this automatic URL manipulation is not happening when the <img> element is inserted via xforms:insert.  See attached XForms-sandbox ready sample for a demonstration of this problem.  The delete icon shows up fine on the first row, but when additional rows are inserted, the icons do not appear.  If you look at the HTML source, the img src URL in the inserted rows remains the same as in the XForms source).
This does appear to be a bug.  Has anybody else seen this problem?
Larry T. Chen
Intelenet Communications, Inc.



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


--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Bug when inserting <xhtml:img> elements within <xforms:repeat>?

Erik Bruchez
Administrator
In reply to this post by Larry T. Chen
Larry,

Where is your xhtml:img located? Is it within XForms markup such as a
label, or just in plain XHTML markup?

If it's within XForms markup, you may be hitting this bug:

http://forge.objectweb.org/tracker/index.php?func=detail&aid=306602&group_id=168&atid=350207

Do you have a simple reproducible case you could send?

-Erik

Larry T. Chen wrote:

> Hi All,
>
> Normally Orbeon Forms prepends the webapp name to a absolute URL path in
> an <img> element, for example <xhtml:img src="/images/delete.gif" >  
> becomes <img src="/ops/images/delete.gif"> in the final output HTML if
> the name of your webapp is "ops".  However, this automatic URL
> manipulation is not happening when the <img> element is inserted via
> xforms:insert.  See attached XForms-sandbox ready sample for a
> demonstration of this problem.  The delete icon shows up fine on the
> first row, but when additional rows are inserted, the icons do not
> appear.  If you look at the HTML source, the img src URL in the inserted
> rows remains the same as in the XForms source).
> This does appear to be a bug.  Has anybody else seen this problem?
> Larry T. Chen
> Intelenet Communications, Inc.
>
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Bug when inserting <xhtml:img> elements within <xforms:repeat>?

Larry T. Chen
Erik,

Yes, the xhtml:img is located within xforms:label.   Sounds like it may be the same bug as #306602.  Attached is a sample for the XForms sandbox.

Larry

Erik Bruchez wrote:
Larry,

Where is your xhtml:img located? Is it within XForms markup such as a label, or just in plain XHTML markup?

If it's within XForms markup, you may be hitting this bug:

http://forge.objectweb.org/tracker/index.php?func=detail&aid=306602&group_id=168&atid=350207

Do you have a simple reproducible case you could send?

-Erik

Larry T. Chen wrote:
Hi All,

Normally Orbeon Forms prepends the webapp name to a absolute URL path in an <img> element, for example <xhtml:img src="/images/delete.gif" >  becomes <img src="/ops/images/delete.gif"> in the final output HTML if the name of your webapp is "ops".  However, this automatic URL manipulation is not happening when the <img> element is inserted via xforms:insert.  See attached XForms-sandbox ready sample for a demonstration of this problem.  The delete icon shows up fine on the first row, but when additional rows are inserted, the icons do not appear.  If you look at the HTML source, the img src URL in the inserted rows remains the same as in the XForms source).
This does appear to be a bug.  Has anybody else seen this problem?
Larry T. Chen
Intelenet Communications, Inc.



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



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

repeat-img-problem.xhtml (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Bug when inserting <xhtml:img> elements within <xforms:repeat>?

Larry T. Chen
In reply to this post by Ryan Puddephatt
Ryan,

    It's <xhtml:img> within <xforms:label>.  Sorry for the confusion.  It does appear to be a known bug with the Orbeon Forms AJAX processing as Erik has indicated.  Only workaround I can think of is to refer to an absolute URL including hostname.  Anybody know of a different workaround?

Larry

Ryan Puddephatt wrote:
Larry,
    Is it <img> or <xhtml:img> as I noticed in other case that Orbeon only prepend the context to elements in the xhtml namespace

Ryan

Ryan Puddephatt
Software Engineer
 
Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP
 
e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108
w> www.teleflex.com

"Measuring programming progress by lines of code is like measuring aircraft building progress by weight." - Bill Gates
"If you lie to the compiler, it will get its revenge." - Henry Spencer
"It's hard enough to find an error in your code when you're looking for it; it's even harder when you've assumed your code is error-free." - Steve McConnell
"If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization." - Gerald Weinberg



Larry T. Chen wrote:
Hi All,

Normally Orbeon Forms prepends the webapp name to a absolute URL path in an <img> element, for example <xhtml:img src="/images/delete.gif" >  becomes <img src="/ops/images/delete.gif"> in the final output HTML if the name of your webapp is "ops".  However, this automatic URL manipulation is not happening when the <img> element is inserted via xforms:insert.  See attached XForms-sandbox ready sample for a demonstration of this problem.  The delete icon shows up fine on the first row, but when additional rows are inserted, the icons do not appear.  If you look at the HTML source, the img src URL in the inserted rows remains the same as in the XForms source).
This does appear to be a bug.  Has anybody else seen this problem?
Larry T. Chen
Intelenet Communications, Inc.



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

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



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Bug when inserting <xhtml:img> elements within <xforms:repeat>?

Ryan Puddephatt
Larry,
    I have had a problem where OF doens't rewrite <xhtml:a>, but rewrites <a>. It could be the same for <xhtml:img> and <img>.

Ryan

Ryan Puddephatt
Software Engineer
 
Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP
 
e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108
w> www.teleflex.com

"Measuring programming progress by lines of code is like measuring aircraft building progress by weight." - Bill Gates
"If you lie to the compiler, it will get its revenge." - Henry Spencer
"It's hard enough to find an error in your code when you're looking for it; it's even harder when you've assumed your code is error-free." - Steve McConnell
"If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization." - Gerald Weinberg



Larry T. Chen wrote:
Ryan,

    It's <xhtml:img> within <xforms:label>.  Sorry for the confusion.  It does appear to be a known bug with the Orbeon Forms AJAX processing as Erik has indicated.  Only workaround I can think of is to refer to an absolute URL including hostname.  Anybody know of a different workaround?

Larry

Ryan Puddephatt wrote:
Larry,
    Is it <img> or <xhtml:img> as I noticed in other case that Orbeon only prepend the context to elements in the xhtml namespace

Ryan

Ryan Puddephatt
Software Engineer
 
Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP
 
e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108
w> www.teleflex.com

"Measuring programming progress by lines of code is like measuring aircraft building progress by weight." - Bill Gates
"If you lie to the compiler, it will get its revenge." - Henry Spencer
"It's hard enough to find an error in your code when you're looking for it; it's even harder when you've assumed your code is error-free." - Steve McConnell
"If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization." - Gerald Weinberg



Larry T. Chen wrote:
Hi All,

Normally Orbeon Forms prepends the webapp name to a absolute URL path in an <img> element, for example <xhtml:img src="/images/delete.gif" >  becomes <img src="/ops/images/delete.gif"> in the final output HTML if the name of your webapp is "ops".  However, this automatic URL manipulation is not happening when the <img> element is inserted via xforms:insert.  See attached XForms-sandbox ready sample for a demonstration of this problem.  The delete icon shows up fine on the first row, but when additional rows are inserted, the icons do not appear.  If you look at the HTML source, the img src URL in the inserted rows remains the same as in the XForms source).
This does appear to be a bug.  Has anybody else seen this problem?
Larry T. Chen
Intelenet Communications, Inc.



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

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


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


--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Bug when inserting <xhtml:img> elements within <xforms:repeat>?

Joseph Lawrence
In reply to this post by Larry T. Chen
Larry,
    I presume it would be better if you use relative url within the @src of img than absolute URL.
    As a workaround you can do the following:
suppose your current url is:
http://localhost:8080/ops/current-page

then in the trigger you can have
<xforms:trigger appearance="minimal">
    <xforms:label>
        <img src="../apps/xforms-todo/images/remove.gif"/>Delete
    </xforms:label>
</xforms:trigger>

Using the '../' helps you get rid of the dependency on the context name. Hence if your current url is http://localhost:8080/ops/current-page/abc use '<img src="../../apps/xforms-todo/images/remove.gif"/>'
Hope this works

Thanks
Joseph Lawrence
Stabilix Solutions

"Larry T. Chen" <[hidden email]> wrote:
Ryan,

    It's <xhtml:img> within <xforms:label>.  Sorry for the confusion.  It does appear to be a known bug with the Orbeon Forms AJAX processing as Erik has indicated.  Only workaround I can think of is to refer to an absolute URL including hostname.  Anybody know of a different workaround?

Larry

Ryan Puddephatt wrote:
Larry,
    Is it <img> or <xhtml:img> as I noticed in other case that Orbeon only prepend the context to elements in the xhtml namespace

Ryan
Ryan Puddephatt
Software Engineer
 
Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP
 
e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108
w> www.teleflex.com
"Measuring programming progress by lines of code is like measuring aircraft building progress by weight." - Bill Gates
"If you lie to the compiler, it will get its revenge." - Henry Spencer
"It's hard enough to find an error in your code when you're looking for it; it's even harder when you've assumed your code is error-free." - Steve McConnell
"If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization." - Gerald Weinberg


Larry T. Chen wrote:
Hi All,

Normally Orbeon Forms prepends the webapp name to a absolute URL path in an <img> element, for example <xhtml:img src="/images/delete.gif" >  becomes <img src="/ops/images/delete.gif"> in the final output HTML if the name of your webapp is "ops".  However, this automatic URL manipulation is not happening when the <img> element is inserted via xforms:insert.  See attached XForms-sandbox ready sample for a demonstration of this problem.  The delete icon shows up fine on the first row, but when additional rows are inserted, the icons do not appear.  If you look at the HTML source, the img src URL in the inserted rows remains the same as in the XForms source).
This does appear to be a bug.  Has anybody else seen this problem?
Larry T. Chen
Intelenet Communications, Inc.



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

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


--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws


Ahhh...imagining that irresistible "new car" smell?
Check out new cars at Yahoo! Autos.

--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Bug when inserting <xhtml:img> elements within <xforms:repeat>?

Erik Bruchez
Administrator
In reply to this post by Larry T. Chen
Larry,

Yes, it seems to be the same bug. Thanks for the test case, I attached
it to the bug. In the meanwhile, try using relative paths if you can.

-Erik

Larry T. Chen wrote:

> Erik,
>
> Yes, the xhtml:img is located within xforms:label.   Sounds like it may
> be the same bug as #306602.  Attached is a sample for the XForms sandbox.
>
> Larry
>
> Erik Bruchez wrote:
>> Larry,
>>
>> Where is your xhtml:img located? Is it within XForms markup such as a
>> label, or just in plain XHTML markup?
>>
>> If it's within XForms markup, you may be hitting this bug:
>>
>> http://forge.objectweb.org/tracker/index.php?func=detail&aid=306602&group_id=168&atid=350207 
>>
>>
>> Do you have a simple reproducible case you could send?
>>
>> -Erik
>>
>> Larry T. Chen wrote:
>>> Hi All,
>>>
>>> Normally Orbeon Forms prepends the webapp name to a absolute URL path
>>> in an <img> element, for example <xhtml:img src="/images/delete.gif"
>>> >  becomes <img src="/ops/images/delete.gif"> in the final output
>>> HTML if the name of your webapp is "ops".  However, this automatic
>>> URL manipulation is not happening when the <img> element is inserted
>>> via xforms:insert.  See attached XForms-sandbox ready sample for a
>>> demonstration of this problem.  The delete icon shows up fine on the
>>> first row, but when additional rows are inserted, the icons do not
>>> appear.  If you look at the HTML source, the img src URL in the
>>> inserted rows remains the same as in the XForms source).
>>> This does appear to be a bug.  Has anybody else seen this problem?
>>> Larry T. Chen
>>> Intelenet Communications, Inc.
>>>
>>
>> ------------------------------------------------------------------------
>>
>>
>> --
>> 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
>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>>  
>

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Bug when inserting <xhtml:img> elements within <xforms:repeat>?

Ryan Puddephatt
Larry/Erik,
    I tried the example, and removed the xhtml prefix on the img and it works fine.

HTH

Ryan

Ryan Puddephatt
Software Engineer
 
Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP
 
e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108
w> www.teleflex.com

"Measuring programming progress by lines of code is like measuring aircraft building progress by weight." - Bill Gates
"If you lie to the compiler, it will get its revenge." - Henry Spencer
"It's hard enough to find an error in your code when you're looking for it; it's even harder when you've assumed your code is error-free." - Steve McConnell
"If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization." - Gerald Weinberg



Erik Bruchez wrote:
Larry,

Yes, it seems to be the same bug. Thanks for the test case, I attached it to the bug. In the meanwhile, try using relative paths if you can.

-Erik

Larry T. Chen wrote:
Erik,

Yes, the xhtml:img is located within xforms:label.   Sounds like it may be the same bug as #306602.  Attached is a sample for the XForms sandbox.

Larry

Erik Bruchez wrote:
Larry,

Where is your xhtml:img located? Is it within XForms markup such as a label, or just in plain XHTML markup?

If it's within XForms markup, you may be hitting this bug:

http://forge.objectweb.org/tracker/index.php?func=detail&aid=306602&group_id=168&atid=350207

Do you have a simple reproducible case you could send?

-Erik

Larry T. Chen wrote:
Hi All,

Normally Orbeon Forms prepends the webapp name to a absolute URL path in an <img> element, for example <xhtml:img src="/images/delete.gif" >  becomes <img src="/ops/images/delete.gif"> in the final output HTML if the name of your webapp is "ops".  However, this automatic URL manipulation is not happening when the <img> element is inserted via xforms:insert.  See attached XForms-sandbox ready sample for a demonstration of this problem.  The delete icon shows up fine on the first row, but when additional rows are inserted, the icons do not appear.  If you look at the HTML source, the img src URL in the inserted rows remains the same as in the XForms source).
This does appear to be a bug.  Has anybody else seen this problem?
Larry T. Chen
Intelenet Communications, Inc.


------------------------------------------------------------------------


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




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


--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Bug when inserting <xhtml:img> elements within <xforms:repeat>?

Alessandro Vernet
Administrator
On 4/17/07, Ryan Puddephatt <[hidden email]> wrote:
>      I tried the example, and removed the xhtml prefix on the img and it
> works fine.

I guess this is one way to get around it :). But using a relative
path, if possible, looks like a cleaner work-around.

Alex
--
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.com/



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Bug when inserting <xhtml:img> elements within <xforms:repeat>?

Ryan Puddephatt
Alex,
    You are still able to use a relative url with this method, it the bug is specific to elements in the xhtml namespace

Ryan

Ryan Puddephatt
Software Engineer
 
Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP
 
e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108
w> www.teleflex.com

"Measuring programming progress by lines of code is like measuring aircraft building progress by weight." - Bill Gates
"If you lie to the compiler, it will get its revenge." - Henry Spencer
"It's hard enough to find an error in your code when you're looking for it; it's even harder when you've assumed your code is error-free." - Steve McConnell
"If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization." - Gerald Weinberg



Alessandro Vernet wrote:
On 4/17/07, Ryan Puddephatt [hidden email] wrote:
     I tried the example, and removed the xhtml prefix on the img and it
works fine.

I guess this is one way to get around it :). But using a relative
path, if possible, looks like a cleaner work-around.

Alex

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


--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Different Ref points

NJ No1

Hey gang,

 

I was wondering if there is anyway to call a certain reference path. It’s hard to explain but if you look at the code below I’m trying to print a list of servers for each business with radio buttons. I want the server chosen to be stored in ‘request_instance’/target. However once I get into the select1 statement the reference point now becomes the request_instance and I cant access where I am in the repeat statement.

 

Any ideas what I can do?

 

Thanks
NJ

 

<xforms:repeat nodeset="instance('user_instance')/servers/weblogic/business">

            <xforms:select1 ref="instance('request_instance')/target" appearance="full" style="font-weight:bold;">

                        <xforms:item>

                              <xforms:label ref="./domain/TestEnvironment/cluster/clusterName"/>

                              <xforms:value ref="./domain/TestEnvironment/cluster/clusterName"/>

                        </xforms:item>

            </xforms:select1>

</xforms:repeat>       

 

User_instance:

<servers>

<weblogic>

    <business>

            <name>Mortgages</name>

            <domain>

                <name>mortgagesTestDomain</name>

                <role>OLS_Operator</role>

                <TestEnvironment>

                    <cluster>

                        <clusterName>mmusaTestCluster</clusterName>

                        <server>mmusaTestServer1</server>

                        <server>mmusaTestServer2</server>

                    </cluster>

                    <adminServer>mortgagesTestAdminServer</adminServer>

                    <machine>ecsydtst01/02</machine>

                </TestEnvironment>

            </domain>

    </business>

    <business>

            <name>FMG</name>

            <domain>

                <name>fmgDomain</name>

                <role>OLS_Operator</role>

                <TestEnvironment>

                    <cluster>

                        <clusterName/>

                        <server>fmgServer1</server>

                        <server>fmgServer1</server>

                    </cluster>

                    <adminServer>fmgAdminServer</adminServer>

                    <machine>ecsydtst05</machine>

                </TestEnvironment>

            </domain>

    </business>

</weblogic>

</servers>

NOTICE

This e-mail and any attachments are confidential and may contain copyright material of Macquarie Bank or third parties. If you are not the intended recipient of this email you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. Macquarie Bank does not guarantee the integrity of any emails or any attached files. The views or opinions expressed are the author's own and may not reflect the views or opinions of Macquarie Bank.



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Different Ref points

Erik Bruchez
Administrator
Naman Joshi wrote:

 > I was wondering if there is anyway to call a certain reference path.
 > It’s hard to explain but if you look at the code below I’m trying to
 > print a list of servers for each business with radio buttons. I want
 > the server chosen to be stored in ‘request_instance’/target. However
 > once I get into the select1 statement the reference point now
 > becomes the request_instance and I cant access where I am in the
 > repeat statement.

What you mean is that the XPath context node changes.

 > Any ideas what I can do?

This is an excellent question, and I think you pointed one of the
really annoying issues with XForms at the moment.

To help solve this, we introduced an extension function called
xxforms:repeat-current(). It is documented here:

   http://www.orbeon.com/ops/doc/reference-xforms-ng#ops-extensions

Then you can write:

   <xforms:label ref="xxforms:repeat-current()/domain/..."/>

We think that variables in XForms could solve this very nicely and
legibly, as they do in XSLT. E.g. you could write:

<xforms:repeat ...>
   <xforms:variable name="current-repeat" select="."/>
   <xforms:select1 ref="...">
     ...
       <xforms:label ref="$current-repeat/domain/..."/>

But this is not yet in XForms, although there is a proposal for this
at exforms.org:

   http://exforms.org/variable.html

-Erik

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/




--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Different Ref points

Joseph Lawrence
In reply to this post by NJ No1
Hi Naman,
    from what I understood, I suppose using the xxforms:repeat-current() solves your problem. This way I presume that you can regain the context of the referenced repeat or the closest enclosing repeat. For example,

<xforms:repeat nodeset="instance('user_instance')/servers/weblogic/business" id="my-repeat">
            <xforms:select1 ref="instance('request_instance')/target" appearance="full" style="font-weight:bold;">
                        <xforms:item>
                              <xforms:label ref="xxforms:repeat-current('my-repeat')/domain/TestEnvironment/cluster/clusterName"/>
                              <xforms:value ref="xxforms:repeat-current('my-repeat')/domain/TestEnvironment/cluster/clusterName"/>
                        </xforms:item>
            </xforms:select1>
</xforms:repeat>

Naman Joshi <[hidden email]> wrote:
Hey gang,
 
I was wondering if there is anyway to call a certain reference path. It’s hard to explain but if you look at the code below I’m trying to print a list of servers for each business with radio buttons. I want the server chosen to be stored in ‘request_instance’/target. However once I get into the select1 statement the reference point now becomes the request_instance and I cant access where I am in the repeat statement.
 
Any ideas what I can do?
 
Thanks
NJ
 
<xforms:repeat nodeset="instance('user_instance')/servers/weblogic/business">
            <xforms:select1 ref="instance('request_instance')/target" appearance="full" style="font-weight:bold;">
                        <xforms:item>
                              <xforms:label ref="./domain/TestEnvironment/cluster/clusterName"/>
                              <xforms:value ref="./domain/TestEnvironment/cluster/clusterName"/>
                        </xforms:item>
            </xforms:select1>
</xforms:repeat>       
 
User_instance:
<servers>
<weblogic>
    <business>
            <name>Mortgages</name>
            <domain>
                <name>mortgagesTestDomain</name>
                <role>OLS_Operator</role>
                <TestEnvironment>
                    <cluster>
                        <clusterName>mmusaTestCluster</clusterName>
                        <server>mmusaTestServer1</server>
                        <server>mmusaTestServer2</server>
                    </cluster>
                    <adminServer>mortgagesTestAdminServer</adminServer>
                    <machine>ecsydtst01/02</machine>
                </TestEnvironment>
            </domain>
    </business>
    <business>
            <name>FMG</name>
            <domain>
                <name>fmgDomain</name>
                <role>OLS_Operator</role>
                <TestEnvironment>
                    <cluster>
                        <clusterName/>
                        <server>fmgServer1</server>
                        <server>fmgServer1</server>
                    </cluster>
                    <adminServer>fmgAdminServer</adminServer>
                    <machine>ecsydtst05</machine>
                </TestEnvironment>
            </domain>
    </business>
</weblogic>
</servers>
NOTICE
This e-mail and any attachments are confidential and may contain copyright material of Macquarie Bank or third parties. If you are not the intended recipient of this email you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. Macquarie Bank does not guarantee the integrity of any emails or any attached files. The views or opinions expressed are the author's own and may not reflect the views or opinions of Macquarie Bank.

--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws


Ahhh...imagining that irresistible "new car" smell?
Check out new cars at Yahoo! Autos.

--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Different Ref points

Joseph Lawrence
In reply to this post by NJ No1
Hi Naman,
    from what I understood, I suppose using the xxforms:repeat-current() solves your problem. This way I presume that you can regain the context of the referenced repeat or the closest enclosing repeat. For example,

<xforms:repeat nodeset="instance('user_instance')/servers/weblogic/business" id="my-repeat">
            <xforms:select1 ref="instance('request_instance')/target" appearance="full" style="font-weight:bold;">
                        <xforms:item>
                              <xforms:label ref="xxforms:repeat-current('my-repeat')/domain/TestEnvironment/cluster/clusterName"/>
                              <xforms:value ref="xxforms:repeat-current('my-repeat')/domain/TestEnvironment/cluster/clusterName"/>
                        </xforms:item>
            </xforms:select1>
</xforms:repeat>

Thanks
Joseph Lawrence
Stabilix Solutions

Naman Joshi <[hidden email]> wrote:
Hey gang,
 
I was wondering if there is anyway to call a certain reference path. It’s hard to explain but if you look at the code below I’m trying to print a list of servers for each business with radio buttons. I want the server chosen to be stored in ‘request_instance’/target. However once I get into the select1 statement the reference point now becomes the request_instance and I cant access where I am in the repeat statement.
 
Any ideas what I can do?
 
Thanks
NJ
 
<xforms:repeat nodeset="instance('user_instance')/servers/weblogic/business">
            <xforms:select1 ref="instance('request_instance')/target" appearance="full" style="font-weight:bold;">
                        <xforms:item>
                              <xforms:label ref="./domain/TestEnvironment/cluster/clusterName"/>
                              <xforms:value ref="./domain/TestEnvironment/cluster/clusterName"/>
                        </xforms:item>
            </xforms:select1>
</xforms:repeat>       
 
User_instance:
<servers>
<weblogic>
    <business>
            <name>Mortgages</name>
            <domain>
                <name>mortgagesTestDomain</name>
                <role>OLS_Operator</role>
                <TestEnvironment>
                    <cluster>
                        <clusterName>mmusaTestCluster</clusterName>
                        <server>mmusaTestServer1</server>
                        <server>mmusaTestServer2</server>
                    </cluster>
                    <adminServer>mortgagesTestAdminServer</adminServer>
                    <machine>ecsydtst01/02</machine>
                </TestEnvironment>
            </domain>
    </business>
    <business>
            <name>FMG</name>
            <domain>
                <name>fmgDomain</name>
                <role>OLS_Operator</role>
                <TestEnvironment>
                    <cluster>
                        <clusterName/>
                        <server>fmgServer1</server>
                        <server>fmgServer1</server>
                    </cluster>
                    <adminServer>fmgAdminServer</adminServer>
                    <machine>ecsydtst05</machine>
                </TestEnvironment>
            </domain>
    </business>
</weblogic>
</servers>
NOTICE
This e-mail and any attachments are confidential and may contain copyright material of Macquarie Bank or third parties. If you are not the intended recipient of this email you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. Macquarie Bank does not guarantee the integrity of any emails or any attached files. The views or opinions expressed are the author's own and may not reflect the views or opinions of Macquarie Bank.

--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws


Ahhh...imagining that irresistible "new car" smell?
Check out new cars at Yahoo! Autos.

--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Bug when inserting <xhtml:img> elements within <xforms:repeat>?

Alessandro Vernet
Administrator
In reply to this post by Ryan Puddephatt
On 4/17/07, Ryan Puddephatt <[hidden email]> wrote:
>      You are still able to use a relative url with this method, it the bug
> is specific to elements in the xhtml namespace

Yes, I understand that. I was trying to convey that it looks to me
like putting the element in no namespace just to avoid the URI to be
rewritten, while everything else is using the XHTML namespace is more
of a hack than using a relative URI. Hence my preference for this
latter workaround, if at all possible.

Alex
--
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.com/



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Different Ref points

NJ No1
In reply to this post by Erik Bruchez
Thanks Erik and Joseph for your quick replies. I love this mail group :D

-----Original Message-----
From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez
Sent: Wednesday, 18 April 2007 2:42 PM
To: [hidden email]
Subject: Re: [ops-users] Different Ref points

Naman Joshi wrote:

 > I was wondering if there is anyway to call a certain reference path.
 > It's hard to explain but if you look at the code below I'm trying to
 > print a list of servers for each business with radio buttons. I want
 > the server chosen to be stored in 'request_instance'/target. However
 > once I get into the select1 statement the reference point now
 > becomes the request_instance and I cant access where I am in the
 > repeat statement.

What you mean is that the XPath context node changes.

 > Any ideas what I can do?

This is an excellent question, and I think you pointed one of the
really annoying issues with XForms at the moment.

To help solve this, we introduced an extension function called
xxforms:repeat-current(). It is documented here:

   http://www.orbeon.com/ops/doc/reference-xforms-ng#ops-extensions

Then you can write:

   <xforms:label ref="xxforms:repeat-current()/domain/..."/>

We think that variables in XForms could solve this very nicely and
legibly, as they do in XSLT. E.g. you could write:

<xforms:repeat ...>
   <xforms:variable name="current-repeat" select="."/>
   <xforms:select1 ref="...">
     ...
       <xforms:label ref="$current-repeat/domain/..."/>

But this is not yet in XForms, although there is a proposal for this
at exforms.org:

   http://exforms.org/variable.html

-Erik

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



NOTICE
This e-mail and any attachments are confidential and may contain copyright material of Macquarie Bank or third parties. If you are not the intended recipient of this email you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. Macquarie Bank does not guarantee the integrity of any emails or any attached files. The views or opinions expressed are the author's own and may not reflect the views or opinions of Macquarie Bank.



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Capturing xforms-invalid

Larry T. Chen
In reply to this post by Alessandro Vernet
Fellow Orbeon Forms users:

    This should be a very simple thing, but I just can't see it.  Why
doesn't the following work?  It should display xforms-invalid whenever I
enter an invalid number.

Larry T. Chen
Intelenet Communications, Inc.

<xhtml:html xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
    <xhtml:head>
        <xf:model id="default">
            <xf:instance id="data-instance">
                <test xmlns=""><number/></test>
            </xf:instance>
            <xf:bind nodeset="number" type="xs:int"/>
        </xf:model>
    </xhtml:head>
    <xhtml:body>
        Enter a number: <xf:input ref="number" />
        <xf:group model="default">
            <xf:action ev:event="xforms-invalid">
                <xf:message level="modal">xforms-invalid</xf:message>
            </xf:action>
        </xf:group>
    </xhtml:body>
</xhtml: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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Capturing xforms-invalid

fl.schmitt(ops-users)
Hi Larry,

Larry T. Chen schrieb:

>    This should be a very simple thing, but I just can't see it.  Why
> doesn't the following work?  It should display xforms-invalid whenever I
> enter an invalid number.
(...)
>    <xhtml:body>
>        Enter a number: <xf:input ref="number" />
>        <xf:group model="default">
>            <xf:action ev:event="xforms-invalid">
>                <xf:message level="modal">xforms-invalid</xf:message>
>            </xf:action>
>        </xf:group>
>    </xhtml:body>
(...)

The following seems to work:
<xhtml:body>
        Enter a number:
        <xf:input ref="number">
                <xf:action ev:event="xforms-invalid">
                        <xf:message level="modal">xforms-invalid</xf:message>
                </xf:action>
        </xf:input>
</xhtml:body>

Maybe the cause is that the target of the xforms-invalid event is the
form control, not the model.

florian




--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Capturing xforms-invalid

Larry T. Chen
Florian,

Thanks for the reply.  In the Government Forms example, the xforms-invalid event appears to be captured at the model, so that it's able to capture all xforms-invalid events for all input controls.

<xforms:group model="common-model">
                    <!-- Handle invalid and valid events in order to update error summary -->
                    <xforms:action ev:event="xforms-invalid" if="normalize-space(event('alert')) != ''">
                        <xforms:action if="not(instance('errors-instance')/error[@id = event('target') and @indexes = string-join(event('repeat-indexes'), '-')])">
                            <xforms:insert context="instance('errors-instance')" nodeset="error" origin="instance('error-template')"/>
                            <xforms:setvalue ref="instance('errors-instance')/error[index('errors-repeat')]/@id" value="event('target')"/>
                            <xforms:setvalue ref="instance('errors-instance')/error[index('errors-repeat')]/@indexes" value="string-join(event('repeat-indexes'), '-')"/>
                        </xforms:action>
                        <xforms:setvalue ref="instance('errors-instance')/error[@id = event('target') and @indexes = string-join(event('repeat-indexes'), '-')]/@alert" value="event('alert')"/>
                        <xforms:setvalue ref="instance('errors-instance')/error[@id = event('target') and @indexes = string-join(event('repeat-indexes'), '-')]/@label" value="event('label')"/>
                    </xforms:action>
....
</xforms:group>

I've been trying to reuse the error summary code from Government Forms in my own forms, but since I could not get it to work, I produced a simple example to narrow down the problem.

So I'm still confused ... Why does the Government Forms example work and not my simple example (see my previous post) ?

Larry


Florian Schmitt wrote:
Hi Larry,

Larry T. Chen schrieb:

   This should be a very simple thing, but I just can't see it.  Why doesn't the following work?  It should display xforms-invalid whenever I enter an invalid number.
(...)
   <xhtml:body>
       Enter a number: <xf:input ref="number" />
       <xf:group model="default">
           <xf:action ev:event="xforms-invalid">
               <xf:message level="modal">xforms-invalid</xf:message>
           </xf:action>
       </xf:group>
   </xhtml:body>
(...)

The following seems to work:
<xhtml:body>
    Enter a number:
    <xf:input ref="number">
        <xf:action ev:event="xforms-invalid">
            <xf:message level="modal">xforms-invalid</xf:message>
        </xf:action>
    </xf:input>
</xhtml:body>

Maybe the cause is that the target of the xforms-invalid event is the form control, not the model.

florian



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



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
12