Thanks very much for the help on maven build.
*About making a object from Blog.BlogPostClass and toXML()*
A blog object is having properties of type other xobject classes. So to
make the things general can we do a stripped down replication or make
something similer to the java classes in com.xpn.xwiki.objects and its 2
sub packages .classes, .meta .
We can make a document object representing a page and put a
Blog.BlogPostClass object to its list of objects.We can convert them to
simple xml model directly.If we want to post blog object we can post the
Blog object.If the page does not exist we can put the page by getting the
xml from the Document object.
Then the things will be general not only for blog client app. Also we can
have Type checking when we don't directly manipulate simplexml objects.
i.e. XStringClass will define the attributes for it and likewise.
I don't have a good idea on the above packages and classes. Specially why
there are three classes for each XType ex: StringProperty, StringClass,
StringMeta.
It will be helpful if you can give an explanation.
My draft solution is to do some simple thing as,
XObject
|____ XBoolean
XObject
|____XString
XString has methods,
toEmbedXML gives a <property><attribute/>...</property> string/ simpleXML
objects
toXML gives <object><id><ClassName>.......</object> for the same thing.
Also
XObject
|_____ XBlogPost for(BlogPostClass and other 2 Meta,Property classes)
I don't yet have a clear idea on this. May be I am wrong on this.
Can you give me your idea here as well. How to approach the problem and
what should the design be like?
Thanks.
Best Regards
Sasinda.
On Thu, Jun 7, 2012 at 9:28 PM, Thomas Mortagne
<thomas.mortagne(a)xwiki.com>wrote:
> As just did a commit with last version of android plugin and some
> cleanup. Seems to work well.
>
> On Thu, Jun 7, 2012 at 12:19 PM, Thomas Mortagne
> <thomas.mortagne(a)xwiki.com> wrote:
> > BTW if you have quick questions it's probaly better to use IRC (I'm
> > tmortgane on the channel and I'm on GMT+2 tome zone but you can ask
> > anyone when I'm not around). See
> > http://dev.xwiki.org/xwiki/bin/view/Community/IRC.
> >
> > On Thu, Jun 7, 2012 at 12:17 PM, Thomas Mortagne
> > <thomas.mortagne(a)xwiki.com> wrote:
> >> Not need to send this kind of mail privately to me.
> >>
> >> On Thu, Jun 7, 2012 at 5:33 AM, sasinda rukshan
> >> <sasindarukshan(a)gmail.com> wrote:
> >>> Thanks,
> >>> The project is building perfectly well in eclipse (and runs well too)
> [I
> >>> configured the build paths for eclipse opening each module as a
> project and
> >>> giving project dependencies and etc.]. This is because android facet
> and
> >>> maven-android plugin for eclipse [m2e-android] (not the jayway androi
> maven
> >>> plugin)does not work together well.
> >>> Maven build does not work with newer jayway android maven plugins
> because of
> >>> the simplexml library. I checked with another helloworld app that does
> not
> >>> have simplexml dependancy and have simplexml dependancy. When we have
> the
> >>> dependancy it does not work. Also when packaged with the beta version
> maven
> >>> plugin I get runtime error logs notifying that the exact classes
> informed
> >>> missed in the compile time for newer maven plugin are missing. But the
> app
> >>> is running ok.
> >>> I will try with it some more and if I can't can you help me with it a
> >>> little.
> >>
> >> Sure If it's just related to simplexml it's probably not much. I will
> >> try to take a look today. At worst the version we are using right now
> >> is working fine so you can continue with it anyway.
> >>
> >>>
> >>> I looked at the Enterprise platform apis just to make my apis similar
> when
> >>> possible.Source code is not at all relevant to me. But as you say It
> will be
> >>> imperfect if I use its style heavily for the mobile version as well.
> >>
> >> Yes there is several issues here:
> >> * most APIs in oldcore module are old and bad and we are trying to get
> >> rif of them so better not getting too much attached to it ;)
> >> * they are designed to run in an enironment with lots of resources and
> >> don't care as much as a mobile API should about memory, etc.
> >>
> >>>
> >>>
> >>> Thank you.
> >>> Best Regards.
> >>> Sasinda.
> >>>
> >>>
> >>> On Wed, Jun 6, 2012 at 1:03 PM, Thomas Mortagne <
> thomas.mortagne(a)xwiki.com>
> >>> wrote:
> >>>>
> >>>> On Tue, Jun 5, 2012 at 7:07 PM, sasinda rukshan
> >>>> <sasindarukshan(a)gmail.com> wrote:
> >>>> > Hi,
> >>>> > *1: User Config Saving*
> >>>> > *
> >>>> > *
> >>>> > Xwiki android can now save user login data.
> >>>> > I refered
> >>>> > http://platform.xwiki.org/xwiki/bin/view/AdminGuide/AccessWiki.
> >>>> > Currently assuming the authority
> >>>> >
> >>>> > part(platform.xwiki.org<
> http://platform.xwiki.org/xwiki/bin/view/AdminGuide/AccessWiki>)
> >>>> > only
> >>>> > as a unique wiki identifier. But in the
> org.xwiki.android.entity.User I
> >>>> > have the method
> >>>> > setXWikiRealm(String url);:
> >>>> > Here I have intended the meaning realm as the url root path for a
> unique
> >>>> > wiki instance.
> >>>> > i.e. it should identify a wiki using path upto
> >>>> > http://host/xwiki/wiki/wikialias/
> >>>> > But that functionality is not implemented.I just mailed this asking
> for
> >>>> > the
> >>>> > opinion wether the usage of word realm was right here.
> >>>> > Also do you have seperate users for wikis for path based wiki
> access.Or
> >>>> > are they the same with the main wiki *http://<host>/xwiki*.
> >>>>
> >>>> Both actually, you can have global users (which are the one on main
> >>>> wiki) and local users.
> >>>>
> >>>> > *2: Entity model*
> >>>> > *
> >>>> > *
> >>>> > About the convention for using C_ prefix for core entity tables. I
> >>>> > was referring to make the android versions of these entities
> >>>> > http://platform.xwiki.org/xwiki/bin/view/DevGuide/DatabaseSchemaand
> >>>> > start
> >>>> > there db prefixes with C_
> >>>> > This is because other apps may need to store some specific tables
> needed
> >>>> > for them. Rather than having a seperate DB schema for them we can
> put
> >>>> > those
> >>>> > tables here as well prefixing them with <appname>_ .
> >>>> > I added more entities like User as well to the core entities(table
> >>>> > C_User).Also will implement a Log Entity(C_Log table) for logging
> some
> >>>> > important application activities(such as login attempts) But the
> Log may
> >>>> > be
> >>>> > a little additional weight to the space and performance.I may
> implement
> >>>> > a
> >>>> > generic DBCleaning service to clean the tables like Log, if I have
> time.
> >>>> > (Perhaps this description will resolve the confusion about the DB
> >>>> > conventions. Sorry I was not very clear in that earlier mail. ;-).)
> >>>> >
> >>>> > I am sorry to say I am somewhat confused with all those entities in
> >>>> > http://platform.xwiki.org/xwiki/bin/view/DevGuide/DatabaseSchema.
> >>>>
> >>>> The XWiki model is based on generic classes and objects wich is why
> >>>> you see lots of tables (class properties, object properties , etc.).
> >>>> There is no table for users for example, its an object of class
> >>>> XWiki.XWikiUsers.
> >>>>
> >>>> >
> >>>> > Any way to reduce my confusion
> >>>> > I refered
> >>>> > 1) XWiki Data
> >>>> > Model<http://platform.xwiki.org/xwiki/bin/view/DevGuide/DataModel>
> >>>> > :
> >>>> > can you give me a link to a documentation that explains the
> workflow
> >>>> > of
> >>>> > how a normal request is converted in to the requested page by the
> >>>> > bin View action . So I can get a better understanding of how
> classes ,
> >>>> > objects are used.
> >>>>
> >>>> Not sure there is one. but basically you get either:
> >>>> * document content executed
> >>>> * if a class sheet is defined for one of the document objects classes,
> >>>> the class sheet is executed
> >>>> * if a document sheet is defined for the documment, the document sheet
> >>>> is executed
> >>>>
> >>>> That's pretty much all, then is a matter of free script and wiki
> >>>> syntax to actually display the content.
> >>>>
> >>>> > 2) package com.xpn.xwiki.api: I don't need to consider this, do I?
> >>>>
> >>>> That's limited scripting API so you should not consider this.
> >>>>
> >>>> > 3)
> >>>> > Cache<
> http://extensions.xwiki.org/xwiki/bin/view/Extension/Cache+Module>
> >>>> > : Need not implement similar component. Android OS does it nicely
> for
> >>>> > the
> >>>> > REST responses
> >>>> > but still don't have a clear picture on this.
> >>>> > To save a blog doc
> >>>> > option 1)Seems like I have to convert a document entity to relevent
> >>>> > xwiki-model-simplexml entities and send to server.
> >>>> > option 2) We also can edit the relevent simplexml model object
> fields
> >>>> > directly. (Looks a bad option to me.It does not hide the complexity
> of
> >>>> > lower levels for the client layer.Anyway my work load is reduced
> with
> >>>> > opt:2 ;-))
> >>>>
> >>>> IMO you should not even look at
> >>>> http://extensions.xwiki.org/xwiki/bin/view/Extension/Cache+Module and
> >>>> instead look at how caching is usually done in Android. The idea is
> >>>> not to port the xwiki-platform to Android IMO but to follow Android
> >>>> standards to provide a library to manipulate XWiki model.
> >>>>
> >>>> You can set the annotation you want to the simplexml model but the
> >>>> classes/methods should remain an exact copy of what's on
> >>>> xwiki-platform-rest-model. The idea being that we could decide to
> >>>> change the implementation from simplexml to anything (JAXB, gson,
> >>>> etc.) without breaking anything.
> >>>>
> >>>> >
> >>>> >
> >>>> > *3: Development/architectural approach Change*
> >>>> > *
> >>>> > *
> >>>> > I was first thinking for a addon like architecture for the XWiki
> android
> >>>> > app. We have the client.Main app (with all platfrom libs included)
> and
> >>>> > Blog
> >>>> > app as a seperate apk.
> >>>> > But here Blog app will need to have the platform lib also. That
> would be
> >>>> > a
> >>>> > complete waste of space. But dynamically extending the app is lot
> >>>> > easier.
> >>>> > The client.Main app can add the activities defined in other apks in
> to
> >>>> > its
> >>>> > launcher interface using android PackageManager class.
> >>>> >
> >>>> >
> http://stackoverflow.com/questions/9236803/android-build-an-application-tha…
> >>>> > But with this approach rises additional complexities. For example
> naming
> >>>> > conflicts in the Components library module when two apps have the
> same
> >>>> > library with same activities defined. Sync issues etc etc....
> >>>> > So we will go with single .apk approach.
> >>>> > When going with single .apk we dont need a content provider to share
> >>>> > config/ preferences data. So sharing module is now not needed. The
> >>>> > client
> >>>> > applications now can directly access the Configuration.java class to
> >>>> > get/put configuration entries.
> >>>> > Also since I am having a User entity a configuration like
> >>>> > defaultUser(currently the admin user , hard coded in login.xml
> layout
> >>>> > file)
> >>>> > will only be needed for the first use of the app. Otherwise users
> need
> >>>> > not
> >>>> > configure a default user as the application now suggests the user
> names
> >>>> > and
> >>>> > automatically fill the rest.
> >>>>
> >>>> Keep in mind that the main goal of this project is to provide tools
> >>>> for any application to access an XWiki instance and manipulate its
> >>>> datas easily an improving those libraries should always be the first
> >>>> goal. Your blog application is here as a good demo and because it's
> >>>> hard to design a library without using it.
> >>>>
> >>>> I really don't understand why you talk about naming conflict. Of
> >>>> course a library should never provide a complete final activity but
> >>>> only interface components (View), fragments or base activities to
> >>>> extend. Putting those elements in an activity is each application job.
> >>>> An activity is by definition unique so it has nothing to do in a
> >>>> library. The complete activities in
> >>>>
> >>>>
> https://github.com/xwiki-contrib/android-client/tree/master/xwiki-android-c…
> >>>> should have never been there, it's actually a mistake.
> >>>>
> >>>> >
> >>>> > *4: Plan for this week*
> >>>>
> >>>> As a priority you should really merge your branch as soon as you have
> >>>> something building fine. So that it goes through Jenkins and deploy
> >>>> snapshot build of what you do. Jenkins will tells you in live when
> >>>> your project does not build anymore or if there is any test failing
> >>>> and it allows anyone to very easily test the current test of the
> >>>> client just by installing the apks on
> >>>> http://maven.xwiki.org/snapshots/org/xwiki/android/. You need to have
> >>>> something working and in good shape to succeed the GSOC so fixing when
> >>>> you break something in your build should be your priority over adding
> >>>> more features.
> >>>>
> >>>> Also as I commented in your commit you should be more careful on what
> >>>> you commit. There is many binaries and Eclipse stuff in your branch.
> >>>>
> >>>> > *
> >>>> > *
> >>>> > Make a launch pad .We can launch XWiki Navigator, blog etc from
> this.
> >>>> > The
> >>>> > launch pad is shown when we launch XWiki main client.
> >>>> > Consider adding the WYSIWYG to my blog. It will be useless without
> the
> >>>> > ability to convert text formatting to xwiki syntax.So I may just
> >>>> > integrate
> >>>> > it and ignore the uselessness for now.
> >>>>
> >>>> Not exactly, you could actually reuse WYSIWYG service to send html and
> >>>> let it convert it to wiki syntax. Note that you are not limited to
> >>>> what you can find in the current Android library. This is just what
> >>>> Chamika had the time to do. There is others REST (or not REST) server
> >>>> interfaces you can use in your client or even add more if its generic
> >>>> enough and make sense for something else than just Android client.
> >>>>
> >>>> > We currently don't have any config to save( Other than default user)
> >>>> > config. I will add some demo config data and have a developer tools
> app
> >>>> > added to the above mentioned XWiki launch pad that can view/edit the
> >>>> > config
> >>>> > file.
> >>>> >
> >>>> > That will complete milestone 1. But it is not the Sharing
> >>>> > module(intended
> >>>> > to share data with other .apks).That is the configuration component
> does
> >>>> > not have a ContentProvider to share config data with other apks.
> Also I
> >>>> > will define a seperate class to have preferences which will be
> edited by
> >>>> > users. Config files are for configuration stuff and will be edited
> by
> >>>> > developers. Users have preferences files(natively supported by
> android)
> >>>> > to
> >>>> > change app preferences. For example users will add the default login
> >>>> > username as a preference.(This will invalidate the use of default
> User
> >>>> > entry in the config file which is used until the user edits his
> >>>> > preferences)
> >>>>
> >>>> I'm fine with not sharing datas between applications but it does not
> >>>> prevent the libraries to provide tools to manage those datas in a per
> >>>> application basis.
> >>>>
> >>>> >
> >>>> > Beg your pardon if the mail is too lengthy.;-)
> >>>>
> >>>> No problem, never too much information for this ;)
> >>>>
> >>>> > Thank you.
> >>>> > Best Regards.
> >>>> >
> >>>> > Sasinda Rukshan.
> >>>> >
> >>>> >
> >>>> > Best Regards.
> >>>> >
> >>>> >
> >>>> > On Wed, May 30, 2012 at 1:11 PM, Thomas Mortagne
> >>>> > <thomas.mortagne(a)xwiki.com>wrote:
> >>>> >
> >>>> >> On Wed, May 30, 2012 at 4:28 AM, sasinda rukshan
> >>>> >> <sasindarukshan(a)gmail.com> wrote:
> >>>> >> > Hi,
> >>>> >> > I am studying ORM Lite these days.
> >>>> >> > Please It would be comforting if you can confirm whether it is
> worth
> >>>> >> > the
> >>>> >> > overhead to use ORM Lite.
> >>>> >> >
> >>>> >>
> >>>> >>
> http://logic-explained.blogspot.com/2011/12/using-ormlite-in-android-projec…
> >>>> >> > http://ormlite.com/
> >>>> >> > ORM Lite features:
> >>>> >> > Automatically Creates standard DAOs for an annotated entity.
> >>>> >> > Coding will be lot easier.
> >>>> >>
> >>>> >> Remember it's a framework for a mobile platform so it has to remain
> >>>> >> light and have good performances. I can see that Android version of
> >>>> >> ormlite is very small but I never used it so I don't know if it's
> good
> >>>> >> or not. At least it seems petty active which is a good point so I
> >>>> >> don't have anything against it.
> >>>> >>
> >>>> >> >
> >>>> >> > Can you suggest how to name the entities.
> >>>> >> > I am going to go with,
> >>>> >> > <entity> org.xwiki.xdroid.data.User --> <table> C_USER
> >>>> >>
> >>>> >> Note that there is already a package name prefix and group id
> defined
> >>>> >> for the framework and it's org.xwiki.android as you can see on
> >>>> >> https://github.com/xwiki-contrib/android-client. Why do you want
> to
> >>>> >> change it ? It's more consistent with
> >>>> >> org.xwiki.commons/org.xwiki.rendering/org.xwiki.platform so I would
> >>>> >> prefer to keep it that way unless you can give arguments. The goal
> is
> >>>> >> not to redo something completely but complete and improve the
> existing
> >>>> >> framework.
> >>>> >>
> >>>> >> Also as far as I can see there is already several things called
> >>>> >> "xdroid" on Google play among which an application developer
> >>>> >> (https://play.google.com/store/apps/developer?id=x-droid) and an
> >>>> >> application (
> >>>> >>
> >>>> >>
> https://play.google.com/store/apps/details?id=com.gurudigitalsolutions.xdro…
> >>>> >> ).
> >>>> >>
> >>>> >> >
> >>>> >> > Thanks,
> >>>> >> > Best Regards
> >>>> >> >
> >>>> >> > Sasinda.
> >>>> >> >
> >>>> >> >
> >>>> >> >
> >>>> >> >
> >>>> >> >
> >>>> >> > On Wed, May 30, 2012 at 7:42 AM, sasinda rukshan
> >>>> >> > <sasindarukshan(a)gmail.com>wrote:
> >>>> >> >
> >>>> >> >> Hi,
> >>>> >> >>
> >>>> >> >> I am commiting my work to my fork
> >>>> >> >> https://github.com/sasinda/android-client.
> >>>> >> >> I ll request to pull it to xwiki-contrib later.
> >>>> >> >>
> >>>> >> >> I was running in a wrong path these days. Wanted to save login
> >>>> >> >> history
> >>>> >> and
> >>>> >> >> suggest login. I was going to do it using an xml file (login
> >>>> >> attempts.xml).
> >>>> >> >> Now it seems database is better.
> >>>> >> >> Any way before I go wrong again I will say what I am going to
> do.
> >>>> >> >> I am going to enforce following conventions.These are not yet
> >>>> >> >> needed,
> >>>> >> >> considered the small scale.But when the system grows it would be
> >>>> >> >> nice to
> >>>> >> >> have them to avoid confusions.
> >>>> >> >> *Database prefixes for:*
> >>>> >> >> *Platform tables (can begin with appropriate prefix)*
> >>>> >> >> AD_ //application dictionary : don't know when it will be
> needed ;-)
> >>>> >> >> C_ //core functionality
> >>>> >> >> *Client Applications.*
> >>>> >> >> X<App name prefix> ex: XBLOG_ for Blog app// All client add
> in
> >>>> >> modules
> >>>> >> >> must begin with table prefix X(for xwiki and ordering) + App
> name.
> >>>> >> This is
> >>>> >> >> for my blog.
> >>>> >> >>
> >>>> >> >> I will create
> >>>> >> >> C_User for user data.
> >>>> >> >> C_LoginAttempt for saving login attempts.
> >>>> >> >>
> >>>> >> >> From C_LoginAttempt I can filter uniqe login combinations and
> give
> >>>> >> >> suggestions in the login UI component. Also save the history.
> >>>> >> >>
> >>>> >> >> All saved data for blog app will be linked to a perticular
> login :
> >>>> >> >> User,
> >>>> >> >> XWiki server.
> >>>> >> >> But only a single user will be most probably using his personal
> >>>> >> >> device.
> >>>> >> So
> >>>> >> >> above will be relevant only when he has multiple wikis.
> >>>> >> >>
> >>>> >> >> Best Regards,
> >>>> >> >> Sasinda Rukshan.
> >>>> >> >>
> >>>> >> >>
> >>>> >> >>
> >>>> >> >>
> >>>> >> >>
> >>>> >> >> On Sun, May 27, 2012 at 5:43 PM, Chamika Weerasinghe <
> >>>> >> chamikaw(a)gmail.com>wrote:
> >>>> >> >>
> >>>> >> >>> On Fri, May 25, 2012 at 1:25 AM, Jerome Velociter <
> >>>> >> jerome(a)winesquare.net
> >>>> >> >>> >wrote:
> >>>> >> >>>
> >>>> >> >>> > On Thu, May 24, 2012 at 6:09 PM, Thomas Mortagne
> >>>> >> >>> > <thomas.mortagne(a)xwiki.com> wrote:
> >>>> >> >>> > > On Thu, May 24, 2012 at 5:52 PM, sasinda rukshan
> >>>> >> >>> > > <sasindarukshan(a)gmail.com> wrote:
> >>>> >> >>> > >> Hi all,
> >>>> >> >>> > >> I am starting this thread for my XWiki Android Platform
> >>>> >> >>> > >> Project.
> >>>> >> >>> > >>
> >>>> >> >>> > >> Please check whether following are OK.
> >>>> >> >>> > >> [1] INFO
> >>>> >> >>> > >> I tried to start my new modules with the
> >>>> >> >>> de.akquinet.android.archetypes:
> >>>> >> >>> > >> android-quickstart:1.0.8. (added eclipse plugins m2e,
> >>>> >> >>> > >> m2e-android[a.k.a *Android
> >>>> >> >>> > >> Configurator* ]). But this seems buggy in eclipse.
> >>>> >> >>> > >> Any way the earlier project has not followed the above
> >>>> >> >>> > >> archtype
> >>>> >> >>> either.
> >>>> >> >>> > So
> >>>> >> >>> > >> I am going to write pom.xml manually for my each module.
> >>>> >> >>> > >>
> >>>> >> >>> > >> [2] ADVICE NEEDED
> >>>> >> >>> > >> xwiki-rest-model module contains 2 submodules
> >>>> >> >>> > >> |-- xwiki-rest-model-gson ( gson should be corrected to
> >>>> >> >>> > >> json)
> >>>> >> >>> > >
> >>>> >> >>> > > No the g is not a mistake, it's a model to be used with the
> >>>> >> >>> > > gson
> >>>> >> >>> > > library (http://code.google.com/p/google-gson/). See
> >>>> >> >>> > >
> >>>> >> >>> >
> >>>> >> >>>
> >>>> >>
> >>>> >>
> http://extensions.xwiki.org/xwiki/bin/view/Extension/Google+Android+Client#…
> >>>> >> >>> > .
> >>>> >> >>> > >
> >>>> >> >>> > >> |-- xwiki-rest-model-simplexml
> >>>> >> >>> > >> I think the xwiki-rest-model-gson is redundant. The
> classes
> >>>> >> >>> > >> in xwiki-rest-model-simplexml is added with simple xml
> >>>> >> annotations,
> >>>> >> >>> > >> otherwise both modules have same classes. There is no
> problem
> >>>> >> >>> > >> with
> >>>> >> >>> the
> >>>> >> >>> > >> added annotations for using the same model objects for
> Json
> >>>> >> >>> > >> REST
> >>>> >> web
> >>>> >> >>> > >> services. And I intend to add my JPA (ORMLite library for
> >>>> >> >>> persistence)
> >>>> >> >>> > >> annotations on top of it.
> >>>> >> >>> > >> Shall I re-factor them to a single module
> xwiki-rest-model.
> >>>> >> >>> > >
> >>>> >> >>> > > No keep them separated, the idea is that both are useful
> tool
> >>>> >> >>> > > to be
> >>>> >> >>> > > used by someone else that might be moved to xwiki-platform
> at
> >>>> >> >>> > > some
> >>>> >> >>> > > point along with the current xwiki-rest-model (to be
> renamed to
> >>>> >> >>> > > xwiki-rest-model-jaxb).
> >>>> >> >>> > >
> >>>> >> >>> > > Chamika initially started with gson and since XWiki REST
> JSON
> >>>> >> >>> > > representation had some limitation he moved to XML
> >>>> >> >>> > > representation.
> >>>> >> >>> > > Maybe at some point Android will have native support for
> jaxb
> >>>> >> >>> > > which
> >>>> >> >>> > > would obviously be the easier for us (embedding jaxb is
> not an
> >>>> >> option
> >>>> >> >>> > > in mobile world where size it still pretty important
> especially
> >>>> >> >>> > > on
> >>>> >> >>> > > phones). Maybe it's already the case on most recent
> versions
> >>>> >> >>> > > like
> >>>> >> 4.0
> >>>> >> >>> > > I don't know.
> >>>> >> >>> >
> >>>> >> >>> > There's also Jackson that could be tried for JSON
> >>>> >> >>> > deserialization, if
> >>>> >> >>> > said limitations are actually GSON limitations.
> >>>> >> >>> >
> >>>> >> >>> GSON wasn't the limitation.
> >>>> >> >>> It was XWiki RESTful API which doesn't support JSON in some
> cases.
> >>>> >> >>> So
> >>>> >> it's
> >>>> >> >>> safe to go with xml.
> >>>> >> >>>
> >>>> >> >>> >
> >>>> >> >>> > Having full JAXB support sound a bit overweight for such an
> >>>> >> >>> > "embedded
> >>>> >> >>> > API", even if one day it is natively supported by Android.
> What's
> >>>> >> >>> > important is to have an easy and fast deserialization, IMO.
> >>>> >> >>> > The only advantage I can see of going JAXB would be in
> re-using
> >>>> >> >>> > the
> >>>> >> >>> > exact representations and body readers/writers from XWiki
> core.
> >>>> >> >>> > But
> >>>> >> >>> > you probably don't even want to do that since it would mean
> >>>> >> >>> > dragging
> >>>> >> >>> > XWiki core with you :)
> >>>> >> >>> >
> >>>> >> >>> > Jerome
> >>>> >> >>> >
> >>>> >> >>> > >
> >>>> >> >>> > >>
> >>>> >> >>> > >> [3] INFO
> >>>> >> >>> > >> I had to change some pom.xml s. As the current project
> at:
> >>>> >> >>> > >> https://github.com/xwiki-contrib/android-client.git does
> not
> >>>> >> build.
> >>>> >> >>> > Error
> >>>> >> >>> > >> with parent pom.xml coordinates.
> >>>> >> >>> > >
> >>>> >> >>> > > You probably did not setup you maven install properly since
> >>>> >> >>> > > what's
> >>>> >> on
> >>>> >> >>> > > https://github.com/xwiki-contrib/android-client.git build
> >>>> >> perfectly
> >>>> >> >>> as
> >>>> >> >>> > > you can see on
> >>>> >> http://ci.xwiki.org/view/All/job/xwiki-android-client/
> >>>> >> >>> > > which run a build every time something changes on the git
> >>>> >> repository..
> >>>> >> >>> > > You should look at
> >>>> >> >>> > > http://dev.xwiki.org/xwiki/bin/view/Community/Building.
> >>>> >> >>> > >
> >>>> >> >>> > >>
> >>>> >> >>> > >>
> >>>> >> >>> > >> Thank you
> >>>> >> >>> > >> Best Regards.
> >>>> >> >>> > >> Sasinda Rukshan
> >>>> >> >>> > >> _______________________________________________
> >>>> >> >>> > >> devs mailing list
> >>>> >> >>> > >> devs(a)xwiki.org
> >>>> >> >>> > >> http://lists.xwiki.org/mailman/listinfo/devs
> >>>> >> >>> > >
> >>>> >> >>> > >
> >>>> >> >>> > >
> >>>> >> >>> > > --
> >>>> >> >>> > > Thomas Mortagne
> >>>> >> >>> > > _______________________________________________
> >>>> >> >>> > > devs mailing list
> >>>> >> >>> > > devs(a)xwiki.org
> >>>> >> >>> > > http://lists.xwiki.org/mailman/listinfo/devs
> >>>> >> >>> >
> >>>> >> >>> >
> >>>> >> >>> >
> >>>> >> >>> > --
> >>>> >> >>> > Jérôme Velociter
> >>>> >> >>> > Winesquare
> >>>> >> >>> > http://www.winesquare.net/
> >>>> >> >>> > _______________________________________________
> >>>> >> >>> > devs mailing list
> >>>> >> >>> > devs(a)xwiki.org
> >>>> >> >>> > http://lists.xwiki.org/mailman/listinfo/devs
> >>>> >> >>> >
> >>>> >> >>> _______________________________________________
> >>>> >> >>> devs mailing list
> >>>> >> >>> devs(a)xwiki.org
> >>>> >> >>> http://lists.xwiki.org/mailman/listinfo/devs
> >>>> >> >>>
> >>>> >> >>
> >>>> >> >>
> >>>> >> > _______________________________________________
> >>>> >> > devs mailing list
> >>>> >> > devs(a)xwiki.org
> >>>> >> > http://lists.xwiki.org/mailman/listinfo/devs
> >>>> >>
> >>>> >>
> >>>> >>
> >>>> >> --
> >>>> >> Thomas Mortagne
> >>>> >> _______________________________________________
> >>>> >> devs mailing list
> >>>> >> devs(a)xwiki.org
> >>>> >> http://lists.xwiki.org/mailman/listinfo/devs
> >>>> >>
> >>>> > _______________________________________________
> >>>> > devs mailing list
> >>>> > devs(a)xwiki.org
> >>>> > http://lists.xwiki.org/mailman/listinfo/devs
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> Thomas Mortagne
> >>>
> >>>
> >>
> >>
> >>
> >> --
> >> Thomas Mortagne
> >
> >
> >
> > --
> > Thomas Mortagne
>
>
>
> --
> Thomas Mortagne
>
Is there a version of the Groovy Console (
http://extensions.xwiki.org/xwiki/bin/view/Extension/Groovy+Console+Applica…
) that is compatible with XWiki 3.5?
When I try to run it, I see missing icons ( referencing old skins,
which I fixed), but now get the following JavaScript errors after
attempting to execute my Groovy code:
Uncaught ReferenceError: CodeMirror is not defined
var editor = CodeMirror.fromTextArea('script', {
And "Uncaught TypeError: Cannot call method 'getCode' of undefined"
var ajx = new Ajax.Request("$scriptDoc.getURL('save')" , {
parameters:
{"XWiki.ConsoleScriptClass_${scriptObj.number}_code":editor.getCode(),
"ajax":"1"},
onComplete:function(transport){
$('saveLoading').addClassName("hidden");
$('saveStatus').removeClassName("hidden");
$('saveStatus').innerHTML = "Saved !";
var foo = new Effect.Highlight('saveStatus');
setTimeout(function(){
$('saveStatus').innerHTML = "";
$('saveStatus').addClassName("hidden");
}, 5000);
}
I guess I could keep plugging away and trying to fix this, but was
wondering whether there's a newer version of the Groovy Console
compatible w/ XWiki 3.5 and beyond, or is there some simple fix to the
problems outlined above?
Seems like this has been noted as a problem previously:
http://lists.xwiki.org/pipermail/users/2011-October/020745.html
I attempted installing 'SyntaxHighlighting' (says its "CodeMirror
based syntax highlighting ...") and noticed it now adds new error at
startup in the GroovyConsole:
Uncaught TypeError: Object function
a(f,g){if(g.dumbTabs){g.tabMode="spaces"}else{if(g.normalTab)
Suggesting problems w/ this extension as well. I do note that my
existing scripts now have pretty syntax highlighting... so it is
working. Unfortunately, it also forces the wiki-code editor to appear
below the wysiwyg and makes the wysiwyg area too small. So I
uninstalled it and my Wysiwyg now works as before....
Any way of getting Groovy Console functionality working? Seems like a
great way to work with cloud-based XWiki installs, such as mine...
Thanks,
-- Niels
http://www.nielsmayer.com
Hi,
I want to list some ideas about Extension Manager that come to my mind. I'm
sure others thought about them already or will find the time to make some
other suggestions:
1) Filtering core extensions
Would be nice to be able to view preinstalled applications with EM.
Right now everything that comes preinstalled is found inside 'Core
extensions'.
There are a lot of technical extensions, but there are also some extensions
that could be of general knowledge. For example it would be nice to see
what functionality a default wiki has in terms of applications and macros
(even nicer if we think about future flavored packages). This would allow
the administrator to quickly scan and customize the tools at his disposal.
Maybe it would be interesting to have some filtering functionality.
This way I could filter for applications and see that I have preinstalled
'Activity Stream', 'Annotations', 'Search', 'WYSIWYG', 'Message Stream',
etc. and if I filter for macros I could get 'Chart macro', 'Box macro',
'Display macro', 'Message macro', etc.
2) Enable/Disable applications from inside EM
Another idea is for the EM to sustain enable/disable actions for
installed/core applications/macros. Right now applications like
'Annotations', 'Search Suggest', 'Message Stream', even 'OpenOffice Server'
have special settings that permit to enable ('activate') them. This
functionality could be covered by the EM and not display anymore special
administration sections for each applications.
3) Integrate application configuration inside EM
If EM will manage installed applications and would also allow the
enabling/disabling part, than is normal that the application configuration
should be made also from inside the EM and not as a separate Administration
component.
Although all things in XWiki are extensions and components, we would need
to get along what the lightest version of xwiki would contain (in terms of
functionality and not components). For this default functionalities (Users,
Rights, Localization, Presentation, Import/Export, etc.) the Administration
sections would be still used, since they could be considered core elements
and not something that can be disabled or uninstalled.
Maybe all the thoughts I am writing here could also be solved if we rewrite
some functionality like 'Activity Stream', 'Annotations', some macros, etc.
and not display them anymore as 'Core Extensions' but rather as 'Installed
Extensions'.
Thanks,
Caty
Hello developers,
I seem to see a regression whereby a POST to an /xwiki/bin/upload/ request no more uses the xredirect parameter and simply redirects to the page.
Is this a known change?
Is it supposed to have been working being undocumented and can try to find a fix?
Or should I simply try to adjust the client (tremble tremble).
thanks in advance
Paul
Dear all,
some notes about my recent upgrade from 3.5 wiki farm to a 4.0
-- Sysem --
* Xwiki 4.0 farm (the old way, independent farm)
* Jetty package that you provided xwiki-manaer-mysql-4.0
* 4 wikis (2 active, one template and the manager)
* File attachments on filesystem
-- Question --
1) After I have upgraded from xem 3.5 to xem 4.0 all previously
installed extensions have been removed from XEM control panel (but
extension pages are still present) - minor bug, I have solved it
reinstalling all extensions.
2) Since XEM 3.5 xwiki-manager can setup two different kind of
multiple wikis: a) workspaces b) the old way wikifarm.
- What is exactly the difference between that two?
- XEM home page suggests to create workspaces and the old wikifarm is
placed in a sub page, this create some confusion. I would prefer to
have both options on the home page with some notes that explain
differences. Personally I use the wiki farm (independent wikis).
3) In wikifarm (independent wikis) management of extensions is not
clear.
- If I install an extension from XEM it is installed in all sub-wikis,
but if I remove it, it is removed only from XEM and not from sub-wikis
(pages are still present but extension disappear form sub-wikis
control panel, so it is impossible to completely remove them)
- If I install an extension in sub-wiki, it is listed in XEM, but if I
select it I see many errors.
-- Bugs --
- One of the two wiki is constantly loosing web preferences settings
(skins and localization template), no error in file log, really
annoying and hard to debug.
- Since webpreferences settings are lost, it is impossible to know
what extensions were installed
-- Workaround --
- Is it possible to have multiple wiki (completely independent)
without using Xem?
-- My proposal --
- If an extension is installed in XEM it can be removed only from XEM
and this remove the extension form all sub-wikis (we could delete
pages and send them in the recycler bin for better security)
- If an extension is installed in sub-wikis it is only listed in the
relative control panel of that wiki
Thank you,
Gianluca
On 06/13/2012 06:09 PM, Sergiu Dumitriu wrote:
> On 06/13/2012 09:17 AM, Vincent Massol wrote:
>>
>> On Jun 13, 2012, at 2:52 PM, Anca Luca wrote:
>>
>>> On 06/13/2012 02:44 PM, Vincent Massol wrote:
>>>> On Jun 13, 2012, at 2:39 PM, Anca Luca wrote:
>>>>
>>>>> On 06/13/2012 01:52 PM, Raluca Stavro wrote:
>>>>>> Hi,
>>>>>>
>>>>>> On Wed, Jun 13, 2012 at 2:15 PM, Vincent
>>>>>> Massol<vincent(a)massol.net> wrote:
>>>>>>
>>>>>>> On Jun 13, 2012, at 12:44 PM, Raluca Stavro wrote:
>>>>>>>
>>>>>>>> I'm resending this mail by using the right subject pattern.
>>>>>>>>
>>>>>>>> Hello,
>>>>>>>>
>>>>>>>> I am trying to upgrade an old XEM to 3.5.1.
>>>>>>>> In this XEM there are some custom panels which have been
>>>>>>>> converted to 2.0
>>>>>>>> syntax and contain code like this:
>>>>>>>>
>>>>>>>> {{velocity}}
>>>>>>>> {{html}}
>>>>>>>> #panelheader("...")
>>>>>>>> ...
>>>>>>>> #panelfooter()
>>>>>>>> {{/html}}
>>>>>>>> {{/velocity}}
>
> Do the panels really need the {{html}} wrapper?
> If no, then you must remove it.
> If yes, then you should consider rewriting them using wiki syntax
> only, then remove the {{html}} wrapper.
> If you can't do that, then just move the wrapper inside the
> panelheader/footer.
>
> You can do that automatically with a script.
>
>>>>>>>> Because since 2.7.2 panel macros were converted to 2.0 syntax,
>>>>>>>> because
>>>>>>>> panel macros from inside macros.vm were modified by calling
>>>>>>>> {{html}} wiki
>>>>>>>> macro and because we can't use nested {{html}} macros without
>>>>>>>> wiki="true"
>>>>>>>> parameter, I don't know how to fix this issue besides modifying
>>>>>>>> panel
>>>>>>> code.
>
> I don't understand this. Are you saying that in macros.vm #panelheader
> uses {{html}}? That's not true, the panelheader/footer macros only use
> wiki syntax, not {{html}}. The problem isn't that nested {{html}}
> macros don't work, but that wiki syntax doesn't work in {{html}}
> without wiki="true".
>
>>>>>>>> This XEM has more than 70 wikis and this I can't just modify
>>>>>>>> all custom
>>>>>>>> (converted to 2.0 syntax) panels manually.
>>>>>>>> Is there a nice solution to this problem ?
>>>>>>> Idea 1:
>>>>>>> ======
>>>>>>>
>>>>>>> Add a new #panelheaderold macro in macros.vm and replace all
>>>>>>> calls of
>>>>>>> #panelheader to #panelheaderold in your panels (easy to do with
>>>>>>> a XWQL
>>>>>>> query and 3 lines of scripts).
>>>>>>>
>>>>>>> Slowy migrate panels to new syntax.
>>>>>>>
>>>>>>> Note:
>>>>>>> =====
>>>>>>>
>>>>>>> Actually in the future we need to add a new {{panel}} macro,
>>>>>>> something
>>>>>>> like:
>>>>>>>
>>>>>>> {{panel style=".." title="…"}}
>>>>>>> … content here …
>>>>>>> {{/panel}}
>>>>>>>
>>>>>>> Idea 2:
>>>>>>> ======
>>>>>>>
>>>>>>> Create a custom Panel wiki macro (give it a name other than
>>>>>>> "panel"!),
>>>>>>> search for:
>>>>>>> {{velocity}}{{html}}#panelheader….#panelfooter{{/html}}{{/velocity}}
>>>>>>> (use
>>>>>>> a regex)
>>>>>>>
>>>>>>> Replace with your panel macro.
>>>>>>>
>>>>>>>> Should I open an issue on Jira ?
>>>>>>> Nope
>>>>> So this means that none of the macros in macros.vm are API?
>>>>> Which means that there is no API to make a panel header consistent
>>>>> with the panel headers of the default panels?
>>>> Good point. Macros in macros.vm are supposed to be APIs and it
>>>> means we broke the backward compatibility at some point in the past
>>>> (2.7 as suggested by Raluca).
>
> The macros still work for both xwiki/1.0 and xwiki/2.x panels. What
> doesn't work is putting the whole panel content inside a {{html}}
> block, without any wiki parsing.
>
> The problem was that there was a misunderstanding of the macros
> behavior. The macros were supposed to work well in wiki syntax.
> Initially, that meant the only xwiki syntax, which did mix HTML with
> the rest of the wiki and velocity syntax. When new wiki syntaxes were
> introduced and the macros were updated, the behavior remained the
> same: the #panelheader/footer macros work well in both xwiki/1.0 and
> xwiki/2.x syntaxes. But pure HTML isn't really a wiki syntax. The fact
> that for a few releases the macros worked in pure HTML embedded in an
> xwiki/2.0 document, but not directly in a xwiki/2.0 document, was a
> bug, not a contract.
> Unfortunately some developers did rely on this bug.
I wouldn't call it a bug, because if we do so, then we can argue that
it's a bug that has been there for at least one major cycle, and that
macros.vm is still not stable according to
http://jira.xwiki.org/browse/XWIKI-6062 so we might still have "bugs"
about it (and that is for about 2.5 major cycles, which is a bit too
much from my point of view).
What I would say about this is that apparently we don't know / have a
convention about how should the macros in macros.vm be used: with syntax
interpreted or not, in an html macro or not. This is where the confusion
comes from: while the old panelheader macro _needed_ html macro
(potentially with syntax activated), the current one needs _only wiki
syntax_ (potentially in an html macro). There is a context which
satisfies both (html macro with wiki syntax activated) but it was not
documented anywhere, I'm not even sure it is _the rule_ for macros in
macros.vm, so people used "what it worked", in this case a plain simple
html macro whose wiki parameter defaults to false.
The wysiwyg macros in macros.vm, for example, I would say they need to
be called in a html macro with syntax switched off, but it's just a
guess, looking at the code.
I think we need to:
1/ make a decision about what is API from macros.vm
2/ make a decision about what _was_ API from macros.vm and keep it
working as it used to
3/ document how an API macro should be used, either by having a rule or
by at least writing in its own documentation in macros.vm what context
it expects (note that even if we document it, if we cannot enforce it,
chances are that people will use "what it works"...)
To me, all these above are unclear and until they are, from how it feels
to me, it's very hard to call something a bug or a backwards
compatibility break.
Thanks,
Anca
>
>>> 3.2 M1
>>> https://github.com/xwiki/xwiki-platform/commit/2e4b54267b9bf4048c14fdf14b6a…
>>> http://jira.xwiki.org/browse/XWIKI-6504
>>> It's interesting that the API Breakage section of the 3.2M1 release
>>> notes says only "[TODO]"
>>> http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/ReleaseNotesXWikiEnterpris…
>>> ... :)
>>
>> bad bad…
>>
>> Who was the RM? :)
>>
>> -Vincent
>>
>>> Anca
>>>
>>>>
>>>> We should probably have introduced new macros instead when we
>>>> introduced the conversion to 2.0 syntax.
>>>>
>>>> Now since this is very old we need to decide what we want to do at
>>>> this point.
>>>>
>>>> Thanks
>>>> -Vincent
>>>>
>>>>> Thanks,
>>>>> Anca
>>>>>
>>>>>> So there is no other way to fix this issue but by modifying the
>>>>>> code inside
>>>>>> panels.
>>>>>> Thank you, Vincent.
>>>>>>
>>>>>> Raluca.
>>>>>>
>>>>>>
>>>>>>> Thanks
>>>>>>> -Vincent
>
>
Hello , I want to trun to both columns layout ,but in the panel wizard the save in new layout and revert button can't be pressed down , I mean I click it but nothing happened. I use XWiki 3.5,loggin in with admin user , and I am sure I havn't done any change about this wizard . It's so strange . Do you have any suggestion about this ? Do I need to change the configuration to do this ? Thank you .
Hello,
i try to test a macro in a maven project created using maven archetype. It has .test files and an IntegrationTests class. Where running, it crashed due to nullpointerexception when trying to, probably, find out current user?
Is ther some configuration i am missing?
java.lang.NullPointerException: null
at com.xpn.xwiki.doc.DefaultDocumentAccessBridge.getCurrentUser(DefaultDocumentAccessBridge.java:981) ~[xwiki-platform-oldcore-3.2.jar:na]
at org.xwiki.component.internal.UserComponentManager.getKey(UserComponentManager.java:74) ~[xwiki-platform-component-multi-3.2.jar:na]
at org.xwiki.component.internal.AbstractGenericComponentManager.getComponentManager(AbstractGenericComponentManager.java:72) ~[xwiki-platform-component-multi-3.2.jar:na]
at org.xwiki.component.internal.DelegateComponentManager.lookup(DelegateComponentManager.java:103) ~[xwiki-platform-component-multi-3.2.jar:na]
at org.xwiki.component.internal.DelegateComponentManager.lookup(DelegateComponentManager.java:103) ~[xwiki-platform-component-multi-3.2.jar:na]
at org.xwiki.rendering.internal.macro.DefaultMacroManager.getMacro(DefaultMacroManager.java:132) ~[xwiki-rendering-transformation-macro-3.2.jar:na]
at org.xwiki.rendering.internal.transformation.macro.MacroTransformation.getHighestPriorityMacro(MacroTransformation.java:232) ~[xwiki-rendering-transformation-macro-3.2.jar:na]
at org.xwiki.rendering.internal.transformation.macro.MacroTransformation.transformOnce(MacroTransformation.java:152) ~[xwiki-rendering-transformation-macro-3.2.jar:na]
at org.xwiki.rendering.internal.transformation.macro.MacroTransformation.transform(MacroTransformation.java:141) ~[xwiki-rendering-transformation-macro-3.2.jar:na]
at org.xwiki.rendering.internal.transformation.DefaultTransformationManager.performTransformations(DefaultTransformationManager.java:81) ~[xwiki-rendering-api-3.2.jar:na]
at org.xwiki.rendering.test.integration.RenderingTest.runTestInternal(RenderingTest.java:133) [xwiki-rendering-test-3.2.jar:na]
at org.xwiki.rendering.test.integration.RenderingTest.execute(RenderingTest.java:103) [xwiki-rendering-test-3.2.jar:na]
David Delbecq