I have the following code stolen directly from the Blog Categories app:
$doc.getURL( Add New Topic
Is there an "objectdelete" action for getURL. This is probably in the code
but I don't have the sources and it's not in the API docs.
Thanks!
.:. Kevin
--
View this message in context: http://n2.nabble.com/Generate-Url-to-delete-attached-object..-tp2163415p216…
Sent from the XWiki- Users mailing list archive at Nabble.com.
I have the following code in one of my pages and it does what I am expecting
however I'd like to try and generalize it some.
#set ($hql = ", BaseObject as obj where obj.name = doc.fullName and
obj.className = 'CPA_FAQs.FAQClass' and doc.space='MySpace'")
#set($recentDocs = $xwiki.searchDocuments($hql, 5, 0))
#if($recentDocs.size() > 0)
<ol>
#foreach($entry in $recentDocs)
#set($faqDoc = $xwiki.getDocument('MySpace', $entry))
<li>[$faqDoc.question>$faqDoc.fullName]</li>
#end
</ol>
#else
#info($noFAQs)
#end
In this example is $entry an instance of com.xpn.xwiki.api.Object? If so, is
there a way to get the space from it without doing
$xwiki.getDocument('MySpace', $entry)? I would like to generalize that
statement so I can re-use the code for any documents in any space as opposed
to having to hard-code the space.
Thanks!
.:. Kevin
--
View this message in context: http://n2.nabble.com/Working-with-query-results...-tp2162883p2162883.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
I am using this query:
#set($hql = ", BaseObject as obj where obj.name=doc.fullName and
obj.className='Space1.MyClass' and
obj.name<>'${doc.space}.${class}ClassTemplate' and doc.space='MySpace'")
to return a list of documents from a different space and I am trying to now
create a view link to the document. I have tried several combinations using
getUrl() but nothing seems to work. Here's some of the code I've tried:
<ol>
#foreach($faq in $recentlyCreated)
#set($doc = $xwiki.getDocument('FranchiseTax', $faq))
<li>[$doc.question>$doc.getUrl("view")]</li>
#end
</ol>
What am I missing?
Thanks in Advance!
.:. Kevin
--
View this message in context: http://n2.nabble.com/Linking-to-documents-in-different-spaces-tp2156815p215…
Sent from the XWiki- Users mailing list archive at Nabble.com.
Hi again,
If I create a class similar to the one in the FAQ tutorial but add one or
more new properties to define a space and category could I use this class
and associated design sheet and template to create FAQ documents for more
than one space?
Is it possible to programatically determine what space a document should be
created in when it is saved?
Are there any simple examples of how something like this would be done? I've
gone through just about every piece of documentation but the development
process is still unclear.
Thanks!
.:. Kevin
--
View this message in context: http://n2.nabble.com/Using-one-Class-and-Template-for-creating-documents-in…
Sent from the XWiki- Users mailing list archive at Nabble.com.
Hi guys,
I'm very enthusiastic about getting everything out of the XWiki
environment I'm about to set up for my company. As a matter of fact,
right now I'm thinking about the best solution for getting Kerberos
authentication/authorization to work as all 12000 employees are
already part of the company's Active Directory.
I've read the XWiki article about Auth issues and am now thinking
about what would be the best/easiest/strongest solution.
The solution mentioned in the Wiki wants to use Apache Webserver mit
mod_auth_kerb. As for now, I did not succeed in building a working
mod_auth_kerb module for Win32, which somehow disencourages me to
follow this suggestion. Anyway I wonder, whether I would only be able
to authenticate users or whether there would be a way to have XWikis
builtin auth features cooperate with the Kerberos mechanism. The I
just came across "josso" which seems to a framework which can be
deployed into a JBoss Application Server and work as an authentication
gateway to any josso-enabled applications running on JBoss. Is XWiki
capable of doing this? And the question about XWikis auth mechanism
from before remains. Any other suggestions and hints for such are
scenario from you guys are highly appreciated , since the whole
AD/Kerberos/JBoss stuff is rather new to me. Again, many thanx in
advance for any potential reply on this, it's really important to me.
Cheers,
Sebastian
Hi xwiki-users,
I'm trying to create a plugin to dynamically create a download link for a SH
or BAT file, and am wondering if I could get some ideas from people on the
list. What I'm trying to do is the following:
{{shell-script name="fixed_income.sh" display="true" type="sh"}}
#!/bin/sh
# Startup the bond server
${APP_DIR}/fi/ust/bond_server -conf=fi_ust_prod.xml&
# Startup the pricing server
${APP_DIR}/fi/ust/pricing_server -conf=fi_ust_prod.xml -region=ny&
# Startup the risk analysis tool
${APP_DIR}/fi/ust/risk_analysis -days=365&
{{/shell-script}}
I don't want the server to actually "execute" this (that's easy to do), but
rather to dynamically create an output stream and pipe it to the user's
browser. The user will then be able to save the fixed_income.sh file in
his/her own local directory to execute it.
I know this can be easily done with attachments, but I want to be able to
display the contents of this file on the wiki (possibly in a <div> that's
initially hidden), and also be able to edit this file "on the fly" without
having to create locally/save locally/upload every time (kind of like a
temporary attachment which disappears together with the {{shell-script /}}
tag). I could also just create another servlet that takes in a single
base64 encoded parameter to reconstruct the shell script, but that's not a
clean solution imho. Any other way (perhaps via Javascript) of doing this
cleanly within Xwiki space? Thanks in advance (and also for another
successful release :-D)!
Hi folks, i've heard that in xwiki 1.7 it is possible to link to headlines
in other xwiki documents. is this
information correct?
i am trying to figure this out. the only way i found, is to manually attach
an anchor to a headline and append this
"#<anchorname>" at the end of the link to the file.
is there any change in 1.7 of an comfortable way to do this?
in the doc i found this: "anchor: An optional anchor name pointing to an
anchor defined in the referenced link. Note
that in XWiki anchors are automatically created for titles. Example:
"TableOfContentAnchor"."
unfortunately there are no anchors automatically created for titels (btw toc
isn't working, is this a hint what causes
this?) I use a fresh new xwiki war deployed to a tomcat (using an old xwiki
database 1.1.2.5797 with mysql)
best regards
To achieve this I would create an xwiki class "shellscript" that contains a single field, named "shcode" which is pure text. Then I would create velocity script that dispalys the page or downloads the code based on some http servlet $request parameters.
I would not try to "dig out" the shell code from the wiki page.
Note that you can access the servlet request as well as response object so you can make downloading just anything, not only text/html.
Regards
Peter
Verhás Péter
+36(30)9306805
peter(a)verhas.com
Hi all,
First, I'm a total wiki newb. I've been tasked with evaluating xwiki for use
by the state agency I work for in order to determine whether or not xwiki
can meet our needs as a means to share information both internally and
externally. From my initial poking around it looks like xwiki will be fairly
easy to work with once I've had the opportunity to wrap my head around some
of the seemingly less documented pieces like the Object model and
development process.
My first task is to replace a set of existing FAQs that have been done with
static HTML files. I've worked through the FAQ tutorial but my needs are a
bit more extensive and I'm not sure exactly how to modify the example to
meet these needs. Here are the main requirements I'm needing to address:
1) Support for Categories and Sub-Categories for questions. Used for
displaying questions grouped by sub-category within each of the main
Categories.
Would this just be a matter of adding a category property to my FAQ class?
How would I then access the full list of Categories from the main space in
order to link to each set of FAQs?
2) Within each Category (I figured I'd create each main category as a new
Space) support for specifying certain users who can add new Questions and
Answers.
I think I kind of have an idea on how to do this using the user/group
frameworks. I just wanted to get an idea of whether this sort of restriction
is doable within the existing rights system.
3) Creation of global template for creating/editing and viewing FAQ entries.
This is similar to the FAQ tutorial with a main difference being the ability
to specify an existing sub-category or to create a new sub-category for the
main category the user has permission to create questions/answers for.
4) Main space that acts as a sort of jumping off point for the FAQs.
Contains links to all of the main FAQ categories and possibly some general
information about submitting new questions and such.
I figured I would create a main space and have the re-usable objects defined
in it and then have a single page that acts as the entry point to the FAQs.
Are there docs for the xwiki object model? How can I find out what
properties and methods are available on xwiki objects? Are there docs that
explain how to use velocity scripting to do custom queries to retrieve the
data to be displayed in a given page?
-----
Does this all seem doable in the xwiki system? Does it make sense to develop
each major category of FAQ as a Space within the wiki? I'm doing this mainly
because of the editing restrictions, is it necessary? Can someone provide a
general idea of how I might go about creating this FAQ system that allows
questions to be categorized and then fetched/displayed by
Category/Sub-Category?!?
Thanks!!
Kevin Cummings
--
View this message in context: http://n2.nabble.com/New-xwiki-user-looking-for-some-guidance...-tp2146187p…
Sent from the XWiki- Users mailing list archive at Nabble.com.