Hi,
<x:dataTable id="L_ALDD" first = "#{pagination.firstRowIndex}" rows="#{pagination.noOfRowsToShow}" styleClass="datatablecontentleft" var="CT4" value="#{courseAction.courseList}" border="0" summary="Admin LDCS data" rowId="#{CT4.courseId41}">
<f:verbatim><caption></caption></f:verbatim>
<x:column styleClass="cctfix">
<x:inputText id="LDCT_T4" maxlength="125" styleClass="#{CT4.courseTitleColumnColor}" value="#{CT4.courseTitle}" readonly="true" onmouseout="htt()" onmouseover="stt(event,this.value);return false" onclick="LDCTPopup(this,0,#{CT4.rowReadOnly})" forceId="true" onkeydown="tF(event,this)"/>
<h:graphicImage id="LDCT_I4" styleClass="esimg" value="#{CT4.courseTitleColumnMessageIcon}" onclick="showErrorMessage('#{CT4.courseTitleColumnMessageText}')" onmouseout="htt()" onmouseover="stt(event,'#{CT4.courseTitleColumnMessageText}','erroricon');return false" alt="" title="" />
</x:column>
<f:facet name="footer">
</f:facet>
</x:dataTable>
This is my part of coding.. while clicking the column a small popup will open with an input box.. If i enter a lengthy String as input it got automatically trimed rater to say it remove considerable amount of white spaces(not fully though).. i wonder y.. can u suggest me..
Apparently this also doesn't work with only a monospaced font. But in the HTML source I still see the spaces. And also still in the managed bean (do a system.out.println of this value to the console during the action method). To show the spaces anyway, you have to show the string as preformatted text. This can be done in 2 ways: put it inside a <pre> tag or apply white-space:pre; to the CSS of the element.
Hi,
i test with CSS.. Its going with space to managed bean. But after submition
the data table trim automatically and even the CSS helpless. This is my CSS for data table
datatable td input {
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 11px;
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px;
text-align: left;
line-height: 1.2em;
white-space:pre;
}
The spaces are trimmed inside the input component?
Anyway, I used Sun's JSF RI implementation wile trying to reproduce the problem. As I cannot reproduce this, it is likely caused by Tomahawk somehow. Try to play with default Sun JSF RI implementation.
JSF<h:form>
<h:inputText value="#{myBean.input}" />
<h:commandButton value="submit" action="#{myBean.action}" />
</h:form>
<h:outputText value="not formatted: #{myBean.output}" />
<h:outputText value="pre formatted: #{myBean.output}" style="white-space: pre;" />
MyBeanprivate String input;
private String output;
public void action() {
System.out.println(input);
output = input;
}
public String getInput() {
return input;
}
public void setInput(String input) {
this.input = input;
}
public String getOutput() {
return output;
}
Hi,
I feel its not working even with normal JSF.. here is my coding..
<h:form>
<h:dataTable value="#{testBean.list}" var="list" style="white-space: pre;">
<h:column>
<h:inputText value="#{testBean.input}" />
<h:commandButton value="submit" action="#{testBean.action}" />
</h:column>
<h:column >
<h:outputText value="not formatted: #{testBean.unformated}" />
</h:column>
<h:column>
<h:outputText value="pre formatted: #{testBean.formatedoutput}" style="white-space: pre;" />
</h:column>
</h:dataTable>
</h:form>
and my bean is,
public void setList(List list) {
this.list = list;
}
public List getList() {
MyBean bean = null;
List list = new ArrayList();
list.add("ananth");
return list;
}
public void setInput(String input) {
this.input = input;
}
public String getInput() {
return input;
}
public void setFormatedoutput(String formatedoutput) {
this.formatedoutput = formatedoutput;
}
public String getFormatedoutput() {
return formatedoutput;
}
public void setUnformated(String unformated) {
this.unformated = unformated;
}
public String getUnformated() {
return unformated;
}
public void action() {
System.out.println(input);
setUnformated(input);
setFormatedoutput(input);
}
i have no guess where it go wrong.. wt u thing about it..