Thank you fort he response. But however it does not work in the way I want it.
This is my mixed velocity code:
{{velocity output="true"}}
## Smartclient
$xwiki.jsfx.use('js/smartclient/initsc.js', {'forceSkinAction' : true,
'defer' : false})##
$xwiki.jsfx.use('js/smartclient/modules/ISC_Core.js', {'defer' :
false})##
## TODO: remove this line
## when
http://forums.smartclient.com/showthread.php?t=3097 will be fixed
$xwiki.jsfx.use('js/smartclient/overwritesc.js', {'defer' : false})##
$xwiki.jsfx.use('js/smartclient/modules/ISC_Foundation.js', {'defer' :
false})##
$xwiki.jsfx.use('js/smartclient/modules/ISC_Containers.js', {'defer' :
false})##
$xwiki.jsfx.use('js/smartclient/modules/ISC_Grids.js', {'defer' :
false})##
$xwiki.jsfx.use('js/smartclient/modules/ISC_Forms.js', {'defer' :
false})##
$xwiki.jsfx.use('js/smartclient/modules/ISC_DataBinding.js', {'defer' :
false})##
$xwiki.jsfx.use('js/smartclient/skins/Enterprise/load_skin.js', {'defer' :
false})##
## XWikiExplorer
$xwiki.jsfx.use('js/xwiki/xwikiexplorer/xwikiexplorer.js',
{'forceSkinAction' : true, 'defer' : false})##
{{/velocity}}
{{velocity}}
{{html}}
<div id="XWEWrapper"
style="height:300px;margin-right:20px;padding-bottom:30px;"></div>
<script type="text/javascript">
isc.XWETreeGrid.create({
ID: "Treeview",
// Example of default values:
// defaultValue: "Main.WebHome",
// defaultValue: "Main.RecentChanges(a)lquo.gif".gif",
defaultValue: "",
htmlElement: "XWEWrapper", // Mandatory HTML wrapper.
matchElement: true, // Make the widget match HTML wrapper size.
// Example of data sources:
// dataSource: isc.XWEDataSource.create({}),
dataSource: isc.XWESpaceDataSource.create({ space:
"$!xcontext.macro.params.space" }),
//dataSource: isc.XWEWikiDataSource.create({}),
displaySuggest: true, // Display the input at the bottom.
displayLinks: true, // Node titles are HTML links.
displayAttachments: true, // Display pages attachments.
displayAttachmentsOnTop: true // Display attachments before page children.
}).draw();
</script>
{{/html}}
{{/velocity}}
"$!xcontext.macro.params.space" is not read the right way, if I change it to
e.g. Main it displays the tree correctely but it seems that it down not read the
variable.
Thanks,
Florian
-----Ursprüngliche Nachricht-----
Von: users-bounces(a)xwiki.org [mailto:users-bounces@xwiki.org] Im Auftrag von Marius
Dumitru Florea
Gesendet: Montag, 27. Juni 2011 07:50
An: users(a)xwiki.org
Betreff: Re: [xwiki-users] Treeview of single space
On 06/27/2011 12:15 AM, Florian Rhomberg wrote:
Hello!
After some search I found a possibility to create a new object which creates a tree. But
there I have a problem. How can I add some velocity code (in this case the value of a
variable) in the html macro esspecially when I am using javascript inside.
This is my current code fort he tree:
{{velocity output="true"}}
## Smartclient
$xwiki.jsfx.use('js/smartclient/initsc.js', {'forceSkinAction' : true,
'defer' : false})##
$xwiki.jsfx.use('js/smartclient/modules/ISC_Core.js', {'defer' :
false})## ## TODO: remove this line ## when
http://forums.smartclient.com/showthread.php?t=3097 will be fixed
$xwiki.jsfx.use('js/smartclient/overwritesc.js', {'defer' : false})##
$xwiki.jsfx.use('js/smartclient/modules/ISC_Foundation.js', {'defer' :
false})## $xwiki.jsfx.use('js/smartclient/modules/ISC_Containers.js',
{'defer' : false})##
$xwiki.jsfx.use('js/smartclient/modules/ISC_Grids.js', {'defer' :
false})## $xwiki.jsfx.use('js/smartclient/modules/ISC_Forms.js',
{'defer' : false})##
$xwiki.jsfx.use('js/smartclient/modules/ISC_DataBinding.js', {'defer'
: false})##
$xwiki.jsfx.use('js/smartclient/skins/Enterprise/load_skin.js',
{'defer' : false})## ## XWikiExplorer
$xwiki.jsfx.use('js/xwiki/xwikiexplorer/xwikiexplorer.js',
{'forceSkinAction' : true, 'defer' : false})## {{/velocity}}
{{html}}
<div id="XWEWrapper"
style="height:300px;margin-right:20px;padding-bottom:30px;"></div>
<script type="text/javascript">
isc.XWETreeGrid.create({
ID: "Treeview",
// Example of default values:
// defaultValue: "Main.WebHome",
// defaultValue: "Main.RecentChanges(a)lquo.gif".gif",
defaultValue: "",
htmlElement: "XWEWrapper", // Mandatory HTML wrapper.
matchElement: true, // Make the widget match HTML wrapper size.
// Example of data sources:
// dataSource: isc.XWEDataSource.create({}),
dataSource: isc.XWESpaceDataSource.create({ space:
"$!xcontext.macro.params.space" }),
//dataSource: isc.XWEWikiDataSource.create({}),
displaySuggest: true, // Display the input at the bottom.
displayLinks: true, // Node titles are HTML links.
displayAttachments: true, // Display pages attachments.
displayAttachmentsOnTop: true // Display attachments before page children.
}).draw();
</script>
{{/html}}
But however "$!xcontext.macro.params.space is not
read inside the html macro, how can I insert on this place the value of this variable?
You can wrap the HTML macro in a velocity macro like this:
{{velocity}}
{{html}}
HTML code mixed with velocity
{{/html}}
{{/velocity}}
Hope this helps,
Marius
Thanks,
Florian
-----Ursprüngliche Nachricht-----
Von: users-bounces(a)xwiki.org [mailto:users-bounces@xwiki.org] Im
Auftrag von Florian Rhomberg
Gesendet: Samstag, 25. Juni 2011 23:19
An: users(a)xwiki.org
Betreff: [xwiki-users] Treeview of single space
Hello!
I have a question according to the tree view in xwiki. Is there a possibility to change
the velocity code that I can display the treeview of a single space? I didn´t find
anything according to this topic.
Thanks for your help!
Florian
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users