• Vivek Chaudhari
  • NEWBIE
  • 30 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 6
    Replies
I have following code

VF CODE

<apex:page docType="html-5.0" controller="DateSample">
 <apex:form >
     <apex:pageBlock >
     <apex:pageBlockSection >
         <apex:pageBlockSectionItem >
            <apex:outputText >Select Date</apex:outputText> 
            <apex:input type="date" value="{!dat}" disabled="true" id="date1"/>            
         </apex:pageBlockSectionItem><br/>
         <apex:pageBlockSectionItem >
            <apex:outputText >Select</apex:outputText>
            <apex:inputCheckbox value="{!check}">
            <apex:actionSupport event="onClick" reRender="date1" action="{!visible}"/>
            </apex:inputCheckbox>
         </apex:pageBlockSectionItem>         
     </apex:pageBlockSection>       
     </apex:pageBlock>
 </apex:form>
</apex:page>

What is wrong with is code?...
I have one custom SObject Book__c having fields Book_name__c, Author_name__c and Price__c.
Now i want to write a trigger where one author can write only 5 books i.e.
we should be able to insert 5 book record having same author,
when we try to insert 6th book record and having same Author same as above five book then it should not allow...?
I have following code :
<apex:dataList var="book" value="{!books}" type="A" >             
            <apex:outputText >{!book.Name__c}</apex:outputText>
            <apex:outputText >{!book.Author__c}</apex:outputText>
            <apex:outputText >{!book.Price__c}</apex:outputText>
 </apex:dataList>

I want output like 
A. Some book name Author Name Price
B. Some book name Author Name Price
but not working 

tag works with only ordered data so how to get it?
I have following code

VF CODE

<apex:page docType="html-5.0" controller="DateSample">
 <apex:form >
     <apex:pageBlock >
     <apex:pageBlockSection >
         <apex:pageBlockSectionItem >
            <apex:outputText >Select Date</apex:outputText> 
            <apex:input type="date" value="{!dat}" disabled="true" id="date1"/>            
         </apex:pageBlockSectionItem><br/>
         <apex:pageBlockSectionItem >
            <apex:outputText >Select</apex:outputText>
            <apex:inputCheckbox value="{!check}">
            <apex:actionSupport event="onClick" reRender="date1" action="{!visible}"/>
            </apex:inputCheckbox>
         </apex:pageBlockSectionItem>         
     </apex:pageBlockSection>       
     </apex:pageBlock>
 </apex:form>
</apex:page>

What is wrong with is code?...
I have one custom SObject Book__c having fields Book_name__c, Author_name__c and Price__c.
Now i want to write a trigger where one author can write only 5 books i.e.
we should be able to insert 5 book record having same author,
when we try to insert 6th book record and having same Author same as above five book then it should not allow...?
I have following code :
<apex:dataList var="book" value="{!books}" type="A" >             
            <apex:outputText >{!book.Name__c}</apex:outputText>
            <apex:outputText >{!book.Author__c}</apex:outputText>
            <apex:outputText >{!book.Price__c}</apex:outputText>
 </apex:dataList>

I want output like 
A. Some book name Author Name Price
B. Some book name Author Name Price
but not working 

tag works with only ordered data so how to get it?