Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ordering a b:dataTableColumn by date #591

Closed
ruanfelisky opened this issue Dec 18, 2016 · 0 comments
Closed

Ordering a b:dataTableColumn by date #591

ruanfelisky opened this issue Dec 18, 2016 · 0 comments
Milestone

Comments

@ruanfelisky
Copy link

I'm trying to sort a <b:dataTableColumn> whose data type is a date (dd/MM/yyyy), but it seems like it's not doing properly, even setting the property dataType="date". I've also tried with orderBy="dom-text" or orderBy="dom-text-numeric" but no success.

Please see the example below:

@NotNull
@Temporal(TemporalType.DATE)
@Column(name = "data_movimento")	
public Date getDataMovimento() {
	return dataMovimento;
}
<b:dataTableColumn label="Data" dataType="date">
     <h:outputText value="#{movimento.dataMovimento}">
          <f:convertDateTime pattern="dd/MM/yyyy" />
     </h:outputText>	    				
</b:dataTableColumn>

image

mtvweb pushed a commit to mtvweb/BootsFaces-OSP that referenced this issue Jan 2, 2017
Allows to specify values for ordering or searching. Useful i.E. with
formatted values (like a localized Date).

Example:
<b:dataTableColumn label="Date" order="asc" data-order="#{
dateValue.toGMTString() }" data-type="date">
	<h:outputText value="#{ dateValue }">
		<f:convertDateTime dateStyle="medium" />
	</h:outputText>
</b:dataTableColumn>

Fix TheCoder4eu#591
@TheCoder4eu TheCoder4eu added this to the v1.0.2 milestone Jan 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants