Hi devs,
I'd like to introduce a Dashboard Application in a xwiki-platform/xwiki-platform-core/xwiki-platform-dashboard/ module.
It would contain the following pages:
1/ Main.Dashboard.xml (currently in XE's app)
2/ The pages making up the user dashboard (XWiki.UserDashboardPreferencesClass, XWiki.XWikiUserDashboardSheet) (currently in Admin app)
3/ A new page which will have the logic to choose to display the user dashboard or the main shared dashboard (currently this code is in Main.WebHome in XE's app)
Also I'd like to suggest introducing a Dashboard space and have all the above-mentioned pages in that space.
Dashboard.WebHome would contain 3/.
And Main.WebHome would simply do an include of Dashboard.WebHome.
Note that this would allow the following:
* Ability to cleanly document the Dashboard feature on extensions.xwiki.org and have it visible on enterprise.xwiki.org for example
* It goes in the direction of splitting our XE XAR in discrete application
* It groups together (functionally) a domain (dashboard) which means that if a user doesn't want the dashboard feature, we can simply not install it or remove it easily.
WDYT?
Thanks
-Vincent
Hi devs,
I've started investigating this. The documentation for Provider can be found here:
http://code.google.com/p/atinject/source/browse/trunk/src/javax/inject/Prov…
Here's we would define a provider:
@Component
public class MyProvider implements Provider<RoleToProvide>
{
@Inject <-- just to show that a provider is a component and be injected other components
private SomeRole role;
@Override
public RoleToProvide get()
{
… logic here to return a RoleToProvide instance…
}
}
And here's how you'd use it:
@Component
public class MyComponent implements MyRole
{
…
@Inject
private Provider<RoleToProvide> provider;
…
public void someMethod()
{
RoleToProvide instance = this.provider.get();
…
Rationale:
=========
* UC1: Useful to break cyclic dependencies in a cleaner way than having the ComponentManager injected, especially since the Provider can be reused since it's shared
* UC2: Useful to clean up code so that the logic to decide which implementation to return can be externalized in a Provider implementation. For example imagine you have a config property in xwiki.properties and based on it you wish to return a component with one hint or another. You could use a Provider for this.
* Allows us to be JSR330 compliant (not a very strong point but still an argument ;))
Default Provider
=============
When you ask to get injected a Provider if no Provider is defined for the Role you wish, you'll get injected a generic provider which simply does a lookup using the Component Manager. This allows to simply implement UC1.
WDYT?
Thanks
-Vincent
Hi guys,
I'm trying to write some groovy that uses an image thats in the current skin in a link. In this case its a delete page image, that links to a delete page URL:
[[image:${xwiki.getSkinFile('icons/silk/page_delete.gif')}>>${doc.getExternalURL('delete')}]]
The issue is that the getSkinFile call returns a relative URL, which ends up getting rendered in the final HTML as
<img alt="/xwiki/resources/icons/silk/page_delete.gif" class="wikimodel-freestanding" src="/xwiki/bin/download/Storyboard/fcg9aYKeaI6AVIjxpocO/%2Fxwiki%2Fresources%2Ficons%2Fsilk%2Fpage_delete.gif"></img>
Do you have any suggestions for how I can get access to one of the icons for use as an image for a URL?
Thanks,
Nigel
Hi guys,
In order to finish convert extensions.xwiki.org into a valid XWiki
Repository server (supported by Extension Manager) I need to put a
upgrade xwiki.org and add a jar file (mostly about REST interface).
Thing is I need to put the latest 3.3 snapshot version of this REST
module so I can see two solutions:
* upgrade to 3.2 and patch it with several new API needed by the module
* upgrade to latest 3.3 SNAPSHOT
pros 3.3
* more simple for me
* we can probably quickly come back to the current 3.1.1 if a blocking
issue is found until it's fixed
* I'm going to quickly update xwiki.org any time we find and fix a blocker issue
cons 3.3
* snapshot version on production
There is some things I'm not 100% sure:
* is there any modification of to the DB introduced in 3.3 not
compatible with 3.1.1 and not introduced in 3.2 ? I know id change has
not been committed yet
+1 for 3.3 SNAPSHOT (ok the pros/cons is a bit oriented ;)) if there
is not incompatible DB change
--
Thomas Mortagne
Hi there
I've got two different groovy classes in two different pages (lets say Widget and WidgetFactory), and in a third page I'm trying to call an instance of the WidgetFactory, getting it to create a Widget.
I've included the groovy code for both classes in the third page using the "wiki.parseGroovyFromPage(…" call, which works as I can successfully call methods on the widget factory.
However, calling the createWidget method on the factory produces an error, in that the WidgetFactory code doesn't know anything about Widgets (i.e. it doesn't know about the Widget class). Am I doing something wrong?
I would like to be able to modularise the code in some way. It doesn't matter if there are many different classes declared in the one page, or just one; as long as I can instantiate them, and they know about each other. This would be great as it will mean I can reuse these classes around a few different pages.
I've tried including the code using the include macro (outside the groovy block) , and using the xwiki.includeForm call (inside the groovy block), with no success.
Thanks,
Nigel
Hi devs,
Is there a documentation and a tool to clean XWiki XML files for commit.
I used to use the SVN Application to clean the XML and commit in the
sandbox for the contributed apps.
But the SVN app does not work with git (even with the SVN bridge as it
seems svnkit is not compatible), so I'm left to export to commit.
How do developers usually do that ?
Ludovic
--
Ludovic Dubost
Founder and CEO
Blog: http://blog.ludovic.org/
XWiki: http://www.xwiki.com
Skype: ldubost GTalk: ldubost
We need a way for subservient stores such as FS attachments to get transactions from the main store so that it can know to rollback if there is an error in the main store.
In order to Cloud/DataNucleus store plug in seamlessly and function with FS attachments, FS attachments needs to be able to get transactions from the main store without knowing or caring what that main store is.
I propose this:
Add a new storage submodule: xwiki-platform-store-transactionprovider which provides this interface which extends javax.inject.Provider:
@ComponentRole
public interface XWikiTransactionProvider
extends Provider<StartableTransactionRunnable<? extends XWikiTransaction>>
{
// No additional functions, just the get() from Provider.
}
The default implementation for now will be a wrapper which picks out the real TransactionProvider based on what the main store is, as defined in xwiki.cfg.
This will allow code to get a transaction from the main store then get TransactionRunnables from the main store and use them with this transaction and be assured
that you won't be using a Hibernate TransactionRunnable with a Cassandra Transaction.
WDYT?
Caleb