dojo widget configurations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2014 01:01 PM
I wish to use the sliding tabs and I configured a sliding them in my page thus:
{ id : "profiled-display", name: "alfresco/layout/SlidingTabs", config: { widgets: [ { name: "alfresco/layout/TitleDescriptionAndContent", config: { title: "Tab 1", description: "First One" } }, { name: "alfresco/layout/TitleDescriptionAndContent", config: { title: "Tab 2", description: "Description 2" } } ] } }
I originally had a custom widget instead of the title and description widget but after reading the sliding tabs comment realised that i needed to have a title attribute in my widgets.
However all I get is a blank tab with no errors in console logs. I am unsure as to how or why this is.
Thanks for any help
- Labels:
-
Archive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2014 07:40 AM
<javascript>
{
name: "alfresco/layout/SlidingTabs",
config: {
widgets: [
{
name: "alfresco/layout/TitleDescriptionAndContent",
title: "Tab 1",
config: {
title: "Wupup!",
description: "First One"
}
},
{
name: "alfresco/layout/TitleDescriptionAndContent",
title: "Tab 2",
config: {
title: "Woho",
description: "Description 2"
}
}
]
}
}
</javascript>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2014 12:30 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2014 11:40 AM
Secondly, oleh is correct… any configuration outside of the "config" object used by the parent widget, and the "config" object is essentially the instantiation arguments for the child widget. In this case the outer "title" is the title given to the tab, the inner "title" is a specific instantiation argument of the "TitleDescriptionAndContent" widgets.
It's also worth bearing in mind that these widgets that you're using are just beta quality widgets that I prototyped
Regards,
Dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2014 01:19 PM
You should pop online on IRC sometime, I have a ton of stuff I want to hear your thoughts about, like:
- Ability to turn off the dependency cache or have it cleared on every request. I've currently overridden DojoDependencyHandler and DependencyHandler to do this, and it works OK most of the time, but it's a huuuuge hack. Turning off or having it reload the files in the filesystem on every request would make a huge difference durring development with the Maven SDK (no restarts!)
- Widgets vs dashlets, I want to mix them! After seeing the light with the new Dojo widgets, I never ever want to write the old style dashlets. I want widgets! But is it possible to initialize and use the new widgets on a dashboard?
- There is a "bug" in the dependency calculation regexp, if you have too many defines in your widget, and you forget to remove the trailing comma in the list, at some point the regexp never finishes
- More out-of-the-box widgets please! Can't wait to see more
I could go on.. Better keep it short for now
EDIT: Forgot to mention that I think the new widget system so awesome that I'm currently writing a tutorial on it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2014 08:57 AM
I can understand the frustration with the dependency cache issue during development… I've just got into the habit of doing it automatically. Obviously its good for production but not great for development… if you weren't using Maven then I'd suggest adding a curl post command to your build script to clear the caches each time.
Ideally I'd like us to start using the new widget throughout Share - but it's going to take time and there'll need to be a compelling reason to switch functional old code for the new stuff. It is possible to create a dashlet that contains the widgets, but it can be problematic in that you can end up requesting multiple copies of the same resource (merged into aggregated resources). It will work, but can be a pain debugging. Ideally this stuff should be used on its own in a single page - but it is possible to use as a Component (after all the header is just a Component that uses the framework).
Could you raise an issue in JIRA for that bug you mentioned (if you haven't already) … make sure to assign it to the Share Customizations component so that I see it.
There are more widgets on the way… probably not at a huge rate, but definitely lots of minor improvements. You should see some more things coming down the line in the next couple of weeks.
Can't wait to see the tutorial - be sure to tweet me a link to it
Finally, thanks for the great feedback - it's really appreciated!
Regards,
Dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2014 10:38 AM
I tried adding a "userid" argument (like test-page/{userid} ), but when I call url.templateArgs in the controller all I get is null.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2014 09:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2014 07:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2014 09:01 AM