Re: freemarker in struts2 application

Daniel Dekany <[email protected]> Mon, 19 Jul 2010 15:35:02 +0200
Newsgroups gmane.comp.text.fmpp
Message-ID <[email protected]>
Monday, July 19, 2010, 1:18:33 PM, jyothisree wrote:

> I have a struts2 application ,where in the jsp page i have struts2 tag

Note that this is the FMPP mailing-list, not the FreeMarker
mailing-list.

> checkbacklist ,which displays the list of checkboxes in a row ,i want to
> display it in the column form , for that i have made changes in the
> checkboxlist.flt file as 
>
> <#if parameters.cssStyle?exists>
> <#if "${parameters.cssStyle?html}" == "vertical">

The above line should be just:

  <#if parameters.cssStyle == "vertical">

Does the same but cleaner and faster...

Also, the two #if could be united as

  <#if parameters.cssStyle?exists and parameters.cssStyle == "vertical">

which furthermore can be reduced to:

  <#if parameters.cssStyle!'' == "vertical">

> <#if itemCount%2==0>
> <br><#rt/>
> <#else>&nbsp;
> </#if>
> </#if>
> </#if>
>
> In this i can display the way i want to display the checkboxes in 2 columns
> ,but the problem is the checkboxes starting from the 2nd column are not in
> the line 
> something like this
>
>   1 chkbox     2 chkbox
>   3 chkbox        4 chkbox
>   5 chkbox    5 chkbox 
>
>  i want it to be as 
>   1 chkbox            2 chkbox
>   3 chkbox            4 chkbox
>   5 chkbox            5 chkbox 
>
> What do i do for the above code 

That's a HTML question, and so it has nothing to do wit FreeMarker.
But you could use a HTML table, or div-s with fixed width and CSS
floating.

-- 
Best regards,
 Daniel Dekany


------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first