Hi Denis,
Just looked at the merged code (btw I can't find how to comment on it on github, it's a big mess), so I'm commenting here:
I noticed 2 issues:
* One is that even though I said in the vote mail that I didn't agree about keeping parameters in EntityReferences you've still kept them. Again I think we shouldn't keep them because we don't have an agreement about them ATM (Caleb is against them). Also you've exposed them with a protected method which means users can extend EntityReference and use them. As I said FTM I think you should move the notion of Locale **only** in DocumentReference since this is the only thing we've agreed about so far.
* You have some comments in DocumentReference like this:
* @param locale the new locale for this reference, if null, locale is removed
I don't understand what this means. How can it be removed since they are immutable and it's in a constructor :)
Also looking at setLocale I see:
protected void setLocale(Locale locale)
{
if (locale != null) {
setParameter(LOCALE, locale);
}
}
I don't see any removal.
Is it a leftover/typo?
Thanks
-Vincent
Hi devs,
I made some progress on the AppWithinMinutes and I'd like to get your
feedback. If you download the latest 3.3 snapshot and visit the
AppWithinMinutes.WebHome page you'll be able to test the class editor
and the live table generator. Here's a list of things that you should
check:
* on the class editor
** the field display is updated when the configuration panel is collapsed
** Save&Continue is available
** StaticList values editor
** Date picker
* on the live table generator
** the live table edit sheet
*** how the deprecated class fields are handled (you can edit in
object mode and add a column for a field that doesn't exist)
** the live table view sheet (this is how the application home page
will look like)
*** the Actions pane
** the generated code (edit in wiki mode the generated page)
The things that are left to do before the 3.3 final are:
* custom display (suggest input) for User, Group and Database List
field types (class editor)
* AppWithinMinutes wizard (integrating the class editor and the live
table generator)
* cross-browser testing (your help is welcome)
* i18n
* functional tests (I need more feedback on the UI first)
Regarding the LiveTable generator, I'm not happy with the i18n hack. I
adapted the code from
http://extensions.xwiki.org/xwiki/bin/view/Extension/Livetable+Macro+2.0
which "overwrites" the $msg variable with a map before rendering the
live table and restores it afterwards. Is there a better way?
Thanks,
Marius
Hi Jeremie,
It seems this is a regression I introduced in 3.2 when I refactored
the XWikiDocument class to use the new display module. The problem is
that the title is parsed as HTML which shouldn't be the case because
the title is plain text + Velocity script.
The title was parsed as HTML before my changes, but only if the output
syntax wasn't HTML (rare, since most of the time wiki pages are
rendered as HTML to be displayed in a browser).
Devs, do you see any issues with parsing the (specified) document
title as plain text (after the Velocity script has been evaluated)?
Thanks,
Marius
On Mon, Nov 14, 2011 at 3:58 PM, jerem <jeremie.bousquet(a)gmail.com> wrote:
> Hi,
>
> - There seem to be some bad displays when a page title contains '<' or '>'.
>
> Display is correct in browser title bar, it is also correct in main content
> area, in hierarchy, but not in page title. For a page with title "TestTest >
> test", generated html looks like this :
>
> <div id="hierarchy">
> TestTest > test
> </div>
> <div id="document-title">
> TestTest* &*gt; test
>
> </div>
>
> The bad trick is that the "&" of ">" gets replaced by "&" ...
>
> - as a side question, is there a way to easily do the equivalent of velocity
> "$escapetool.html($text)", but in {{groovy}} ? I use mainly groovy in my
> pages, and would like to avoid passing parameters between groovy and
> velocity just for this one use-case ...
>
> Thanks,
> Jeremie
>
> --
> View this message in context: http://xwiki.475771.n2.nabble.com/Characters-or-bad-display-in-page-title-t…
> Sent from the XWiki- Users mailing list archive at Nabble.com.
> _______________________________________________
> users mailing list
> users(a)xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
Hi devs,
After much brainstorming with Thomas and with the implementation of the new model I'm doing, we've come to the conclusion that it would be better to add the notions of Locale and Version in EntityReference.
The main reasons are:
* otherwise we need to introduce a notion of UniqueEntityReference in the model and it makes it very awkward at an API level (user need to constuct a UniqueEntityReference from an EntityReference depending on the APIs used)
* it makes APIs more complex than what they could be.
For example:
- getDocument(EntityReference)
- getDocument(EntityReference, Locale)
- getDocument(EntityReference, Version)
- getDocument(EntityReference, Locale, Version)
vs
- getDocument(EntityReference)
(subnote: this is why I introduced UniqueEntityReference in the model)
* It'll mean that anywhere we use an entity reference we'll be able to reference a specific version of that entity and/or a specific language. Some example: including a specific version of a page, referencing a specific version of an attachment in wiki syntax, etc.
In a first version I'd like to only introduce a generic get/setAttributes (to allow extensibility) in EntityReference + get/setLocale/Version (for easiness of access).
ATM I'm not planning to define a textual syntax for attributes (but it could something like: wiki:space.page[name1=value1, … nameN=valueN]). I'm not asking to vote on this.
Here's my +1
Thanks
-Vincent
Hi all.
Short version of my question: Can anyone point me to an example of
adding object of a custom class to a page via the ReSTful API?
And now for the long version of my question:
I can successfully create a page using REST, but can't add an object.
Here is the problem step by step.
1) Using this XML definition in a file called AlinaPage.xml:
<?xml version="1.0" encoding="UTF-8"?>
<xwiki:page xmlns:xwiki="http://www.xwiki.org"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.xwiki.org C:\Users\mwallace\
Desktop\xwiki_rest_model.xsd">
<xwiki:link
href="http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Main/pages/Alina+Frey/o…"
rel="http://www.xwiki.org/rel/o
bject"></xwiki:link>
<xwiki:id/>
<xwiki:fullName/>
<xwiki:wiki/>
<xwiki:space>Main</xwiki:space>
<xwiki:name>Alina Frey</xwiki:name>
<xwiki:title/>
<xwiki:parent/>
<xwiki:parentId/>
<xwiki:xwikiRelativeUrl/>
<xwiki:xwikiAbsoluteUrl/>
<xwiki:translations/>
<xwiki:syntax/>
<xwiki:language/>
<xwiki:version/>
<xwiki:majorVersion>1</xwiki:majorVersion>
<xwiki:minorVersion>0</xwiki:minorVersion>
<xwiki:created>2011-07-02T12:32:00-04:00</xwiki:created>
<xwiki:creator>XWiki.mwallace</xwiki:creator>
<xwiki:modified>2011-07-02T12:32:00-04:00</xwiki:modified>
<xwiki:modifier/>
<xwiki:content>{{include document="XWiki.PersonSheet"/}}</xwiki:content>
</xwiki:page>
2) I do the following command, which adds the page successfully:
C> curl -u mwallace:password -X PUT --data-binary "@AlinaPage.xml" -H
"Content-Type: application/xml"
http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Main/pages/Alina+Frey
3) The resulting page from a HTTP GET is:
<?xml version="1.0" encoding="UTF-8"?>
<page xmlns="http://www.xwiki.org">
<link href="http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Main"
rel="http://www.xwiki.org/rel/space"/>
<link
href="http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Main/pages/Alina%20Frey…"
rel="http://www.xwiki.org/rel/history"/>
<link href="http://localhost:8080/xwiki/rest/syntaxes"
rel="http://www.xwiki.org/rel/syntaxes"/>
<link
href="http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Main/pages/Alina+Frey"
rel="self"/>
<link
href="http://localhost:8080/xwiki/rest/wikis/xwiki/classes/Main.Alina%20Frey"
rel="http://www.xwiki.org/rel/class"/>
<id>xwiki:Main.Alina Frey</id>
<fullName>Main.Alina Frey</fullName>
<wiki>xwiki</wiki>
<space>Main</space>
<name>Alina Frey</name>
<title>Alina Frey</title>
<parent/>
<parentId/>
<xwikiRelativeUrl>http://localhost:8080/xwiki/bin/view/Main/Alina+Frey</xwikiRelativeUrl>
<xwikiAbsoluteUrl>http://localhost:8080/xwiki/bin/view/Main/Alina+Frey</xwikiAbsoluteUrl>
<translations/>
<syntax>xwiki/2.0</syntax>
<language/>
<version>4.1</version>
<majorVersion>4</majorVersion>
<minorVersion>1</minorVersion>
<created>2011-07-02T12:45:12-04:00</created>
<creator>XWiki.mwallace</creator>
<modified>2011-07-02T21:33:48-04:00</modified>
<modifier>XWiki.mwallace</modifier>
<content>{{include document="XWiki.PersonSheet"/}}</content>
</page>
4) But then, using this definition of an object in file AlenaObject.xml:
<?xml version="1.0" encoding="UTF-8"?>
<xwiki:object xmlns:xwiki="http://www.xwiki.org"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.xwiki.org C:\Users\mwallac
e\Desktop\xwiki_rest_model.xsd">
<xwiki:id/>
<xwiki:guid/>
<xwiki:pageId>Main.Alina Frey</xwiki:pageId>
<xwiki:wiki/>
<xwiki:space>Main</xwiki:space>
<xwiki:pageName>Alina Frey</xwiki:pageName>
<xwiki:className>XWiki.PersonClass</xwiki:className>
<xwiki:number>0</xwiki:number>
<xwiki:headline/>
<xwiki:property name="_knows">
<xwiki:value>Main.Alena</xwiki:value>
</xwiki:property>
<xwiki:property name="_knows">
<xwiki:value>Main.Judi Wallace</xwiki:value>
</xwiki:property>
<xwiki:property name="name">
<xwiki:value>Alina Frey</xwiki:value>
</xwiki:property>
</xwiki:object>
5) I try the following command, which does NOT insert the object properly:
C> curl -u mwallace:password -X PUT --data-binary "@AlinaObject.xml" -H
"Content-Type: application/xml"
http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Main/pages/Alina+Frey/o…
6) Rather, I get this error message:
<html>
<head>
<title>Status page</title>
</head>
<body>
<h3>The server has not found anything matching the request
URI</h3><p>You can get technical details <a
href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5">here</a>.<br>
Please continue your visit at our <a href="/">home page</a>.
</p>
</body>
</html>
What am I doing wrong?
--
Mark Wallace
Principal Engineer, Semantic Applications
Modus Operandi, Melbourne, FL, USA
Hi Team,
I am unable to resolve "outOfMemory" issue.I have already increased heap
size to 4000M but still getting the same error even on fresh installation.
Can someone from xwiki team help me to resolve this issue?
Thanks
Karamjit
Hello,
We want to make an Excel Export in XWiki but we have lot of problem.
Actually we are trying to make :
· A renderer to user XWiki Rendering Tool => It's ok
· A printer to return Excel content => Have a doubt about this solution
· A template to take Excel Content (xpage=excel) et push into OutputStream with => Not run
Have you idea about this kind of need ?
To last step, i have try to use it :
$response.setContentType("application/ms-excel")
$response.setHeader("Content-Disposition", 'inline; filename="my_excel.xls"')
$xcontext.setFinished(true)
$response.getOutputStream().write($myexcelcontent)
------------------------------------------------
Lionel ZUBER | UMA - Equipe technique
Centre de Service Rhône-Alpes | France
T : +33 4 69 64 63 20 | M: +33 6 76 90 54 47
lionel.zuber(a)logica.com<mailto:lionel.zuber@logica.com> | www.logica.fr<http://www.logica.fr>
P afin de contribuer au respect de l'environnement,
merci de n'imprimer ce mail qu'en cas de nécessité
Think green - keep it on the screen.
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
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