Hi all,
I have the following velocity code in xwiki page, I can see the fid and
fname values when I retrieve entryobj from the server side, so I want to
use javascript to add the fid and fname to image link node as parameters of
the href url. the problem is the javascript loaded event function never got
called, why?
Thanks very much.
Dave
{{velocity filter="none"}}
{{html clean="false" wiki="true"}}
<script type="text/javascript">
//<![CDATA[
document.observe("xwiki:dom:loaded", function(){
var imageNode = document.getElementById('tmViewImages');
var url = imageNode.href;
var index = url.indexOf("?");
if(index!=-1)
url = url.substring(0,index-1);
url=url+"?FID=$!fid&FName=$!fname";
imageNode.href=url;
//]]>
</script>
#getEntryItemObject($doc $entryObj)
#if("$!entryObj" == '')
#warning($msg.get('xe.blog.sheet.notpost'))
## Keep testing the inline action for backward compatibility with older
blog posts.
#elseif($xcontext.action != 'edit' && $xcontext.action != 'inline')
## View mode
#set($fid=$entryObj.getProperty('FID').value)
#set($fname=$entryObj.getProperty('FName').value)
fid view: $fid
fname view: $fname
Hi devs,
while replacing calls to xwiki#searchDocuments by calls to the query
manager script service I ran into the following query manager issue:
http://jira.xwiki.org/browse/XWIKI-7273 (XWQL short form queries
should distinct on document fullname.)
I think we could use the recent QueryFilter mechanism to handle the
addition of the "distinct" in the select statement.
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwi…
QueryFilters allow to:
- transform queries depending on a dynamic parameter (for example the
user preferences in HiddenDocumentFilter)
- transform the select part of a short query, without requiring
programming rights
Here's an example of what it could look like from a velocity script:
----------------------------------------------------8<----------------------------------------------------
#set($query = $services.query.xwql("").addFilter("unique").addFilter("hidden"))
----------------------------------------------------8<----------------------------------------------------
Note that in the future we could decide that the Query wrapper we use
in the QueryManagerScriptService (ScriptQuery) have the "unique"
filter by default + a way to remove it from the script.
I wasn't expecting us to consider using multiple filters when I added
the new APIs in Query (4.0RC1).
If we agree that a QueryFilter would be a nice way to handle this, I'd
like to break those API before we release 4.0:
----------------------------------------------------8<----------------------------------------------------
- Query setFilter(QueryFilter filter);
+ Query addFilter(QueryFilter filter);
- QueryFilter getFilter();
+ List<QueryFilter> getFilters();
----------------------------------------------------8<----------------------------------------------------
WDYT ?
JV.
Hi devs,
We already have ApplicationStartedEvent and ApplicationReadyEvent (when DB is ready). We also need an event when the wiki is ready since in s a multiwiki environment when you create a new wiki for example, you might need to init some stuff (like initialize mandatory classes). It's also needed the first time a request comes in for a given wiki.
Thus I propose to add a WikiReadyEvent next to ApplicationStartedEvent and to send it in XWiki.updateDatabase():
...
synchronized (wikiName) {
if (!wikiList.contains(wikiName)) {
wikiList.add(wikiName);
// Make sure these classes exists
if (initClasses) {
initializeMandatoryClasses(context);
getPluginManager().virtualInit(context);
getRenderingEngine().virtualInit(context);
}
--> send WikiReadyEvent here
}
}
WDYT?
Note that I was tempted to have a WikiCreatedEvent event sent when creating a wiki but that wouldn't fill the use case of initializing the wiki on the first request to it.
Thanks
-Vincent
Am 13.04.2012 17:43 schrieb "Vincent Massol" <vincent(a)massol.net>:
>
> Hi devs,
>
> We already have ApplicationStartedEvent and ApplicationReadyEvent (when
DB is ready). We also need an event when the wiki is ready since in s a
multiwiki environment when you create a new wiki for example, you might
need to init some stuff (like initialize mandatory classes). It's also
needed the first time a request comes in for a given wiki.
>
> Thus I propose to add a WikiReadyEvent next to ApplicationStartedEvent
and to send it in XWiki.updateDatabase():
>
> ...
> synchronized (wikiName) {
> if (!wikiList.contains(wikiName)) {
> wikiList.add(wikiName);
>
> // Make sure these classes exists
> if (initClasses) {
> initializeMandatoryClasses(context);
> getPluginManager().virtualInit(context);
> getRenderingEngine().virtualInit(context);
> }
>
> --> send WikiReadyEvent here
>
> }
> }
>
Is it a good practise to call event listeners in the synchronized block?
(see Brian Götz, Java Concurrence in Practise, never call alien code from a
synchronized block)
My 2cents
Richard
> WDYT?
>
> Note that I was tempted to have a WikiCreatedEvent event sent when
creating a wiki but that wouldn't fill the use case of initializing the
wiki on the first request to it.
>
> Thanks
> -Vincent
> _______________________________________________
> devs mailing list
> devs(a)xwiki.org
> http://lists.xwiki.org/mailman/listinfo/devs
Hi devs,
Now that we have support for Hidden documents, I'd like to propose a general rule where to put XAR pages in platform modules.
The rule I'm proposing is:
* Each top level module in xwiki-platform-core/ that has a UI submodule should put its pages in a single space, generally named after the module but with a pretty name
Examples:
* xwiki-platform-appwithinminutes --> AppWithinMinutes (could also have been "App Within Minutes") (currently using: "AppWithinMinutes")
* xwiki-platform-index --> Index (currently using: "Main" and "XWiki")
* xwiki-platform-ircbot --> IRC (or "IRC Bot" or "IRCBot") (currently using: "IRC")
* xwiki-platform-livetable --> Livetable (currently using: "XWiki")
* xwiki-platform-user --> User (currently using: "XWiki")
etc
What's important is the rule: one module == one dedicated space
WDYT?
Note 1: This means that we the "Main" space will not be really needed anymore but I think we should keep it as the space name for the XE application for now (or we could introduce an application for it in xwiki-platform-core). It could simply contain the current Main.WebHome.
Note 2: When we add support for nested spaces, the rule would mean but we would be be able to better organize content in nested spaces.
Thanks
-Vincent
I deployed XWiki 3.5 on tomcat 7.0 , then it always occurs a OutOfMemory
Error:permgen space.Is there any good solution to it?I have changed the
configuration of tomcat to sovle the problem tentatively . But I want to
know if there any good solution or suggestion to it ? Thanks a lot.
hello devs,
having moved Curriki to the 3.5 core, we noticed our activity stream was having empty getDisplayBody... looking more closely revealed that the objects were all of type ActivityEvent while a family of sub-classes was available in the CurrikiActivityStream: the method ActivityStreamPluginApi.wrapEvents was made private hence its subclass was ignored!
This appears to have been made at https://github.com/xwiki/xwiki-platform/commit/1837196f0f6434603c4c24a13b7c… as part of a "code cleanup". Jean-Vincent, or someone else, could you explain the rationale behind it? I am sure this was checked for "others usages" but Curriki was not considered as part of that.
Having somewhat fixed this on my side by bringing more methods to the subclass (for the display of older events), I come to realize that newer events are also not of the right type so I'll have to hunt more for "compromised subclassing"...
This is rather an API breakage to my taste.
Has there been a policy about this?
Could we set-up one?
I wonder if such a search engine exists that would have indicated that such a breakage would have been avoided.
paul
Hi devs,
I'm implementing the LinkChecker UI and I want to be able to add a Tab in AllDocs. Right now I've coded it with a hardcoded #if but I really hate this.
So here's my proposal:
* Create the following modules:
xwiki-platform-uiextension/
|_ xwiki-platform-uiextension-ui/
|_ xwiki-platform-uiextension-api/
where:
* xwiki-platform-uiextension-ui/: contains XWiki.UIExtensionClass page
* xwiki-platform-uiextension-api/: contains a ScriptService to get UIExtension data + contains an EventListener that refreshes the UI Extension Cache when an UIExtensionClass object is modified (this is for performance reasons)
To start with I'm proposing to have the following fields for UIExtensionClass:
* type: String, represents the type of the extension (for example for the AllDocs needs, I'll use a "IndexTab" type (or "AllDocsTab" type)
* id: String, the technical name of the extension, which can be used for example as suffix for HTML class or ids.
* name: String, the name of the extension, which can be used for displaying. For example for the AllDocs needs, it would be used as the name of the Tab
* content: Textarea: the content of the extension. For example for the AllDocs needs, it would be used as the content to display when clicking on a tab
I'd like to implement this ASAP and thus stop hardcoding UI Extensions from now on.
Here's my +1
Thanks
-Vincent
PS: If you find a better than "uiextension" I'm all ears. A name without "extension" would be great to not confuse it with our Extensions (and with xwiki-platform-extension).
fyi…
-Vincent
Begin forwarded message:
> From: Robert Muir <rmuir(a)apache.org>
> Subject: [ANNOUNCE] Apache Solr 3.6 released
> Date: April 12, 2012 10:33:00 PM GMT+02:00
> To: dev(a)lucene.apache.org, solr-user(a)lucene.apache.org, Lucene mailing list <general(a)lucene.apache.org>, announce <announce(a)apache.org>
>
> 12 April 2012, Apache Solr™ 3.6.0 available
> The Lucene PMC is pleased to announce the release of Apache Solr 3.6.0.
>
> Solr is the popular, blazing fast open source enterprise search platform from
> the Apache Lucene project. Its major features include powerful full-text
> search, hit highlighting, faceted search, dynamic clustering, database
> integration, rich document (e.g., Word, PDF) handling, and geospatial search.
> Solr is highly scalable, providing distributed search and index replication,
> and it powers the search and navigation features of many of the world's
> largest internet sites.
>
> This release contains numerous bug fixes, optimizations, and
> improvements, some of which are highlighted below. The release
> is available for immediate download at:
> http://lucene.apache.org/solr/mirrors-solr-latest-redir.html (see
> note below).
>
> See the CHANGES.txt file included with the release for a full list of
> details.
>
> Solr 3.6.0 Release Highlights:
>
> * New SolrJ client connector using Apache Http Components http client
> (SOLR-2020)
>
> * Many analyzer factories are now "multi term query aware" allowing for things
> like field type aware lowercasing when building prefix & wildcard queries.
> (SOLR-2438)
>
> * New Kuromoji morphological analyzer tokenizes Japanese text, producing
> both compound words and their segmentation. (SOLR-3056)
>
> * Range Faceting (Dates & Numbers) is now supported in distributed search
> (SOLR-1709)
>
> * HTMLStripCharFilter has been completely re-implemented, fixing many bugs
> and greatly improving the performance (LUCENE-3690)
>
> * StreamingUpdateSolrServer now supports the javabin format (SOLR-1565)
>
> * New LFU Cache option for use in Solr's internal caches. (SOLR-2906)
>
> * Memory performance improvements to all FST based suggesters (SOLR-2888)
>
> * New WFSTLookupFactory suggester supports finer-grained ranking for
> suggestions. (LUCENE-3714)
>
> * New options for configuring the amount of concurrency used in distributed
> searches (SOLR-3221)
>
> * Many bug fixes
>
> Note: The Apache Software Foundation uses an extensive mirroring network for
> distributing releases. It is possible that the mirror you are using may not
> have replicated the release yet. If that is the case, please try another
> mirror. This also goes for Maven access.
>
> Happy searching,
>
> Lucene/Solr developers
Hi,
When talking with JV about the first 5 minutes experience, we thought about
adding some user roles inside XE.
>From the start the user could select his appropriate role inside the wiki
and we could customize his environment according to that role.
We talked about:
- display a "Get started" wizard the first time a user logs in:
Already proposed at:
http://incubator.myxwiki.org/xwiki/bin/view/Improvements/XWiki5MinutesPropo…
- when the user starts/finishes the wizard, he's asked to choose a
role/flavor: (normal, advanced), (user, developer, administrator), etc.
- choosing a role configures the wiki with some predefined values for the
profile preferences;
- a user can later fine tune his preferences.
You can see the proposal at
http://incubator.myxwiki.org/xwiki/bin/view/Improvements/UserRoles
Waiting for your feedback.
Thanks,
Caty