FAQ Application - Problem with RC2

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

FAQ Application - Problem with RC2

Shiva Shankar
Hi
I have successfully followed the tutorial on creating an FAQ application on xwiki.org. However, i dont get a table with border encompassing the question and answer. Here is the HTML from the browser for an actual document:

<dl>
<dt> Question </dt>
<dd>How do i use FAQ?</dd>
<dt> Answer </dt>
<dd>use the FAQ only for questions that do not need lengthy answers. Answers to the FAQ should be short and should not exceed a few lines with no screenshots or attachements.</dd>
</dl>

AFAIK, this was working well with Beta1. Did anything change? Or should i create the answer and question properties with non-default values?
Thanks
Shiva
Reply | Threaded
Open this post in threaded view
|

Re: FAQ Application - Problem with RC2

Guillaume Lerouge
Hi,

You should check the FAQClassSheet page.

You will find that the code looks something like:

<dl>
#foreach($prop in $class.properties)
<dt> *${prop.prettyName}* </dt>
<dd>$doc.display($prop.getName()) </dd>
</dl>

That is, it takes the properties you choose to use and displays them as a list of words with their definitions below using these tags: http://www.w3.org/TR/html401/struct/lists.html#h-10.3

If instead you want the results to be displayed as a table, you should change the html on the FAQClassSheet to this:

<table border="1" cellspacing="0" cellpadding="10">
 #foreach($prop in $class.properties)
 <tr>
   <td> *${prop.prettyName}* </td>
   <td>$doc.display($prop.getName())</td>
 </tr>
 #end
</table>

Once this is changed you will get the results in a table.

The only thing that changed is the default code used when you create a new ClassSheet. You can actually change that code to have it display whatever  you want :-).  For instance check the Applications page on XWiki.org , or give a look to the ClassSheet pages (typically at http://www.xwiki.org/xwiki/bin/view/XWiki/NameClassSheet/?viewer=code , where Name could be FAQ, Reference, Application, Calendar and so on...)

Hope this helps,

Guillaume



On 02/05/07, shivshan <[hidden email]> wrote:

Hi
I have successfully followed the tutorial on creating an FAQ application on
xwiki.org. However, i dont get a table with border encompassing the question
and answer. Here is the HTML from the browser for an actual document:

<dl>
<dt> Question </dt>
<dd>How do i use FAQ?</dd>
<dt> Answer </dt>
<dd>use the FAQ only for questions that do not need lengthy answers. Answers
to the FAQ should be short and should not exceed a few lines with no
screenshots or attachements.</dd>
</dl>

AFAIK, this was working well with Beta1. Did anything change? Or should i
create the answer and question properties with non-default values?
Thanks
Shiva
--
View this message in context: http://www.nabble.com/FAQ-Application---Problem-with-RC2-tf3678189.html#a10278664
Sent from the XWiki- Dev mailing list archive at Nabble.com.




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto: [hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws




--
http://wikibc.blogspot.com/

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: FAQ Application - Problem with RC2

vmassol
Administrator

On May 2, 2007, at 10:53 AM, Guillaume Lerouge wrote:

Hi,

You should check the FAQClassSheet page.

You will find that the code looks something like:

<dl>
#foreach($prop in $class.properties)
<dt> *${prop.prettyName}* </dt>
<dd>$doc.display($prop.getName()) </dd>
</dl>

That is, it takes the properties you choose to use and displays them as a list of words with their definitions below using these tags: http://www.w3.org/TR/html401/struct/lists.html#h-10.3

If instead you want the results to be displayed as a table, you should change the html on the FAQClassSheet to this:

<table border="1" cellspacing="0" cellpadding="10">
 #foreach($prop in $class.properties)
 <tr>
   <td> *${prop.prettyName}* </td>
   <td>$doc.display($prop.getName())</td>
 </tr>
 #end
</table>

or even better:

{table}
Property | Value
#foreach($prop in $class.properties)
  *${prop.prettyName}* | doc.display($prop.getName())
#end
{table}

That said I don't recall us changing anything since beta 1 but maybe I just don't recall. If there's something wrong in the FAQ tutorial please let us know so that we can fix it.

Thanks
-Vincent

Once this is changed you will get the results in a table.

The only thing that changed is the default code used when you create a new ClassSheet. You can actually change that code to have it display whatever  you want :-).  For instance check the Applications page on XWiki.org , or give a look to the ClassSheet pages (typically at http://www.xwiki.org/xwiki/bin/view/XWiki/NameClassSheet/?viewer=code , where Name could be FAQ, Reference, Application, Calendar and so on...)

Hope this helps,

Guillaume



On 02/05/07, shivshan <[hidden email]> wrote:

Hi
I have successfully followed the tutorial on creating an FAQ application on
xwiki.org. However, i dont get a table with border encompassing the question
and answer. Here is the HTML from the browser for an actual document:

<dl>
<dt> Question </dt>
<dd>How do i use FAQ?</dd>
<dt> Answer </dt>
<dd>use the FAQ only for questions that do not need lengthy answers. Answers
to the FAQ should be short and should not exceed a few lines with no
screenshots or attachements.</dd>
</dl>

AFAIK, this was working well with Beta1. Did anything change? Or should i
create the answer and question properties with non-default values?
Thanks
Shiva


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: FAQ Application - Problem with RC2

Shiva Shankar
Hi
That worked. The FAQ tutorial is mostly accurate, except for the following:

1) The screenshot show the FAQs in a table by default with no mention of the change to be made in the FAQClassSheet page
2) The screenshots for the properties modification are from an older version. The newer properties page looks different
I am now finally getting the hang of this :)
Thanks
Shiva

vmassol wrote
On May 2, 2007, at 10:53 AM, Guillaume Lerouge wrote:

> Hi,
>
> You should check the FAQClassSheet page.
>
> You will find that the code looks something like:
>
> <dl>
> #foreach($prop in $class.properties)
> <dt> *${prop.prettyName}* </dt>
> <dd>$doc.display($prop.getName()) </dd>
> </dl>
>
> That is, it takes the properties you choose to use and displays  
> them as a list of words with their definitions below using these  
> tags: http://www.w3.org/TR/html401/struct/lists.html#h-10.3
>
> If instead you want the results to be displayed as a table, you  
> should change the html on the FAQClassSheet to this:
>
> >  #foreach($prop in $class.properties)
>  >    >    >  >  #end
>
 *${prop.prettyName}* $doc.display($prop.getName())

or even better:

{table}
Property | Value
#foreach($prop in $class.properties)
   *${prop.prettyName}* | doc.display($prop.getName())
#end
{table}

That said I don't recall us changing anything since beta 1 but maybe  
I just don't recall. If there's something wrong in the FAQ tutorial  
please let us know so that we can fix it.

Thanks
-Vincent

> Once this is changed you will get the results in a table.
>
> The only thing that changed is the default code used when you  
> create a new ClassSheet. You can actually change that code to have  
> it display whatever  you want :-).  For instance check the  
> Applications page on XWiki.org , or give a look to the ClassSheet  
> pages (typically at http://www.xwiki.org/xwiki/bin/view/XWiki/ 
> NameClassSheet/?viewer=code , where Name could be FAQ, Reference,  
> Application, Calendar and so on...)
>
> Hope this helps,
>
> Guillaume
>
>
>
> On 02/05/07, shivshan <shivshan@hotmail.com> wrote:
>
> Hi
> I have successfully followed the tutorial on creating an FAQ  
> application on
> xwiki.org. However, i dont get a table with border encompassing the  
> question
> and answer. Here is the HTML from the browser for an actual document:
>
> <dl>
> <dt> Question </dt>
> <dd>How do i use FAQ?</dd>
> <dt> Answer </dt>
> <dd>use the FAQ only for questions that do not need lengthy  
> answers. Answers
> to the FAQ should be short and should not exceed a few lines with no
> screenshots or attachements.</dd>
> </dl>
>
> AFAIK, this was working well with Beta1. Did anything change? Or  
> should i
> create the answer and question properties with non-default values?
> Thanks
> Shiva


--
You receive this message as a subscriber of the xwiki-dev@objectweb.org mailing list.
To unsubscribe: mailto:xwiki-dev-unsubscribe@objectweb.org
For general help: mailto:sympa@objectweb.org?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws