$doc.display(propertyName) controlling width

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

$doc.display(propertyName) controlling width

DeHaynes
I am trying to create a form using tables.  I would like the "$doc.display(propertyName)" command to use the full width of the cell it is in.  Is there a way to tell it to use the full width?

I have looked at the API (http://maven.xwiki.org/site/xwiki-core-parent/xwiki-core/apidocs/com/xpn/xwiki/api/Document.html) and I seen a mode field that might do this, but I cannot find anything about how to use that field.
Reply | Threaded
Open this post in threaded view
|

Re: $doc.display(propertyName) controlling width

DeHaynes
I almost solved it.   I added a "XWiki.StylesheetExtension" and put the following CSS in it.

td input{
    width: 100%;
}

Now the only problem is that the stylesheet doesn't take effect until after the record is saved the first time.
Reply | Threaded
Open this post in threaded view
|

Re: $doc.display(propertyName) controlling width

Marius Dumitru Florea
I recommend using the
http://platform.xwiki.org/xwiki/bin/view/DevGuide/VerticalForms , i.e.
use a definition list instead of a table. Tables should be used only
for tabular data, not for layout. In any case the solution you're
looking for is in CSS. Note that the in the Vertical Form layout the
form input fields take the full width.

Hope this helps,
Marius

On Tue, Mar 18, 2014 at 4:21 PM, DeHaynes <[hidden email]> wrote:

> I almost solved it.   I added a "XWiki.StylesheetExtension" and put the
> following CSS in it.
>
> td input{
>     width: 100%;
> }
>
> Now the only problem is that the stylesheet doesn't take effect until after
> the record is saved the first time.
>
>
>
> --
> View this message in context: http://xwiki.475771.n2.nabble.com/doc-display-propertyName-controlling-width-tp7589650p7589651.html
> Sent from the XWiki- Dev mailing list archive at Nabble.com.
> _______________________________________________
> devs mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Reply | Threaded
Open this post in threaded view
|

Re: $doc.display(propertyName) controlling width

DeHaynes
Thank you.