Problems dynamically changing src to xxforms:img

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

Problems dynamically changing src to xxforms:img

Ryan Puddephatt

Hi all,

            I am trying to change get the value of src attribute within the xxforms:img element to change based on results. I’ve tried putting the following

 

<xxforms:img src”instance(‘tests’)/image”/>

 <xxforms:img src”{instance(‘tests’)/image}”/>

 

Does anyone know how to do this? I’ve exhausted all my possibilities

 

My end goal is to create an NG version of the sortable table example, don’t know if anyone has already done this or knows a way to implement my problem

 

Thanks

 

Ryan Puddephatt

Web Developer

TFX Group

1 Michaelson Square

Livingston

West Lothian

Scotand

EH54 7DP

 

* [hidden email]

( 01506 407 110

7  01506 407 108

 

 



--
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: Problems dynamically changing src to xxforms:img

Erik Bruchez
Administrator
Ryan,

You can't do this by changing the value of the attribute.

If you just want to display an image, you can use the "mediatype"
attribute on xforms:output to achieve this effect, e.g.:

<xforms:output value="concat('/images/2004-candidates/', image)"
mediatype="image/*"/>

We have a complete example showing this in the CVS. I attach the source
code of the view for reference.

If you want a clickable (and changing) image that acts as a trigger
though, this is not yet possible. It will be once xforms:output is
supported within a trigger's xforms:label, but we don't implement that
just yet.

-Erik

Ryan Puddephatt wrote:

> Hi all,
>
>             I am trying to change get the value of src attribute within
> the xxforms:img element to change based on results. I?ve tried putting
> the following
>
>  
>
> <xxforms:img src?instance(?tests?)/image?/>
>
>  <xxforms:img src?{instance(?tests?)/image}?/>
>
>  
>
> Does anyone know how to do this? I?ve exhausted all my possibilities
>
>  
>
> My end goal is to create an NG version of the sortable table example,
> don?t know if anyone has already done this or knows a way to implement
> my problem
>
>  
>
> Thanks
>
>  
>
> *Ryan Puddephatt*
>
> Web Developer
>
> TFX Group
>
> 1 Michaelson Square
>
> Livingston
>
> West Lothian
>
> Scotand
>
> EH54 7DP
>
>  
>
> * [hidden email]
>
> ( 01506 407 110
>
> 7  01506 407 108
>
>  
>
>  
>
>
> ------------------------------------------------------------------------
>
>
> --
> 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


--
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

view.xhtml (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: Problems dynamically changing src to xxforms:img

Ryan Puddephatt
Erik,
        I disabled the logging and it has decreased the loading time, but it
still takes longer to sort the table after it is displayed in the browser
than it does to sort it originally in the XPL. On a good run its about 15
seconds, but only 3 second to do a tamino call! On a bad run 74 seconds, and
about 6 seconds to do a tamino call! Does this narrow it down?

Thanks

Ryan Puddephatt
Web Developer
TFX Group
1 Michaelson Square
Livingston
West Lothian
Scotand
EH54 7DP
 
* [hidden email]
( 01506 407 110
7  01506 407 108
 
-----Original Message-----
From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez
Sent: 24 November 2005 19:56
To: [hidden email]
Subject: Re: [ops-users] Problems dynamically changing src to xxforms:img

Ryan,

You can't do this by changing the value of the attribute.

If you just want to display an image, you can use the "mediatype"
attribute on xforms:output to achieve this effect, e.g.:

<xforms:output value="concat('/images/2004-candidates/', image)"
mediatype="image/*"/>

We have a complete example showing this in the CVS. I attach the source
code of the view for reference.

If you want a clickable (and changing) image that acts as a trigger
though, this is not yet possible. It will be once xforms:output is
supported within a trigger's xforms:label, but we don't implement that
just yet.

-Erik

Ryan Puddephatt wrote:

> Hi all,
>
>             I am trying to change get the value of src attribute within
> the xxforms:img element to change based on results. I've tried putting
> the following
>
>  
>
> <xxforms:img src"instance('tests')/image"/>
>
>  <xxforms:img src"{instance('tests')/image}"/>
>
>  
>
> Does anyone know how to do this? I've exhausted all my possibilities
>
>  
>
> My end goal is to create an NG version of the sortable table example,
> don't know if anyone has already done this or knows a way to implement
> my problem
>
>  
>
> Thanks
>
>  
>
> *Ryan Puddephatt*
>
> Web Developer
>
> TFX Group
>
> 1 Michaelson Square
>
> Livingston
>
> West Lothian
>
> Scotand
>
> EH54 7DP
>
>  
>
> * [hidden email]
>
> ( 01506 407 110
>
> 7  01506 407 108
>
>  
>
>  
>
>
> ------------------------------------------------------------------------
>
>
> --
> 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





--
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: xforms:repeat Performance Bug

Erik Bruchez
Administrator
I am not quite sure what you mean by "sorting the table once it is
displayed", but I can see that two things could take some time:
server-side XForms processing (running the events), or client-side
processing (updates to the DOM).

-Erik

Ryan Puddephatt wrote:

> Erik,
> I disabled the logging and it has decreased the loading time, but it
> still takes longer to sort the table after it is displayed in the browser
> than it does to sort it originally in the XPL. On a good run its about 15
> seconds, but only 3 second to do a tamino call! On a bad run 74 seconds, and
> about 6 seconds to do a tamino call! Does this narrow it down?
>
> Thanks
>
> Ryan Puddephatt
> Web Developer
> TFX Group
> 1 Michaelson Square
> Livingston
> West Lothian
> Scotand
> EH54 7DP
>  
> * [hidden email]
> ( 01506 407 110
> 7  01506 407 108


--
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: xforms:repeat Performance Bug

Ryan Puddephatt
By sorting I mean, I want to be able to click the heading of the column and
sort them ascending or descending. I have used your Sort Table example to
create an XPL to sort it, which works fine.

One submit the page makes a call to Tamino gets the data, sorts by name then
displays to the page using xforms:repeat in the form of a table.

The headings of the table are all triggers, which goes back to the sort XPL
and then redisplays the newly sorted data. It is when doing this that the
performance considerable lags! I don't know entirely how the xforms:repeat
works, but would changing the order of the data in the repeat cause it to
update each row or just start from scratch?

Is there anyway to disable events on objects? Even just on one XPL call?
There seems to be a lot of 'dispatching events' showing in the Logging
Events when I have it running, so I think it might be server-side!

Thanks

Ryan Puddephatt
Web Developer
TFX Group
1 Michaelson Square
Livingston
West Lothian
Scotand
EH54 7DP
 
* [hidden email]
( 01506 407 110
7  01506 407 108
 

-----Original Message-----
From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez
Sent: 25 November 2005 11:08
To: [hidden email]
Subject: Re: [ops-users] xforms:repeat Performance Bug

I am not quite sure what you mean by "sorting the table once it is
displayed", but I can see that two things could take some time:
server-side XForms processing (running the events), or client-side
processing (updates to the DOM).

-Erik

Ryan Puddephatt wrote:
> Erik,
> I disabled the logging and it has decreased the loading time, but it
> still takes longer to sort the table after it is displayed in the browser
> than it does to sort it originally in the XPL. On a good run its about 15
> seconds, but only 3 second to do a tamino call! On a bad run 74 seconds,
and

> about 6 seconds to do a tamino call! Does this narrow it down?
>
> Thanks
>
> Ryan Puddephatt
> Web Developer
> TFX Group
> 1 Michaelson Square
> Livingston
> West Lothian
> Scotand
> EH54 7DP
>  
> * [hidden email]
> ( 01506 407 110
> 7  01506 407 108




--
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: xforms:repeat Performance Bug

Erik Bruchez
Administrator
When the repeat is updated, values of existing rows are updated, and
rows are deleted or created as needed.

Likely this is an issue with update performance on the client. Out of
curiosity, do you notice the same phenomenon with IE and Firefox, or is
one much slower than the other?

-Erik

Ryan Puddephatt wrote:

> By sorting I mean, I want to be able to click the heading of the column and
> sort them ascending or descending. I have used your Sort Table example to
> create an XPL to sort it, which works fine.
>
> One submit the page makes a call to Tamino gets the data, sorts by name then
> displays to the page using xforms:repeat in the form of a table.
>
> The headings of the table are all triggers, which goes back to the sort XPL
> and then redisplays the newly sorted data. It is when doing this that the
> performance considerable lags! I don't know entirely how the xforms:repeat
> works, but would changing the order of the data in the repeat cause it to
> update each row or just start from scratch?
>
> Is there anyway to disable events on objects? Even just on one XPL call?
> There seems to be a lot of 'dispatching events' showing in the Logging
> Events when I have it running, so I think it might be server-side!
>
> Thanks
>
> Ryan Puddephatt
> Web Developer
> TFX Group
> 1 Michaelson Square
> Livingston
> West Lothian
> Scotand
> EH54 7DP
>  
> * [hidden email]
> ( 01506 407 110
> 7  01506 407 108


--
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: xforms:repeat Performance Bug

Ryan Puddephatt
I've just tried in both, and they are about the same! It is getting faster
though, got the sort to 7 secs! Seems to be an intermittent problem, plus I
have stopped running logging for the performance test! I think this could
require a little more stress testing to see if it was just my Eclipse
holding me back yesterday! I'll try some over the course of the weekend and
post my results, It might just be the Internal Tomcat I have noticed that it
hoardes memory at times!

Thanks

Ryan Puddephatt
Web Developer
TFX Group
1 Michaelson Square
Livingston
West Lothian
Scotand
EH54 7DP
 
* [hidden email]
( 01506 407 110
7  01506 407 108
 

-----Original Message-----
From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez
Sent: 25 November 2005 12:01
To: [hidden email]
Subject: Re: [ops-users] xforms:repeat Performance Bug

When the repeat is updated, values of existing rows are updated, and
rows are deleted or created as needed.

Likely this is an issue with update performance on the client. Out of
curiosity, do you notice the same phenomenon with IE and Firefox, or is
one much slower than the other?

-Erik

Ryan Puddephatt wrote:
> By sorting I mean, I want to be able to click the heading of the column
and
> sort them ascending or descending. I have used your Sort Table example to
> create an XPL to sort it, which works fine.
>
> One submit the page makes a call to Tamino gets the data, sorts by name
then
> displays to the page using xforms:repeat in the form of a table.
>
> The headings of the table are all triggers, which goes back to the sort
XPL

> and then redisplays the newly sorted data. It is when doing this that the
> performance considerable lags! I don't know entirely how the xforms:repeat
> works, but would changing the order of the data in the repeat cause it to
> update each row or just start from scratch?
>
> Is there anyway to disable events on objects? Even just on one XPL call?
> There seems to be a lot of 'dispatching events' showing in the Logging
> Events when I have it running, so I think it might be server-side!
>
> Thanks
>
> Ryan Puddephatt
> Web Developer
> TFX Group
> 1 Michaelson Square
> Livingston
> West Lothian
> Scotand
> EH54 7DP
>  
> * [hidden email]
> ( 01506 407 110
> 7  01506 407 108




--
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: xforms:repeat Performance Bug

Erik Bruchez
Administrator
I don't want to rule out performance issues on the client, so let us
know the results.

-Erik

Ryan Puddephatt wrote:

> I've just tried in both, and they are about the same! It is getting faster
> though, got the sort to 7 secs! Seems to be an intermittent problem, plus I
> have stopped running logging for the performance test! I think this could
> require a little more stress testing to see if it was just my Eclipse
> holding me back yesterday! I'll try some over the course of the weekend and
> post my results, It might just be the Internal Tomcat I have noticed that it
> hoardes memory at times!
>
> Thanks
>
> Ryan Puddephatt
> Web Developer
> TFX Group
> 1 Michaelson Square
> Livingston
> West Lothian
> Scotand
> EH54 7DP
>  
> * [hidden email]
> ( 01506 407 110
> 7  01506 407 108
>  
>
> -----Original Message-----
> From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez
> Sent: 25 November 2005 12:01
> To: [hidden email]
> Subject: Re: [ops-users] xforms:repeat Performance Bug
>
> When the repeat is updated, values of existing rows are updated, and
> rows are deleted or created as needed.
>
> Likely this is an issue with update performance on the client. Out of
> curiosity, do you notice the same phenomenon with IE and Firefox, or is
> one much slower than the other?
>
> -Erik
>
> Ryan Puddephatt wrote:
>
>>By sorting I mean, I want to be able to click the heading of the column
>
> and
>
>>sort them ascending or descending. I have used your Sort Table example to
>>create an XPL to sort it, which works fine.
>>
>>One submit the page makes a call to Tamino gets the data, sorts by name
>
> then
>
>>displays to the page using xforms:repeat in the form of a table.
>>
>>The headings of the table are all triggers, which goes back to the sort
>
> XPL
>
>>and then redisplays the newly sorted data. It is when doing this that the
>>performance considerable lags! I don't know entirely how the xforms:repeat
>>works, but would changing the order of the data in the repeat cause it to
>>update each row or just start from scratch?
>>
>>Is there anyway to disable events on objects? Even just on one XPL call?
>>There seems to be a lot of 'dispatching events' showing in the Logging
>>Events when I have it running, so I think it might be server-side!
>>
>>Thanks
>>
>>Ryan Puddephatt
>>Web Developer
>>TFX Group
>>1 Michaelson Square
>>Livingston
>>West Lothian
>>Scotand
>>EH54 7DP
>>
>>* [hidden email]
>>( 01506 407 110
>>7  01506 407 108
>
>
>
>
>
> ------------------------------------------------------------------------
>
>
> --
> 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



--
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: xforms:repeat Performance Bug

Ryan Puddephatt
Ok, will do!

Ryan Puddephatt
Web Developer
TFX Group
1 Michaelson Square
Livingston
West Lothian
Scotand
EH54 7DP
 
* [hidden email]
( 01506 407 110
7  01506 407 108
 

-----Original Message-----
From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez
Sent: 25 November 2005 13:05
To: [hidden email]
Subject: Re: [ops-users] xforms:repeat Performance Bug

I don't want to rule out performance issues on the client, so let us
know the results.

-Erik

Ryan Puddephatt wrote:
> I've just tried in both, and they are about the same! It is getting faster
> though, got the sort to 7 secs! Seems to be an intermittent problem, plus
I
> have stopped running logging for the performance test! I think this could
> require a little more stress testing to see if it was just my Eclipse
> holding me back yesterday! I'll try some over the course of the weekend
and
> post my results, It might just be the Internal Tomcat I have noticed that
it

> hoardes memory at times!
>
> Thanks
>
> Ryan Puddephatt
> Web Developer
> TFX Group
> 1 Michaelson Square
> Livingston
> West Lothian
> Scotand
> EH54 7DP
>  
> * [hidden email]
> ( 01506 407 110
> 7  01506 407 108
>  
>
> -----Original Message-----
> From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez
> Sent: 25 November 2005 12:01
> To: [hidden email]
> Subject: Re: [ops-users] xforms:repeat Performance Bug
>
> When the repeat is updated, values of existing rows are updated, and
> rows are deleted or created as needed.
>
> Likely this is an issue with update performance on the client. Out of
> curiosity, do you notice the same phenomenon with IE and Firefox, or is
> one much slower than the other?
>
> -Erik
>
> Ryan Puddephatt wrote:
>
>>By sorting I mean, I want to be able to click the heading of the column
>
> and
>
>>sort them ascending or descending. I have used your Sort Table example to
>>create an XPL to sort it, which works fine.
>>
>>One submit the page makes a call to Tamino gets the data, sorts by name
>
> then
>
>>displays to the page using xforms:repeat in the form of a table.
>>
>>The headings of the table are all triggers, which goes back to the sort
>
> XPL
>
>>and then redisplays the newly sorted data. It is when doing this that the
>>performance considerable lags! I don't know entirely how the xforms:repeat
>>works, but would changing the order of the data in the repeat cause it to
>>update each row or just start from scratch?
>>
>>Is there anyway to disable events on objects? Even just on one XPL call?
>>There seems to be a lot of 'dispatching events' showing in the Logging
>>Events when I have it running, so I think it might be server-side!
>>
>>Thanks
>>
>>Ryan Puddephatt
>>Web Developer
>>TFX Group
>>1 Michaelson Square
>>Livingston
>>West Lothian
>>Scotand
>>EH54 7DP
>>
>>* [hidden email]
>>( 01506 407 110
>>7  01506 407 108
>
>
>
>
>
> ------------------------------------------------------------------------
>
>
> --
> 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






--
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