Column size in JSF dataTable

Hi. I have a JSF dataTable with a string like "2006-04-05 14:58:00" in the far right column.

The problem is that this string looks like this:

2006-
04-05
14:58:00


So I need either to get a nowrap on my cells in that column,
or to be able to explicitly set the size of the cells in the column
in order to prevent this from happening. Anyone know how this
can be achieved? (see code below)

\\Karl



THE CODE:


<h:dataTable id="table" columnClasses="list-column-left, list-column-left, list-column-left"
                                      headerClass="list-header" rowClasses="list-row" styleClass="list-background"
                                      value="#{jobList.jobs}" var="jobs">
                           
                            <h:column>
                                <c:facet name="header">
                                    <h:outputText value="Job name:"/>
                                </c:facet>
                                <h:outputText id="name" value="#{jobs.name}"/>
                            </h:column>
                           
                           
                            <h:column>
                                <c:facet name="header">
                                    <h:outputText value="Commands"/>
                                </c:facet>
                                <h:commandButton id="runJob" action="#{jobList.runJob}"
                                    immediate="true" value="#{jobList.runLable}" type="SUBMIT" />
                                <h:commandButton id="editJob" action="#{jobList.viewJobDetail}"
                                    immediate="true" value="#{jobList.editLable}" type="SUBMIT"/>
                                <h:commandButton id="deleteJob" action="#{jobList.deleteJob}");"
                                    immediate="true" value="#{jobList.deleteLable}" type="SUBMIT"/>
                            </h:column>
                           
                            <h:column>
                                <c:facet name="header">
                                    <h:outputText value="Next trigger time:"/>
                                </c:facet>
                                <h:outputText id="triggerTime" value="#{jobs.nextTriggerTime}"/>
                            </h:column>                          
                           
                        </h:dataTable>
eSolutionsGroupASAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TimYatesCommented:
Try changing:

                            <h:column>
                                <c:facet name="header">
                                    <h:outputText value="Next trigger time:"/>
                                </c:facet>
                                <h:outputText id="triggerTime" value="#{jobs.nextTriggerTime}"/>
                            </h:column>                          

to:

                            <h:column>
                                <c:facet name="header">
                                    <h:outputText value="Next trigger time:"/>
                                </c:facet>
                                <h:outputText id="triggerTime" value="#{jobs.nextTriggerTime}"/>
                                <f:attribute value="true" name="nowrap" />
                            </h:column>                          

Tim
0
eSolutionsGroupASAuthor Commented:
                           <h:column>                                
                                <c:facet name="header">
                                    <h:outputText value="Next trigger time:"/>
                                </c:facet>                                
                                <h:outputText style="width:200px" id="triggerTime" value="#{jobs.nextTriggerTime}"/>                                
                            </h:column>  


Works fine. I didn't get the

<f:attribute value="true" name="nowrap" />

 solution to work though.


Thanks!

- Karl
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.