field-list no-blanks

23 views
Skip to first unread message

Jim Harvey

unread,
Mar 13, 2012, 4:39:41 PM3/13/12
to hobo...@googlegroups.com
Is there a way to set no-blanks only for certain fields, instead of the all-or-nothing approach of no-blanks=true or false? There is no parameter defined on the "labelled-item" and this code does not work:

<if test="&!test.field.nil?"><field-label:/><field-view:/></if>

It gives a "mixed parameter tags and non-parameter tags" error. Do I need to redefine the field-list tag and include a param for labelled-item? I'd really rather not go that route. Thanks for the help!

Bryan Larsen

unread,
Mar 13, 2012, 4:52:13 PM3/13/12
to hobo...@googlegroups.com
You could use the restore / replace mechanism:

<foo-label: replace>
<if>
<foo-label restore/>
</if>
</foo-label>

P.S. pull requests adding useful parameters are almost universally accepted. :)

cheers,
Bryan

> --
> You received this message because you are subscribed to the Google Groups
> "Hobo Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/hobousers/-/mA6-KBorcPQJ.
> To post to this group, send email to hobo...@googlegroups.com.
> To unsubscribe from this group, send email to
> hobousers+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/hobousers?hl=en.

Jim Harvey

unread,
Mar 14, 2012, 3:57:49 PM3/14/12
to hobo...@googlegroups.com
Cool. I just submitted a pull request with the new parameter. Hopefully it is useful - it was in my situation. Thanks!
Reply all
Reply to author
Forward
0 new messages