Hi Guillaume, this indeed is ugly ;-), but it does the trick. :) Thanx. Isn't there a way, as I'm not to familiar with sql and hql to get an empty line from my result. So like selecting what I select in my query and additionally pseudoselect NULL or something? If something like this can be done in HQL, I would be interrested in how to do it. Thanx again, Sebastian On Wed, Mar 18, 2009 at 2:44 PM, Guillaume Lerouge <[email protected]> wrote:
Hi Sebastian,
On Wed, Mar 18, 2009 at 2:14 PM, Sebastian Kannengiesser < [email protected]> wrote:
Hi guys,
I got to pop up this issue once more as I need help with something very related to it:
I just recognized, that the blank line that I need in my DBLists is coming from the ClassTemplate that has an "empty object" on it.
My hibernate statement is the following:
"select prop.value from BaseObject as obj, StringProperty as prop where obj.className='XWiki.ServicesComponentClass' and prop.id.id=obj.id and prop.id.name='name' order by prop.value"
The empty line, I was all the time talking about was coming from the Template of the class which had an empty property as its object was empty. For some reason this did not work any more for the template of my class itself (still not solved), but needed some other "empty" object added to any document. So I got my empty line.
Now I want to change the query to this:
"select doc.name from XWikiDocument doc, BaseObject as obj where obj.className='XWiki.ServicesComponentClass' and doc.fullName=obj.name order by doc.name"
so actually returning me the document names of the specific class instead of the 'name" property as before.
Based on my assumption what is causing a blank line in the DBList selection, how can I get a blank line in such a query, as this would need a document without a name, which is of course not possible.
Well, actually you can kinda do it. The workaround I'm suggesting here is ugly, but it might work. Create a page which name is only "+" (Say, .../xwiki/bin/view/XWiki/+ ), then add an object from your class to the page. I think it will return a blank document name, thus a blank line in your select box. Guillaume
Many thanx for your suggestions, Sebastian
On Wed, Mar 11, 2009 at 11:35 AM, Guillaume Lerouge <[email protected]> wrote:
Hi Sebastian,
I tried reproducing your issue but didn't succeed in doing so so far. When creating a class with only a DBList property, I can select either an item from the list or a blank line. The blank line is located at the very bottom of the list.
One thing you might want to try is to re-create your class. To do so, go to another page and use the class editor to recreate a class with the same properties, same queries in your DBList properties etc..
Then rename the page where your first class is and rename the page where your second class is to the name of your first class. In effet, your second class deifinition will take the place of the first one. With a little luck, recreating the class might fix your issue.
Before renaming the second class to the name of the first one, try creating an object using it and see whether it allows you to have a blank select. If it does, rename it.
Your objects won't be lost in the process. If it looks like they're broken at some point, that will be only because they lack the reference to their original class. In any case, you'll still be able to rename the first class to its original name to bring the wiki back to its current situation.
Hope this helps,
Guillaume
On Wed, Mar 11, 2009 at 11:18 AM, Sebastian Kannengiesser < [email protected]> wrote:
Hi,
how can I check what happened to my class, that the blank row is missing now in new objects. It would be really nice if you could help me with this. I desperately need the DBList property to have nothing selected in the default state. Many, many thanx in advance.
Cheers, Sebastian
On Tue, Mar 10, 2009 at 4:20 PM, Sebastian Kannengiesser <[email protected]> wrote:
Hi,
sorry guys for bumping this up again. But can you tell me, what possibly made the "blank row" in a database list property selection box disappear? I need it and it should be preselected, when creating a new document. I had this behaviour before and cannot tell, what made the blank row disappear. Any suggestion?
Thanx, Sebastian
On Tue, Mar 10, 2009 at 10:21 AM, Sebastian Kannengiesser <[email protected]> wrote:
Hi guys,
thanx Sergiu for your reply. I create documents based on a class which defines database list properties. I did not change anything in that class between when "the blank row" in the selection box in inline editing mode was present and now where it disappeared for new documents. BTW, in this particular case I do not have multiselect enabled. The alphabetically first entry is selected as the blank row isn't there anymore. Any ideas? Help is desperately needed. Thanx for all input in advance.
Cheers, Sebastian
On Mon, Mar 9, 2009 at 4:11 PM, Sergiu Dumitriu <[email protected]> wrote: > Sebastian Kannengiesser wrote: >> Hi guys, >> >> I created a few days ago some documents based on my own class which >> has databse list properties. In the respective template fields, there >> was no entry selected when creating the document which is the >> behaviour I need. When I now create a document based on the same class >> the first entry is selected a priori and there is no way to deselect, >> i.e. have nothing selected, it. The old documents still have the >> ability to deselect the entry in inline editing mode. Can you guys >> please tell me, what might have happened here or could it be a bug? I >> dont't understand this apparently undeterministic behaviour. Many >> thanx in advance. BTW, this is in XWiki 1.7.2. > > Do you create documents based on a template? If so, check that the > template wasn't changed to have a value selected. When using document > templates, the template is fully copied, including selected values. > > When you say you could deselect the selected value, do you mean that you > could Ctrl+Click, or that there was a blank row you could select? If it > was Ctrl+Click, check the multiselect setting for the property. > -- > Sergiu Dumitriu > http://purl.org/net/sergiu/ > _______________________________________________ > users mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/users >
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Guillaume Lerouge Product Manager - XWiki Skype ID : wikibc http://guillaumelerouge.com/ _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Guillaume Lerouge Product Manager - XWiki Skype ID : wikibc http://guillaumelerouge.com/ _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users