Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Add a CSS class to a generated html table element using search container.
I've a search container that generates a div with a table element inside.
<liferay-ui:search-container
total="${totalTransactionsCount}"
emptyResultsMessage="no-transactions-to-pay"
curParam="transactionPage">
<liferay-ui:search-container-results
results="${totalTransactionsList}" />
<liferay-ui:search-container-row
className="foo.Transaction"
modelVar="transaction">
<liferay-ui:search-container-column-text
cssClass="select">
<aui:input
cssClass="selectAllTransactions"
id="checkAllTransactions"
name="checkAllTransactions" label=""
type="checkbox" checked="false"/>
</liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-text cssClass
="text-nowrap" name="totalAmount"
value="${transaction.totalAmount} €"/>
</liferay-ui:search-container-row>
<liferay-ui:search-iterator />
</liferay-ui:search-container>
there is any way to add a css class to the table element?
i've tried to use a JS function, but on the onLoad step the table is still empty, it is only loaded in the end of all.
Thanks,
Joao
Joao Vicente:there is any way to add a css class to the table element?
Unfortunately, not until LPS-82855
(which adds a searchResultCssClass attribute to the
liferay-ui:search-iterator tag), which won't be available
until the next 7.1 GA release. If you need the functionality before
that release, and you can't build Liferay from source yourself, you
can try downloading a nightly 7.1.x snapshot from releases.liferay.com
to see if everything works for you.
Thank you for your clarification.
I'm using LR DXP, so I will
try to find a workaround.
Best regards,
João Vicente
Joao Vicente:I'm using LR DXP, so I will try to find a workaround.
If you're using DXP 7.1, the change was released to subscribers as part of the DXP-2 fix pack.