Hi James,
On 07/28/2011 06:27 AM, 许凌志(Jamesxu) wrote:
Hi,Marius, I have some problems with the
processes of the suggestions.
(1) As we discussed, when "[[" is triggered at first without any
queries, we should give user some default suggestions like recently
modified. However I indeed can the recent modified pages now, but I can
not get recently upload attachments, the question is is the recently
upload attachments necessary? if so, how can I get it, and can I add it
to the same wikipage "XWiki.recently modified"?
You can use something like this to get the list of recently uploaded
attachments:
----------8<----------
{{velocity}}
#set($result = $services.query.hql('select doc.fullName, attach.filename
from XWikiDocument as doc, XWikiAttachment as attach where
attach.docId=doc.id order by attach.date desc').setLimit(5).execute())
|Document|Attachment
#foreach($item in $result)
|$item.get(0)|$item.get(1)
#end
{{/velocity}}
---------->8----------
If I want to get the doc's wiki name, how is the query, I have tried
doc.wiki, and doc.wikiName, no one is right;
(Note: I've written this based on
http://platform.xwiki.org/xwiki/bin/view/DevGuide/QueryGuide#HUsingtheQuery…
and
http://extensions.xwiki.org/xwiki/bin/view/Extension/All+Attachments+Liveta…
)
You can add your code to the "Recently modified" panel for now, but
return the list of attachments only when a specific request parameter is
present.
(2) When user keeps typing, then he can trigger some sub link triggers
like "attach:", ".", "@" and "||"
If "attach:" is triggered without any
queries, should we give the user
some default suggestions, if so, what suggestions should we give, till
now, I give the the attachments start with "a" as default.
You need to propose something. We can help you make the choice but you
should be the one coming with great ideas.
if "." is triggered, there are two
situations: first is under the
wikipage context, so when it is triggered without any queries, what
should we give to user as default suggestions,
Again, you have to propose something.
because when "." is
trigger, we must narrow the search range to the specific space, for
example, when user type "[[Main.", then the suggestions and also the
default suggestions should under the Main space.
second is under attachment context, like "[[attach:Main.", what should
be the default suggestions for users?
Is there really a difference between "[[Main." and "[[attach:Main."
with
respect to the list of wiki pages that you could suggest?
if "@" is triggered, we must give the
attachment suggestions to users
under attachment context, like "[[attach:Main.mypage@", so what is the
default suggestions for this situation?
What do you propose?
if "||" is triggered, I think we may
not query the server, because the
attributes of link are static, but what attributes are supported?
First check the syntax help, then try some random parameters and check
what HTML is generated when the page is rendered.
Hope this helps,
Marius
On Tue, Jul 26, 2011 at 3:37 AM, Marius Dumitru Florea
<mariusdumitru.florea(a)xwiki.com <mailto:mariusdumitru.florea@xwiki.com>>
wrote:
Hi James,
On 07/24/2011 05:15 PM, 许凌志(Jamesxu) wrote:
> 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)
Sounds good. Ping me on IRC when you need help.
Thanks,
Marius
--
Best wishes,
许凌志(Jame Xu)
MOE KLINNS Lab and SKLMS Lab, Xi'an Jiaotong University
Department of Computer Science and Technology, Xi’an Jiaotong
University
_______________________________________________
devs mailing list
devs(a)xwiki.org <mailto:devs@xwiki.org>
http://lists.xwiki.org/mailman/listinfo/devs
--
Best wishes,
许凌志(Jame Xu)
MOE KLINNS Lab and SKLMS Lab, Xi'an Jiaotong University
Department of Computer Science and Technology, Xi’an Jiaotong University
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
--
Best wishes,
许凌志(Jame Xu)
MOE KLINNS Lab and SKLMS Lab, Xi'an Jiaotong University
Department of Computer Science and Technology, Xi’an Jiaotong University