Dear Jeremy, On Wed, Mar 21, 2012 at 1:37 PM, Jeremy Goecks <jeremy.goecks@emory.edu> wrote:
Maybe we don't understand the feature in the documentation, but this isn't the refresh_on_change functionality. In the Tophat tool XML there are no refresh_on_change="true" attributes, you are talking about a conditional tag which when changing will refresh the page in order to expose different parts of a form depending on then value chosen, this is a different use case.
The conditional tag has "refresh_on_change" added automatically and is used by Javascript accordingly.
This is understood, we use conditionals all the time, just was trying to explain that conditionals are only for certain use cases when you need to expose/hide different form elements depending on changing of a parameter. Yet there are other use cases when you need refresh_on_change functionality and not a conditional.
The feature we thought exists from the wiki docs is a utility refresh_on_change="true" attribute that you can put on any input param tag which will cause the page to refresh with the changed state when you change the param. It's supposed to replace the deprecated pages tags.
Unless there is undocumented functionality, refresh_on_change cannot be explicitly used:
http://wiki.g2.bx.psu.edu/Admin/Tools/Tool%20Config%20Syntax
Once we started needing to make more complex form logic you realize that this is not just very useful but necessary.
Here's one example:
<inputs> <param type="data" name="dataset" refresh_on_change="true" label="Select a file from you history" /> <param type="select" multiple="true" name="dataset_values" dynamic_options="get_options_from_file(dataset.file_name)" /> </inputs>
If the user changes their selection of data from their history it should refresh the page and call the dynamic options again to load the other select menu with the choices from the new file. Currently you have to do this with repeat or pages tags which is really cumbersome for the user in the UI or doesn't allow workflowing, respectively.
Page should refresh automatically when dataset is changed and dynamic options are used. If not, it's a bug.
Ok, not sure what this means, the above example I wrote doesn't work so is this a bug or is there another way to write the above example so that it will work? regards, Leandro
J.
Does this feature I describe to replace the deprecated pages tags not exist or just isn't fully implemented yet?
regards, Leandro
Some questions that should shed light on your issues:
*Does the Tophat tool refresh on the main server? If not, this is probably a browser issue.
*Are you seeing any errors in the Javascript console?
*Can you be more specific about what problems you're seeing and whether you can reproduce with known tools?
Thanks,
J.
On Mar 20, 2012, at 9:28 AM, Leandro Hermida wrote:
Hi everyone,
Sorry to ping again, having the refresh_on_change functionality not
working in Galaxy has us making tool forms in ways we really don't
want to,
no one needs to use refresh_on_change or am I the only one that finds
it's broken? We've started to look at what Galaxy is trying to do,
seems like you are using jQuery to bind a custom Javascript
refresh_on_change function but when you look at that function it
doesn't do any form reloading, maybe just the feature is unfinished?
sincerely,
Leandro
On Wed, Feb 29, 2012 at 10:34 AM, Leandro Hermida
<softdev@leandrohermida.com> wrote:
Hello,
Seems like the refresh_on_change functionality is broken in the latest
galaxy-dist. If you apply it to an input parameter it doesn't seem to
refresh the page when you change the selection of that parameter. Does
anyone else also have the problem?
regards,
Leandro