Am Do, den 02.02.2006 schrieb PatrickJ (sent by Nabble.com) um 12:00:
> Suppose I design a skillset application. I define a SkillClass for
> master list of skills. I also define a PersonClass with a DBList
> property with query to list Skill items. It works and I could add a
> person with multiple skill items selected.
>
> I would like to modify Person page display to show details from Person
> object followed by a table that lists his skills along with additional
> information from respective skill objects. This table has to list
> skill details only for those skills associated with the person.
>
> How do I do this? I tried to pick the associated skills one-by-one
> from the property but could not do so with following logic.
>
#set($skillDoc = $xwiki.getDocument("XWiki.SkillClass"))
> #set($perskills=$person.getProperty("SkillList").getValue())
> #foreach ($ps in $perskills)
> SQL to retrieve skill object
You don't need a SQL statement here, I think. Do the following
#set($obj = $skillDoc.getObject("XWiki.SkillClass", <property>, $ps))
<property> := is the name of the property which store the skill
> Display information
$doc.display(<property>, $obj)
<property> := is the name of the property which has the information
> #end
Bye
Frank
--
Dipl. Inform. Frank Häfemeier <frank(a)haefemeier.net>
----------------------------------------------------
Suppose I design a skillset application. I define a SkillClass for master list of skills. I also define a PersonClass with a DBList property with query to list Skill items. It works and I could add a person with multiple skill items selected.
I would like to modify Person page display to show details from Person object followed by a table that lists his skills along with additional information from respective skill objects. This table has to list skill details only for those skills associated with the person.
How do I do this? I tried to pick the associated skills one-by-one from the property but could not do so with following logic.
#set($perskills=$person.getProperty("SkillList").getValue())
#foreach ($ps in $perskills)
SQL to retrieve skill object
Display information
#end
Any pointers on what is wrong or better ways of doing it?
--
View this message in context: http://www.nabble.com/DBListClass-and-Details-t1046024.html#a2718063
Sent from the XWiki- Users forum at Nabble.com.
Hi all,
I'm running into the following exception when trying to download
certain attachments:
Error number 3231 in 3: Exception while loading attachment xyz.doc of
document PM.xyz
Wrapped Exception: No row with the given identifier exists:
[com.xpn.xwiki.doc.XWikiAttachmentContent#903453393]
com.xpn.xwiki.XWikiException: Error number 3231 in 3: Exception while
loading attachment xyz.doc of document PM.xyz
Wrapped Exception: No row with the given identifier exists:
[com.xpn.xwiki.doc.XWikiAttachmentContent#903453393]
at com.xpn.xwiki.store.XWikiHibernateStore.loadAttachmentContent(XWikiHibernateStore.java:1484)
at com.xpn.xwiki.doc.XWikiDocument.loadAttachmentContent(XWikiDocument.java:1499)
at com.xpn.xwiki.doc.XWikiAttachment.getContent(XWikiAttachment.java:360)
at com.xpn.xwiki.XWikiService.renderDownload(XWikiService.java:689)
at com.xpn.xwiki.web.ViewEditAction.execute(ViewEditAction.java:186)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:127)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:788)
Looking at the database, it appears some attachments do not have
content. Any idea what's going on?
mysql> select XWA_ID from xwikiattachment where XWA_ID not in (select
XWA_ID from xwikiattachment_content);
+-------------+
| XWA_ID |
+-------------+
| -1545435440 |
| -1316229821 |
| 903453393 |
| 1853219705 |
+-------------+
Regards,
Robin
Hello everyone.
When I go to any of my pages, I see the following exception there:
Error number 4001 in 4: Error while parsing velocity page Doc.WebHome
Wrapped Exception: Invocation of method 'getDocument' in class
com.xpn.xwiki.api.XWiki threw exception class
com.xpn.xwiki.XWikiException : Error number 3202 in 3: Exception while
reading document XWiki.kkembhavi
Wrapped Exception: Error number 3212 in 3: Exception while loading
object XWiki.kkembhavi Wrapped Exception: identifier of an instance of
com.xpn.xwiki.objects.BaseObject altered from -547570503 to -278557223
Could someone please tell me what it is telling me and how I can fix that?
Many thanks
Ali.