Thanks for the suggestions guys - most likely I'll stick to hibernate as
this gives me central control over how my users are represented and
used.
Currently there are not too many people registered on our server, but
we're looking at rollout in large numbers once we're past the test
stages - so I'll need to figure out how Hibernate works with this type
of query in the long run.
Thanks again!
-----Original Message-----
From: Jason Koeninger [mailto:jkoenin@jjcc.com]
Sent: 11 May 2006 16:13
To: xwiki-users(a)objectweb.org
Subject: Re: [xwiki-users] Joining two fields;
I'm no HQL expert, but I'm guessing you can do something like this:
select
firstname.value || ' ' || lastname.value from
BaseObject obj,
StringProperty firstname,
StringProperty lastname
where
obj.className='XWiki.XWikiUsers' and
firstname.id=obj.id and
firstname.name = 'first_name' and
lastname.id = obj.id and
lastname.name = 'last_name'
Untested so you may have to play around with it to get it to work.
Hopefully I'm not too far off the mark.
Also, depending on how your database's query optimizer works, a join
might perform better. Of course, that also depends on how Hibernate
translates the HQL to SQL. Hibernate *may* be smart enough to convert
this to a join in which case it's a non-issue.
Best Regards,
Jason Koeninger
J&J Computer Consulting
Mark Robinson wrote:
> Hi Brandon.
>
> No doubt there is a simple and elegant answer to your problem that
> someone will suggest soon. I worked around a similar problem that I
> needed to fix quickly by making the select straight html with a
> Velocity loop over the the option tags.
>
> That way you can still have your names and values as described.
>
> Cheers,
>
> Mark
>
>
> On 11 May 2006, at 5:50 PM, Esbach, Brandon wrote:
>
>> Hi all,
>>
>> I guess this is more a hibernate query than an Xwiki one, but here is
>> what I'm trying to do:
>> We use a simple project management class currently to keep track of
>> projects/engineer assignments/etc - currently managers type in
>> freeform names... as you could imagine this is a bit of a problem
with
>> adding some more active content relating to the user (we're adding a
>> 'workdesk' feature on login so that engineers/managers can see what
>> projects/tasks/etc are assigned to them, without having to browse
>> around and search).
>>
>> What I thought of doing was adding a dropdown with the user details -
>> allowing me to create a solid link between user and project.
>>
>> Now here's the problem...
>> I need to associate the firstname+lastname in the query - so that the
>> manager/etc will pick a name they recognise immediately, instead of
>> relying on them to know login names.
>>
>> Initially, I had thought to use a Map or List to request multiple
>> fields - but this does not seem to be understood by the renderer when
>> it creates a list dropdown - I get immediate errors
>>
>> Getting first name, no problem:
>> select prop.value from BaseObject obj, StringProperty prop where
>> obj.className='XWiki.XWikiUsers' and prop.id.id=obj.id and
>> prop.name='first_name'
>>
>> EG output in the list:
>> 'Brandon'
>> 'UserXFirstName'
>>
>> Getting Last name, also no problem:
>> select prop.value from BaseObject obj, StringProperty prop where
>> obj.className='XWiki.XWikiUsers' and prop.id.id=obj.id and
>> prop.name='last_name'
>>
>> EG output:
>> 'Esbach'
>> 'UserXLastName'
>>
>> Now it gets sticky. Join the two fields with a space between them,
>> so that instead of 'Brandon' or 'Esbach' I get 'Brandon Esbach'..
>> This I cannot seem to figure out using Hibernate, so any
>> hints/tips/suggestions would be appreciated.
>>
>>
>> *Problem number 2:*
>> Another small catch I have is mapping this entry so that I can query
>> on it. Normally with data representation one would have a 'display'
>> value and a 'link' value - kind of like the 'pretty name' and 'real
>> name' facility of class objects; only the 'pretty name' gets shown
>> when using automatic rendering - but the field is updated based on
>> 'real name'. Erm. Hope that makes sense.
>>
>> eg if my Xwiki name is braesb, firstname Brandon, lastname Esbach I
>> could have a list looking like this:
>> 'Brandon Esbach'
>> 'UserXFirstName UserXLastName'
>> Selecting 'Brandon Esbach' would then look to my 'link' value of
>> Xwiki.braesb, and store this with the record. Querying on this then
>> becomes no problem - but can this be done in Xwiki?
>>
>> /Brandon Esbach/
>> /Software Engineer/
>> /M/A-Com Eurotec Operations/
>> /LoughMahon Technology Park,/
>> /Skehard Road,/
>> /Blackrock,/
>> /Cork, Ireland/
>> /Tel +353 21 4808305/
>>
>>
>> --
>> You receive this message as a subscriber of the
>> xwiki-users(a)objectweb.org <mailto:xwiki-users@objectweb.org> mailing
list.
>> To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org
>> For general help: mailto:sympa@objectweb.org?subject=help
>> ObjectWeb mailing lists service home page:
>> http://www.objectweb.org/wws
>
>
>
> ----------------------------------------------------------------------
> --
>
>
> --
> You receive this message as a subscriber of the
xwiki-users(a)objectweb.org mailing list.
> To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org
> For general help: mailto:sympa@objectweb.org?subject=help
> ObjectWeb mailing lists service home page:
> http://www.objectweb.org/wws
Hi all,
I guess this is more a hibernate query than an Xwiki one, but here is
what I'm trying to do:
We use a simple project management class currently to keep track of
projects/engineer assignments/etc - currently managers type in freeform
names... as you could imagine this is a bit of a problem with adding
some more active content relating to the user (we're adding a 'workdesk'
feature on login so that engineers/managers can see what
projects/tasks/etc are assigned to them, without having to browse around
and search).
What I thought of doing was adding a dropdown with the user details -
allowing me to create a solid link between user and project.
Now here's the problem...
I need to associate the firstname+lastname in the query - so that the
manager/etc will pick a name they recognise immediately, instead of
relying on them to know login names.
Initially, I had thought to use a Map or List to request multiple fields
- but this does not seem to be understood by the renderer when it
creates a list dropdown - I get immediate errors
Getting first name, no problem:
select prop.value from BaseObject obj, StringProperty prop where
obj.className='XWiki.XWikiUsers' and prop.id.id=obj.id and
prop.name='first_name'
EG output in the list:
'Brandon'
'UserXFirstName'
Getting Last name, also no problem:
select prop.value from BaseObject obj, StringProperty prop where
obj.className='XWiki.XWikiUsers' and prop.id.id=obj.id and
prop.name='last_name'
EG output:
'Esbach'
'UserXLastName'
Now it gets sticky. Join the two fields with a space between them, so
that instead of 'Brandon' or 'Esbach' I get 'Brandon Esbach'.. This I
cannot seem to figure out using Hibernate, so any hints/tips/suggestions
would be appreciated.
Problem number 2:
Another small catch I have is mapping this entry so that I can query on
it. Normally with data representation one would have a 'display' value
and a 'link' value - kind of like the 'pretty name' and 'real name'
facility of class objects; only the 'pretty name' gets shown when using
automatic rendering - but the field is updated based on 'real name'.
Erm. Hope that makes sense.
eg if my Xwiki name is braesb, firstname Brandon, lastname Esbach I
could have a list looking like this:
'Brandon Esbach'
'UserXFirstName UserXLastName'
Selecting 'Brandon Esbach' would then look to my 'link' value of
Xwiki.braesb, and store this with the record. Querying on this then
becomes no problem - but can this be done in Xwiki?
Brandon Esbach
Software Engineer
M/A-Com Eurotec Operations
LoughMahon Technology Park,
Skehard Road,
Blackrock,
Cork, Ireland
Tel +353 21 4808305
When I am viewing pages (as opposed to editing pages), I wish to display a
two-pane view (the left hand nav and the main content area) and remove the
right hand piece.
When I am editing a page, I want to have the right hand explanatory text on
xwiki notation.
How can I do this?
I'm using 0.9.840 on Jboss if it matters.
--
Adrian Hall
Sr. Product Line Manager, Administration and Identity Management
e. ahall(a)mirapoint.com; t. +1 (408) 720-3856; c. +1 (408) 667-4977
I cannot get to http://www.xwiki.com or my xwiki site...I can get everywhere
else on the web. Does xwiki go down often? I am a little concerned about
availability of my xwiki site.
Thanks,
Brian
Thanks, Charles. I left a similar request as a comment on your wiki. I
am actively working on a JAAS implementation of XWiki's interfaces. Or
rather, I have begun by subclassing the XWiki*ServiceImpl classes
because that's how some others are done and there may be things that
XWiki needs there. It may actually be that it makes more sense just to
implement the interfaces directly.
This is probably not the venue for continued discussion in this vein, so
I'll do this directly, but thought I'd let the list know that this is
going on in case anyone wants to share in the effort and results.
I'm not on the developers list; are you, Charles? Would that be the
best place to carry on? I suppose if you didn't intend it to be an
"official" part of XWiki it might not be, but on the other hand it looks
like a good place for the XWiki developers to start if nothing else.
The only jGuard-specific code should be connected only by the
configuration files.
Alternatively, perhaps the jGuard wiki would be a good place to discuss
and develop the overall design. Does that sound like a good idea?
I'm sorry for the delay in responding; I started this reply on Friday
and then forgot about it over the weekend. Though I never completed it,
I found it, marked unread, in my Sent Items folder...
brain[sic]
-----Original Message-----
From: charles gay [mailto:charles.gay@gmail.com]
Sent: Thursday, May 04, 2006 3:13 AM
To: xwiki-users(a)objectweb.org
Subject: Re: [xwiki-users] JAAS Integration with XWiki
Hi,
i'm part of the jGuard project and a user of Xwiki (through our website
www.jguard.net hosted and powered by XWiki).
jGuard implements JAAS and provide an easy way to use it in a webapp
context.
that's right that Xwiki security apis differs from the JAAS apis.
but the concept involved in the Xwiki apis, are closed of the JAAS and
jGuard ones.
if you've got some interest by adapting the XWiki apis to JGuard (an
JAAS implicitly), i can help you to do it.
but this adapter will not be an "official" Xwiki way....
hope it helps,
Charles GAY(jGuard team).
On 4/25/06, THOMAS, BRIAN M (SBCSI) <bt0008(a)att.com> wrote:
We are standardizing on the Java Authentication and Authorization
Service (JAAS). I thought I heard that XWiki supports the Pluggable
Authentication Modules (PAM) standard, but haven't found any reference
to it in the docs. Further, there are some articles out about
integrating JAAS into Tomcat, which is another thing to think about. We
actually are considering at least two methods here - a centralized PIN
server and a RADIUS server for SecurID access, and both have clients
that implement the JAAS interfaces.
There are a couple of strategies that I could probably try: one is just
to use the JAAS/Tomcat integration route. That would seem to give the
most bang-per-buck, but that would (I think) not allow controls at the
level of granularity that XWiki does, or would actually take controls
away from the XWiki rights system.
Another (actually my first idea) is to implement the various
com.xpn.xwiki.user.api interfaces (XWikiAuthService, XWikiGroupService,
and XWikiRightService) with JAAS calls.
Anyone have any experience with this?
brain[sic]
--
You receive this message as a subscriber of the
xwiki-users(a)objectweb.org mailing list.
To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org
For general help: mailto: <mailto:sympa@objectweb.org>
sympa(a)objectweb.org?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
The session in XWiki is managed by cookies, I am right??
So, have anything to do where can be modified it to control with in session on each visit?
Att,
Filipe Fumaux
Hey guys,
Anybody knows where I can found the documentation about XWiki codes?
Ex.: What's it: Where's the docs about this?
#includeForm("XWiki.XWikiUserSheet")
#includeMacros("XWiki.TagMacro")
#ShowEditTags()
#set($recentlyviewed = $xwiki.getRecentActions("view", 5))
#foreach($docname in $recentlyviewed)
Att,
Filipe Fumaux
G'Day mates,
I want change some things in default XWiki's pagein my system.
U wanna change the XWiki's logo and put somethings in top of my page. How can I do this?
Regards,
Filipe Fumaux
Based on the "Sectioning Preferences" UI, it looks like XWiki intends to
support the ability to skin "Sections". The only problem is that I
haven't been able to get it to work. Being a developer, I checked out
some of the code, and from what I've seen, the Skin setting in
Sectioning Preferences appears to be ignored. I've even gone so far as
to make some changes to try to pick up my skin setting for the section,
but my changes haven't worked. Obviously, I don't fully understand the
data model.
If anyone has any pointers on how to get this to work, I would
appreciate it. It's the only thing holding me back from adopting XWiki
for one of our sites.
Thanks,
Jason Koeninger
J&J Computer Consulting