Disabling XForms Select

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

Disabling XForms Select

Hank Ratzesberger-2
Hi Well Formed List,

I wrote a general xpl script that pulls data from a database of atom  
entries <http://atomic.exist-db.org/atomic/> and formats them into  
html. However, the script uses the request processor to locate which  
collection to use in the wiki. This works fine when the page loads.  
However when a user clicks on another section, the engine re-runs the  
script, but this time the request-url is /xforms-server rather than,  
e.g. /projects.  The result is that a lot of content is lost.

I could use a script specific to each url, but I wondered if there  
were a way to simply disable the engine from attempting to switch -- I  
should have mentioned, between elements created in a repeat element  
loop.

I am not sure how to "kill" messages that are intended to bubble -- I  
assume this one does.

Cheers,
Hank


--
Hank Ratzesberger
[hidden email]



--
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: Disabling XForms Select

Hank Ratzesberger-2

Hi,

I suspect my post created questions rather than ask one.
Let me provide a sample:

<xf:repeat nodeset="xxforms:sort(instance('feed')/atom:entry, atom:published, 'text', 'descending')">

  <h3> <xf:output ref="atom:title"/> </h3>
                       
  <xf:output class="wiki-item" value="xxforms:serialize(xxforms:call-xpl('oxf:/wiki.xpl', 'data', atom:content/html:div, 'data'),'html')" mediatype="text/html"/>

  <xf:output class="wiki-item" value="xxforms:serialize(xxforms:call-xpl( 'oxf:/image-table.xpl', 'data', ., 'data' ),'html')" mediatype="text/html"/>

</xf:repeat>

The issue with the above code is that clicking on a one of the repeat
sections causes the data to refresh, apparently, on the server side the
whole repeat loop runs again.  I can see this in the logs, because
instead of the request-url being e.g., "/projects" it is "/xforms-server".

The image-table.xpl file reads a directory and creates html output of
thumbnail links for all the jpg images in the directory, which is a lot
of processing.

Well, this is the first time I've ever "questioned your wisdom" and
I suspect changes would affect other applications, but selecting a
repeat section does indeed cause the server to run through the
repeat again, which in this case calls the xpl function.

For now, I'm going to rewrite this to build all the data in
instances via a submission at the xforms-model.

Best,
Hank


On Aug 9, 2010, at 4:41 PM, Louis Ratzesberger wrote:

> Hi Well Formed List,
>
> I wrote a general xpl script that pulls data from a database of atom entries <http://atomic.exist-db.org/atomic/> and formats them into html. However, the script uses the request processor to locate which collection to use in the wiki. This works fine when the page loads.  However when a user clicks on another section, the engine re-runs the script, but this time the request-url is /xforms-server rather than, e.g. /projects.  The result is that a lot of content is lost.
>
> I could use a script specific to each url, but I wondered if there were a way to simply disable the engine from attempting to switch -- I should have mentioned, between elements created in a repeat element loop.
>
> I am not sure how to "kill" messages that are intended to bubble -- I assume this one does.
>
> Cheers,
> Hank
>
>
> --
> Hank Ratzesberger
> [hidden email]
>
>
> --
> 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
Hank Ratzesberger
NEES@UCSB
Earth Research Institute
University of California, Santa Barbara
805-893-8042








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