Hyperlink with Treenode Behaivor
hi all
i have a hyperlink which targeted to a new window without url
in this hyperlink i put a code that takes variables from textfield and generate a pdf from a selected node from tree.
it generates the pdf but the problem is when i click other nodes in tree it reopen the generated pdf in the main window.
i don't need to use javascript.
could any one help plz
[403 byte] By [
casper77] at [2007-11-26 11:42:57]

# 1
// i have main tree click in node that generate dynamic textfields
when clicking on get report hyperlink that is targeted to a new window
it takes params from textfields and genereate a report in hyperlink_action() it generates the pdf well in the new window
but the problem is that when i select other node in main window
the pdf reopened in main window
simply i need to refresh the page
do any one know an idea please
anyone help plz plz
# 2
This is a known bug with the hyperlink component.
If you were to open the theme jar and look at formElements.js, you will find that the hyperlink creates an hidden field to pass on the request parameters. Unfortunately, this hidden field is not removed if the page does not refresh.(i.e in frames environment) Hence, when you click another tree node, the hidden text field created from the previous click stays and so when the request goes to the server, there are now two hidden text fields, one from the previous click and one from the present click of another tree node.
You can work around by providing a javascript function which will attempt to clear the hidden field that is generated. Set a sufficient time out interval after which you can remove the generated hidden field.(put this javascript in the onclick of your created hyperlink). The hidden field id is something like
<hyperlink's client id>_hiddenfield.