[xwiki-users] Including css in graphics in user-created macros (WikiMacroClass)

2014-11-04 Thread Dale Davidson
Hi there.  I'm trying to create a specialized macro for my wiki that is
simply three divs, two of which have css background images that are
attached to the macroclass page.

I've tried rendering the URL into the css style attribute, and I've tried
attaching the image to the same.

I see it done with the the included macros, and I know that I can call
images from other pages, but is there a way to use an image in css?

I love xwiki, but information on this type of stuff is incredibly sparse on
the Internet.  Maybe I'm the only person trying to do this stuff...


Thanks in advance! :)

-- 
Dale Davidson
Technical Writer / Production Diagnostics
www.RanchSystems.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] HQL order by object property

2014-08-27 Thread Dale Davidson
Hello there,  I've been banging my head against the desk a few days now
over this.  I just can't find the answer online anywhere.

I'd like to perform an HQL query and use a number property of an object on
each document to sort my results.  I understand SQL very well, but I just
need to know the object/property stucture -- exact syntax -- to use as the
order by argument.  I followed the FAQ tutorial to create my class systeem,
and it all works fine, but I need to be able to display the records/objects
in order.

What I have:

#set($sql = , BaseObject as obj, IntegerProperty as prop where obj.name =
doc.fullName and obj.className = 'Sensor Types.SensorTypeClass' and obj.name
 'Sensor Types.SensorTypeTemplate' order by ??? asc)


...except for the ??? of course.  I've tried many things, but I can't
figure out the structure I need to place there.

The property I need to sort by is TypeID and is attached to the
SensorTypeClass, and is an integer.


Thanks in advance for any help anyone could lend me :)


-- 
Dale Davidson
Technical Writer / Production Diagnostics
www.RanchSystems.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] HQL order by object property

2014-08-27 Thread Dale Davidson
Thank you, Sergiu!  Directly after I sent my post, it clicked in my head.
 I did indeed fail to perform the joins.  What I have now is:

#set($sql = , BaseObject as obj, IntegerProperty as prop where obj.name =
doc.fullName and obj.className = 'Sensor Types.SensorTypeClass' and obj.name
 'Sensor Types.SensorTypeTemplate' and obj.id=prop.id.id and
prop.id.name='TypeID'
and prop.value 0 order by prop.value asc )

And it works exactly as I've been trying to make it work.

Thanks again for your quick reply! :D


On Wed, Aug 27, 2014 at 12:49 PM, Sergiu Dumitriu ser...@xwiki.org wrote:

 On 08/27/2014 03:29 PM, Dale Davidson wrote:
  Hello there,  I've been banging my head against the desk a few days now
  over this.  I just can't find the answer online anywhere.
 
  I'd like to perform an HQL query and use a number property of an object
 on
  each document to sort my results.  I understand SQL very well, but I just
  need to know the object/property stucture -- exact syntax -- to use as
 the
  order by argument.  I followed the FAQ tutorial to create my class
 systeem,
  and it all works fine, but I need to be able to display the
 records/objects
  in order.
 
  What I have:
 
  #set($sql = , BaseObject as obj, IntegerProperty as prop where obj.name
 =
  doc.fullName and obj.className = 'Sensor Types.SensorTypeClass' and
 obj.name
   'Sensor Types.SensorTypeTemplate' order by ??? asc)

 prop is not joined in the query, this means you're getting horrible
 performance if this is indeed your query. Perhaps that's your question,
 what to write to get this property in the query? Is this what you're
 looking for:

 #set($sql = , BaseObject as obj, IntegerProperty as prop where obj.name
 = doc.fullName and obj.className = 'Sensor Types.SensorTypeClass' and
 obj.name  'Sensor Types.SensorTypeTemplate'
 and prop.id.id = obj.id and prop.id.name = 'TypeID' order by prop.value
 asc)

 In general you join properties with prop.id.id=obj.id, check the
 property name with prop.id.name='propName', and get the value with
 prop.value but this last part isn't always like this, there are two
 exceptions:

 - StringLists with multiple=true and relational=false use prop.textValue
 - StringLists with multiple=true and relational=true use prop.list, but
 you usually have to write:

 , DBStringListProperty prop join prop.list list [...] prop.id.name =
 'propName' and list = 'value'

 
  ...except for the ??? of course.  I've tried many things, but I can't
  figure out the structure I need to place there.
 
  The property I need to sort by is TypeID and is attached to the
  SensorTypeClass, and is an integer.
 
 
  Thanks in advance for any help anyone could lend me :)
 
 


 --
 Sergiu Dumitriu
 http://purl.org/net/sergiu
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users




-- 
Dale Davidson
Technical Writer / Production Diagnostics
www.RanchSystems.com
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users