Hello,
I'm curious if there is any kind of hook or script or code executed when
the page from the XWiki is deleted and which might be easily enhanced.
I'm asking since during the page creation I also modify external
database (page template do this) and if page is deleted the data in
external db shall be also deleted to be consistent.
Thanks!
Karel
Hi devs,
Here is the general idea: I would like to start doing important
cleanup to oldcore project by moving aspect to xwiki-legacy and
deprecated stuff hard to move right now.
Here are the pros:
* we will be able to move a lots of deprecated classes like the old
event system and some others to xwiki-legacy. It's very hard now
because of methods using theses APIs in XWiki class
* oldcore will be quicker to build (no aspectj build anymore)
* that way we make sure we don't use any deprecated APIs in platform
Along with it I would also like to start separating xwiki-legacy in sub modules.
In details it means that there will be two xwiki-oldcore jars, the
"normal" one and the one including aspects and legacy classes.
Projects will depends on the first one and the second one will
actually be packaged with XE/XEM. And It will basically be the same
for any other project with aspect based retro-compatibility.
You can have a look at the current state which is pretty much ready to
merge (need to update some code that is still using deprecated API) in
https://github.com/xwiki/xwiki-platform/tree/feature-legacyprojects.
Right now only oldcore have a conflicting jar package, other legacy
modules are like xwiki-legacy used to be: they just contains some
deprecated classes and bridges but they are not repackaging the non
legacy jar because it's not really needed (no aspects). There is lots
of more things to move but I would like to validate the idea and we
will move stuff later.
WDYT ?
here is my +1
--
Thomas Mortagne
Hi Karel,
Don`t forget about textareas :)
It would be nice if you could, when you finish the project, cotribute it as
a feature of XEclipse. The REST templates service could become a part of XE
as well.
Thanks,
Eduard
On Mon, Aug 8, 2011 at 11:40 AM, Karel Gardas <karel.gardas(a)centrum.cz>wrote:
>
> Hi Eduard,
>
> thanks a lot for your help with this. Indeed, your JS kind of works. I've a
> little bit fixed this and now I'm using:
>
> String js = "function
> getFormData() {\n";
> js = js + "var formData =
> {};\n";
> js = js + "var stringData =
> '';\n";
> js = js + "var inputs =
> document.getElementsByTagName(**'input');\n";
> js = js + "for (var i = 0; i
> < inputs.length; ++i) {\n";
> js = js + "var input =
> inputs[i];\n";
> js = js + "if (input.value
> == null || input.value == '' || input.type == 'button' || input.type ==
> 'submit') {\n";
> js = js + "continue;\n";
> js = js + "}\n";
> //js = js + "alert('Input ['
> + i + '] (' + input.type + '): ' + input.name + ' = ' + input.value)\n";
> js = js + "formData[
> input.name] = input.value;\n";
> js = js + "stringData =
> stringData + '[' + input.name + ']=' + input.value;\n";
> js = js + "}\n";
> js = js + "var selects =
> document.getElementsByTagName(**'select');\n";
> js = js + "for (var j = 0; j
> < selects.length; ++j) {\n";
> js = js + "var input =
> selects[j];\n";
> js = js + "if (input.value
> == null || input.value == '' || input.type == 'button' || input.type ==
> 'submit') {\n";
> js = js + "continue;\n";
> js = js + "}\n";
> //js = js + "alert('Input ['
> + i + '] (' + input.type + '): ' + input.name + ' = ' + input.value)\n";
> js = js + "formData[
> input.name] = input.value;\n";
> js = js + "stringData =
> stringData + '[' + input.name + ']=' + input.value;\n";
> js = js + "}\n";
> //js = js +
> "alert.log(formData);\n";
> //js = js +
> "alert(formData);\n";
> //js = js + "return
> formData.toString();\n";
> js = js + "return
> stringData;\n";
> js = js + "}\n";
> //js = js + "formData;\n";
> js = js + "return
> getFormData();\n";
>
>
> Thanks!
> Karel
>
>
> On 06/29/11 02:59 PM, Eduard Moraru wrote:
>
>> Hi Karel,
>>
>> On Tue, Jun 28, 2011 at 9:46 PM, Karel Gardas<karel.gardas(a)centrum.cz**
>> >wrote:
>>
>>
>>> Hi Eduard,
>>>
>>>
>>> On 06/28/11 05:45 PM, Eduard Moraru wrote:
>>>
>>> After googling around on this topic, it seems that there is no clean way
>>>> of
>>>> doing this.
>>>>
>>>> The initial community-accepted way I managed to find was using
>>>> javascript
>>>> (Browser.execute(String)) to retrieve your data, store it in
>>>> window.status
>>>> and then, a BrowserStatusText listener would get that value from the
>>>> status
>>>> text. An example is here:
>>>> http://www.java2s.com/Code/****Java/SWT-JFace-Eclipse/**<http://www.java2s.com/Code/**Java/SWT-JFace-Eclipse/**>
>>>> QueryDOMnodevalue.htm<http://**www.java2s.com/Code/Java/SWT-**
>>>> JFace-Eclipse/**QueryDOMnodevalue.htm<http://www.java2s.com/Code/Java/SWT-JFace-Eclipse/QueryDOMnodevalue.htm>
>>>> >
>>>>
>>>>
>>>> On the other hand, by checking the Eclipse/SWT API, it seems that
>>>> Browser.evaluate(String) also got implemented along the way and,
>>>> compared
>>>> to
>>>> execute(String), it actually returns the value of the executed
>>>> JavaScript
>>>> so
>>>> you can use it directly. Documentation here:
>>>> http://help.eclipse.org/****indigo/index.jsp?topic=%2Forg.****<http://help.eclipse.org/**indigo/index.jsp?topic=%2Forg.**>
>>>> eclipse.platform.doc.isv%****2Freference%2Fapi%2Forg%**
>>>> 2Feclipse%2Fswt%2Fbrowser%****2FBrowser.html<http://help.**
>>>> eclipse.org/indigo/index.jsp?**topic=%2Forg.eclipse.platform.**
>>>> doc.isv%2Freference%2Fapi%**2Forg%2Feclipse%2Fswt%**
>>>> 2Fbrowser%2FBrowser.html<http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.…>
>>>> >
>>>>
>>>>
>>>> So, to sum it up, use JS to document.getElementById(...) for each field
>>>> in
>>>> the form and use their names+values to build the request performed by
>>>> your
>>>> Finish button.
>>>>
>>>>
>>> I'm afraid this is not possible. Imagine you do have completely unknown
>>> template to you and you need your new page wizard to support it. You
>>> don't
>>> know at all what id you should use and how many of them to get all the
>>> template forms values. For example let's have a template for book type
>>> with
>>> a fields: "Book name", "Author name" and "publication". Id's of those
>>> fields
>>> in my particular case are: Book store.BookClass_0_name, Book
>>> store.BookClass_0_author, Book store.BookClass_0_publication how the
>>> template wizard author should know this? So IMHO this way is not possible
>>> or
>>> at least not in this way...
>>>
>>>
>>>
>>> Well, from your template wizard and by using JavaScript, you could get
>> all
>> the<input...> elements with their name and value and pass them to the
>> request performed by the 'Finish' button. I doubt that there will be more
>> than one<form> element in the template page, but even so, the main<form>
>> element's ID is 'inline'.
>>
>> Here's a starting point based on the above:
>>
>> var formData = {};
>>
>> var inputs = document.getElementsByTagName(**'input');
>> for (var i = 0; i< inputs.length; ++i) {
>> var input = inputs[i];
>> if (input.value == null || input.value == '' || input.type == 'button'
>> ||
>> input.type == 'submit') {
>> continue;
>> }
>> console.log('Input [' + i + '] (' + input.type + '): ' + input.name + '
>> =
>> ' + input.value)
>> formData[input.name] = input.value;
>> }
>>
>> console.log(formData);
>>
>> Note: Replace 'console' with alert if you are not running this in
>> Firebug's
>> console.
>>
>> It does need some fine tuning, but it should work.
>>
>>
>> P.S.: Can you post a screenshot of the wizard page containing the
>>>
>>>> template's
>>>> form?
>>>>
>>>>
>>> It's small, so I hope nobody will be angry for attaching this directly.
>>> This is a second page of the wizard creating page for Book with name
>>> "Matka"
>>> (Mother in English), author's name is "Karel Capek" and publication date
>>> is
>>> set to "1929" -- but this is completely untrue, just my example, the
>>> first
>>> real publication was in 1938. BTW: Karel Capek is listed from the dynamic
>>> list of authors, which is a result of SPARQ query on top of Jena's DB.
>>> Code
>>> which shall be also open-source once we get green from the customer legal
>>> department... "FOUND BOOK NAME" and "FOUND AUTHOR NAME" together with
>>> "<set
>>> property operation aborted!>" are just debug messages from template .vm
>>> code
>>> where I'm using some of our semantics marcos (also to be open-sourced) --
>>> this all is about semantic XWiki book store demo example... I'm creating
>>> pages for authors and books using author and book template. Once you add
>>> author page all the semantics props are set so you get it listed
>>> automatically inside the book template code in author name dynamic SPARQ
>>> list...
>>>
>>>
>> Thanks for the preview. It looks like you are using xpage=plain for plain
>> HTML rendering. This should be enough for basic templates. I some
>> templates
>> contain javascript inside them (for input validation, autocomplete, etc) ,
>> I
>> don`t think it will work since the JS is not included in xpage=plain.
>> Don`t
>> know if that`s a problem for your usecase.
>>
>> Good luck,
>> Eduard
>>
>>
>> Now I just need to make sure page template creation is really working
>>> even
>>> from XEclipse (this thread is all about)...
>>>
>>> Thanks!
>>> Karel
>>>
>>>
>>>
>>> On Tue, Jun 28, 2011 at 2:56 PM, Karel Gardas<karel.gardas(a)centrum.cz**
>>>> **
>>>>
>>>>> wrote:
>>>>>
>>>>
>>>>
>>>> Hi Eduard,
>>>>>
>>>>> On 06/15/11 06:59 PM, Eduard Moraru wrote:
>>>>>
>>>>> Hi Karel,
>>>>>>
>>>>>> On 06/15/2011 01:54 PM, Karel Gardas wrote:
>>>>>>
>>>>>> Hello Sergiu,
>>>>>>>
>>>>>>> thanks a lot for you hint, when I renamed
>>>>>>> xwiki-enterprise-web-3.1-****SNAPSHOT to simple xwiki, then after
>>>>>>> clicking
>>>>>>> on<save and view> button I got to normal login screen and when I
>>>>>>> log
>>>>>>>
>>>>>>> in
>>>>>>
>>>>>
>>>>> the page is really created.
>>>>>>
>>>>>>>
>>>>>>> If you look at my first reply (with initial suggestions), you`ll see
>>>>>>>
>>>>>> that I suggested that the actual Save action when completing the
>>>>>> creation of a page should be performed by your wizard`s Finish button
>>>>>> (sending a HTTP request with all the parameters set), otherwise you
>>>>>> mix
>>>>>> up the user by having 2 sets of buttons (XWiki`s and the wizard`s).
>>>>>>
>>>>>>
>>>>> I remember well your initial recommendation. Thanks for it! The way of
>>>>> using SWT browser directly was just rather a proof-of-concept of the
>>>>> idea of having browser embedded inside the wizard. Now, the situation
>>>>> is
>>>>> a little bit different. I do have:
>>>>>
>>>>> - small http client code which logs into xwiki server if needed and
>>>>> access the newly created page
>>>>> - strip all not needed information from the newly created page and
>>>>> leave
>>>>> just a form to fill the template data
>>>>> - show such page in the browser embedded inside the wizard window and
>>>>> allow user to fill the form.
>>>>>
>>>>> That's what working. Now I would like to press Finish button get the
>>>>> filled form from SWT browser (somehow!) and POST it to the xwiki server
>>>>> to save the page with entered data. The problem is that if I use
>>>>> getText() method on SWT browser it does not return page with filled
>>>>> data
>>>>> and I don't see any other API which should support this.
>>>>>
>>>>> So my question now is : do you have any idea how to get filled form
>>>>> page
>>>>> from the browser back into my code?
>>>>>
>>>>> Thanks a lot!
>>>>> Karel
>>>>>
>>>>> ______________________________****_________________
>>>>> devs mailing list
>>>>> devs(a)xwiki.org
>>>>> http://lists.xwiki.org/****mailman/listinfo/devs<http://lists.xwiki.org/**mailman/listinfo/devs>
>>>>> <http://**lists.xwiki.org/mailman/**listinfo/devs<http://lists.xwiki.org/mailman/listinfo/devs>
>>>>> >
>>>>>
>>>>> ______________________________****_________________
>>>>>
>>>> devs mailing list
>>>> devs(a)xwiki.org
>>>> http://lists.xwiki.org/****mailman/listinfo/devs<http://lists.xwiki.org/**mailman/listinfo/devs>
>>>> <http://**lists.xwiki.org/mailman/**listinfo/devs<http://lists.xwiki.org/mailman/listinfo/devs>
>>>> >
>>>>
>>>>
>>>>
>>>
>>
>
Hi devs,
I've updated the doc on http://dev.xwiki.org/xwiki/bin/view/Community/JavaCodeStyle#HPackagenames
From:
* All code that is **not** moved to the new XWiki Architecture based on components should use ##com.xpn.xwiki##. New architecture code should use ##org.xwiki##.
To:
* All code that is not located in the oldcore module should use ##org.xwiki##.
Hope it's ok with you.
Thanks
-Vincent
Hi, how can I get the current edit page's details information in javascript
like, its space and its page name.
Here I found that I can parse the url of the current edit pages, like
/xwiki/bin/edit/Main/Newpage?editor=wiki
Is there any other better ways for me to get them?
--
Best wishes,
许凌志(Jame Xu)
MOE KLINNS Lab and SKLMS Lab, Xi'an Jiaotong University
Department of Computer Science and Technology, Xi’an Jiaotong University
Hi, Last week I have done following things:
1. Refine the suggest lucene service, and a query "media", which have two
options: "xml" and "json", each gives the xml
and json results.
2. Thanks Eduard, Marius and Sergiu, with their help, I finnally find the
right search queries of suggest lucene service to get right suggestion
results.
3. The autosuggestion can use the real datas from xwiki now.
In this week, I am going to do the following things:
1. Implement the whole context for link suggestion, include "attach:", "@",
"." and "||".( I have done some designations, but still want to discuss with
mentors)
2. Consider to implement the ctrl+space to re-open the suggestion box
according to the different contexts of link suggestion.(after the 1 is
finished)
--
Best wishes,
许凌志(Jame Xu)
MOE KLINNS Lab and SKLMS Lab, Xi'an Jiaotong University
Department of Computer Science and Technology, Xi’an Jiaotong University
Hi, Last week I have done following things:
1. Refine the codes according to the code review of Marius.
2. Add the shortcut for identifying the context of link, and re-generate the
suggestions, as Marius's suggestion, the shortcut should be ctrl+space, but
I found it the ctrl+space is not working in most of my OS systems, if I
change to other shortcuts, like ctrl+any key except 'space', everything will
be fine, I search the problem in google, I found the same thing happens in
eclipse, I tested it, the ctrl+space is not working in eclipse either. I
think the reason might be the shortcut is used for changing text input, like
change the the english input method to chinese input method. Unfortunately,
there is no good solutions found in google. So, I change the shortcut to
ctrl+enter(return).
I think another solution is that I make the shortcut configurable.
In this week, I will do the following things;
1.Add the default suggestions for sub-trigger "attach:", "." and "@".
2.Refine the suggestion box according to Marius' suggestions in the reply
for the mail "The plan of GSoC project "Auto-completion in content editors"
(8.1 - 8.7)".
3.Add the relative references for link generation.
--
Best wishes,
许凌志(Jame Xu)
MOE KLINNS Lab and SKLMS Lab, Xi'an Jiaotong University
Department of Computer Science and Technology, Xi’an Jiaotong University
Hi, Last week I have done following things:
1. Implemented the sub-triggers 'attach:', '@', '.' for link autosuggestion.
I record a video(see:http://youtu.be/7lXeORkI6Ns) of how to use this
triggers under link suggestion context.
But still have some problems:
a. I didn't implement the trigger for attribute "||", because the suggestion
trigger type and behaviour are a bit different from the others, for
example, when you type "||" the attributes of the link will be shown, and
when user select one, then type '="' the value should be suggested to user,
and if user want to add second attributes to the link, he can type "space"
key and then the suggestion for available attributes should also be shown.
The process are a bit complex, and the cost of implementation is high
compare to the utility of the functions. So I decide to abandon this
sub-triggers and focus on the trigger "attach:", "@" and "." only which are
more useful when user add or edit links.
b. Not full tested, I test most cases I can think of, and ask my classmates
to use this function and gave me some feedback, I did found some bugs, and
fixed them, but I am not very sure some unexcepted bugs will come up
c. I didn't implement the default suggestions for "attach:", "." and "@"
sub-triggers, I need to discuss with mentor this week.
2. Thanks Marius and Sergiu, with their help, I find all the server side
search service for getting the suggestions of the link sub-triggers.
3. Thanks Marius, with his help, I can refine the default Panels.Recent
Modified page to get the recent modified pages and attachmens as the
default suggestions for link trigger "[[".
In this week, I am going to do the following things:
1. Implement the default suggestions for sub-triggers "attach:", "." and
"@".
2. Implement the ctrl+space to re-open the suggestion box according to the
different contexts of link suggestion.
--
Best wishes,
许凌志(Jame Xu)
MOE KLINNS Lab and SKLMS Lab, Xi'an Jiaotong University
Department of Computer Science and Technology, Xi’an Jiaotong University
Hi devs,
As part of the process of integrating the Workspaces feature into XEM, I
have identified certain problematic integration points.
== Context==
For those that don't know about the Workspaces feature, here's an initial
design page that can still be considered relevant with respect to the
current prototype http://dev.xwiki.org/xwiki/bin/view/Design/Workspaces
Technically, workspaces are subwikis that can be created by any user (not
just admins), that handle only global users (don`t allow local users) and
that manage 3 types of workspace/subwiki membership (1. open, 2. on request
with admin validation and 3. only on invite). The main wiki contains the
workspaces application and is the entry-point from where you can
create/browse workspaces. Of course, since it's part of the Wiki3.0 research
project ( https://wiki30.xwikisas.com ), the main focus is the user and
social interactions.
The current prototype ( https://github.com/xwiki-contrib/wiki30 and issue
tracker http://jira.xwiki.org/jira/browse/WIKITHREEDOTO ) was built as a
forked XEM distribution that comes with 2 features (workspaces and real-time
editor).
== Issues ==
For the integration of the Workspaces feature (as a XEM extension), the
following problems restrict the Workspace feature from overriding certain
XWiki elements while extending them:
I) Main Wiki level (for the Workspace Manager Application)
1) Extend XWiki.GroupSheet and templates/getgroupmembers.vm
- Add 'follow' action to the group's livetable
- Add 'comment'(About) and 'tags' columns to the group's livetable
2) Extend XWiki.XWikiUserSheet
- Add 'Workspaces' tab with list of joined workspaces and possibility to
list their activity.
3) Extend XWiki.SearchSuggestConfig
- Show Workspaces in search suggestions without affecting existing ones.
4) Extend menuview.vm
- Show 'Workspace' entry in the 'Add' menu
- Show 'Workspace Directory' entry in the 'Wiki' menu
- Show 'Main Wiki' entry in the 'Wiki' menu
II) Workspace level (for the workspace template)
1) Extend Main.Dashboard
- Add new widgets(Workspace Information, Top active users, List of available
Apps) without affecting the existing ones.
-- There should be a clear difference between Gadgets (contain just the code
and are reusable), Dashboard descriptor (for taking care of which gadgets to
include and how to do the layout) and the Dashboard macro. To add some
gadgets in a dashboard from an application, you should only have to override
the dashboard descriptor but not also the existing gadgets.
2) Extend XWiki.AdminSheet
- Add 'Workspace' sections in the 'Configuration' category
- Replace the section 'Users' from 'Users & Groups' category with a
'Workspace Users' section
3) Customize templates/rightsUI.vm
- Hide scope selector for Users in rights UI and use global users as default
There is always the option of doing all of the above trough JSX, but that is
a far from perfect solution.
The general topic of these issues is that applications should be allowed to
better extend XWiki and should not be confined to only the "content" section
of a wiki page.
In particular, almost all of these issues require their own thread and can
be considered part of bigger problems, but I think it's a good start to list
them here and see what discussions come out of them.
The goal is to be able to install Workspace Manager on top of XEM without
partially overriding certain pages or touching templates so that the upgrade
of the underlying XEM is not affected.
Any feedback on these issues is greatly appreciated.
Thanks,
Eduard
Hi devs,
Based on my previous mail [1], I`ve isolated a small list of stand-alone
elements that could be integrated into XE/XEM as a result of the work done
on the Wiki3.0 research project:
= XE =
1. Add 'Follow' button in GroupSheet's livetable - already done [3][4],
needs a final review
1.1 Add 'About' and 'tags' columns in the GroupSheet's livetable.
2. Group Manager/Inviter (invite users to a group) - needs refactoring in
order to extract it as an individual feature.
= XEM=
3. Wiki descriptor editing from subwiki administration section - needs a bit
of refactoring to make wiki descriptor editing and then reuse it for
workspace descriptor editing.
4. Main wiki link in the top menu, under the 'Wiki' section to be able to go
to the main wiki.
I`d like to have your opinion on whether they are desired features to be
integrated into XE/XEM.
Note: Don`t forget to check out the demo instance [5] I`ve set up at
http://wiki30-demo.xwiki.com to get a better view over the work done and,
maybe suggest other things that could be reused.
Thanks,
Eduard
-----------------
References:
[1] http://xwiki.markmail.org/thread/3cbms22ctbqi4yqp
[2] https://wiki30.xwikisas.com/
[3] https://github.com/xwiki/xwiki-platform/pull/14
[4] http://jira.xwiki.org/jira/browse/XWIKI-6770
[5] http://xwiki.markmail.org/thread/xngjqbq6e76owd37