• pkumar
  • NEWBIE
  • 15 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

Hi There,

 

Very new to visualforce here, so sorry if this is a dumb question.

 

I'm using the pageBlockTable tag to render a list of objects to the page. I want to make one of the columns hold an empty string that will be updated by some AJAX later on. In order to do that I want to add a unique ID to each one of these fields to reference it later. What I was hoping would work was:

 

 

   <apex:pageBlockTable value="{!RateCardPriceBreaks}" var="pb">
            <apex:column headerValue="Select" >
                <apex:commandButton action="{!getQuantity('test')}" value="Select"/>
            </apex:column>
            <apex:column headerValue="Product" value="{!pb.product__r.Name}" />
            <apex:column headerValue="Quantity" id="quantity" value="{!pb.ID}"/>
   </apex:pageBlockTable>

 

 

<apex:pageBlockTable value="{!RateCardPriceBreaks}" var="pb">                      
    <apex:column headerValue="Product" value="{!pb.product__r.Name}" />            
    <apex:column headerValue="Quantity" id="quantity{!pb.ID}" value=""/>  
</apex:pageBlockTable>
Error: Literal value is required for attribute id in <apex:column> at line 8 column 45

 

 

So that's obviously *not* the way to do it. Any tips?

 

TIA