• Anindya Halder 17
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 2
    Replies
I have a lightning component which contains a table.
I am trying to highlight a row in red if some conditions are met.
My code is like this 
<tr aura:id="tablerow" > </tr>

I have added this in my css

.THIS .row-removal { background-color: red !important; }
.THIS .slds-table tbody tr td .row-removal { background-color: red !important; }

and in my controller I am doing something this this
if(conditionMet) $A.util.addClass(component.find("tablerow"), "row-removal");

When I inspect element I can see the class row-removal has been added but nothing happens.
If I do the same thing on a it works.
Is there any restriction from SF that custom classes can not be added to table rows ?
I have created a lightning component which displays an activity timeline . 
The user wants to expand/collapse this section (it shoudl collapse towards left and expand toward right).

Basically I want the exact functionality of expandable section (https://www.lightningdesignsystem.com/components/expandable-section/#site-main-content)
But it should be a vertical expander not a horizontal one.
Something like this - the expander should be present in the marked area.
User-added image

Thanks for your help.

regards
Anindya

 
I am trying to display custom error message in lightning:input field using setCustomValidity() and reportValidity().
Exactly as given in the documentation here :- https://developer.salesforce.com/docs/component-library/bundle/lightning:input/documentation
 
({
    validateRenewaldate : function(component, event) {
        var inputCmp = component.find("inputCmp");
        var value = inputCmp.get("v.value");

        var calcutedValue = <some calculation here>;
        

        // is input valid text?
        if (value > calcutedValue) {
            inputCmp.setCustomValidity("”);
        } else {
            inputCmp.setCustomValidity("");
        }
        inputCmp.reportValidity(); 
    })

It displays the right error message when the input is invalid . But it does not remove that error essage when a valid data is entered.
I have even used checkValidity() to confirm that its actually valid.

I have verified this in Chrome and Firefox

In the documentation it clearly says reportValidity()  clears displayed wrrors when the input is valid but its not working that way.

Is there any way around this ?

P.S we can not se anything validity object because that is read-only now.
I am trying to display custom error message in lightning:input field using setCustomValidity() and reportValidity().
Exactly as given in the documentation here :- https://developer.salesforce.com/docs/component-library/bundle/lightning:input/documentation
 
({
    validateRenewaldate : function(component, event) {
        var inputCmp = component.find("inputCmp");
        var value = inputCmp.get("v.value");

        var calcutedValue = <some calculation here>;
        

        // is input valid text?
        if (value > calcutedValue) {
            inputCmp.setCustomValidity("”);
        } else {
            inputCmp.setCustomValidity("");
        }
        inputCmp.reportValidity(); 
    })

It displays the right error message when the input is invalid . But it does not remove that error essage when a valid data is entered.
I have even used checkValidity() to confirm that its actually valid.

I have verified this in Chrome and Firefox

In the documentation it clearly says reportValidity()  clears displayed wrrors when the input is valid but its not working that way.

Is there any way around this ?

P.S we can not se anything validity object because that is read-only now.
I am trying to display custom error message in lightning:input field using setCustomValidity() and reportValidity().
Exactly as given in the documentation here :- https://developer.salesforce.com/docs/component-library/bundle/lightning:input/documentation
 
({
    validateRenewaldate : function(component, event) {
        var inputCmp = component.find("inputCmp");
        var value = inputCmp.get("v.value");

        var calcutedValue = <some calculation here>;
        

        // is input valid text?
        if (value > calcutedValue) {
            inputCmp.setCustomValidity("”);
        } else {
            inputCmp.setCustomValidity("");
        }
        inputCmp.reportValidity(); 
    })

It displays the right error message when the input is invalid . But it does not remove that error essage when a valid data is entered.
I have even used checkValidity() to confirm that its actually valid.

I have verified this in Chrome and Firefox

In the documentation it clearly says reportValidity()  clears displayed wrrors when the input is valid but its not working that way.

Is there any way around this ?

P.S we can not se anything validity object because that is read-only now.

On a VF page, I have a pageBlockTable.  There are times where there are more than 1000 records in the collection to be rendered.  When this occurs, the Visualforce collection limit of 1000 is hit and the page doesn't load.  I need to figure out a creative solution for getting around this.  In the end...

 

  1. I need all records to render on the page. If I do any pagination, it'll happen client-side after the records are loaded in the HTML.  I know the first responses to this will be about whether I really need to have all those records on the page and how there is doubt about whether I need to, but for the purposes of this forum post, please work with me here.
  2. I want to keep the look and feel of a pageBlockTable if possible.

 

When not using pageBlockTables, I have used a construct similar to the following to get through a collection of more than 1000 items.

 

<apex:repeat value="{!myCollection}" var="item" rows="1000" first="0">
{!item.text}
</apex:repeat>
<apex:repeat value="{!myCollection}" var="item" rows="1000" first="1000">
{!item.text}
</apex:repeat>
<apex:repeat value="{!myCollection}" var="item" rows="1000" first="2000">
{!item.text}
</apex:repeat>

 

pageBlockTable has the rows and first parameters, but if I do that, I'd be getting a new pageBlockTable everytime.

 

The options I can think of are:

 

  • Get a creative solution from the forums to actually utilize the pageBlockTable (purpose of this post)
  • Use apex:dataTable and try to use style classes to mimix the pageBlockTable look and feel. This is a nice possibility I haven't tried yet.
  • Use apex:repeat tags and make up my own HTML styling

 

Any help is appreciated.

 

 

  • September 13, 2010
  • Like
  • 0