function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
pj_27pj_27 

Issue in calling an Action on button click ...

Hi,

 

I have developed a VF page by using yahoo CSS and I have implemented a model dialogue.

 

In the page code on click of  'ok' button I am opening a pop up model dialouge where user selects the projects and then on next screen he will save OpportunityLineItem data for the selected projects.

 

The action method fails below 

this button is the part of the form which appears after the yahoo pop up window.

on button <apex:commandButton id="btn_conti" value="{!$Label.Continue}" action="{!testmethd}" /> 

 

I tried putting my page code here  but system does not allows me to enter due to exceeding the characters.

 

Please suggest.

 

 

 

Starz26Starz26

When you say "fails" what happens?

 

Can you post the code for the testmethd method?

raseshtcsraseshtcs

If you can post the entire code for both the page and the class it would be easier to check for the error.

pj_27pj_27

Hi , I have solved that issue , however I have got stuck into other..

 

//the folllowing is the wrapper class I have

 public class getProjWithOppoLineItem
    {
        public ReaderFromCalloutService.ProjectDetail objCallOutServi {get;set;}
        public string offeringNamei {get;set;}
        public OpportunityLineItem OppLineItemi {get;set;}
        
        public getProjWithOppoLineItem(ReaderFromCalloutService.ProjectDetail objCallOutServ,string offName, OpportunityLineItem LineItem)
        {
           objCallOutServi = objCallOutServ;
           offeringNamei =  offName;
           OppLineItemi = LineItem;
        }
    
    }

 

Now I have a list -  LstProjwithLineItem  of getProjWithOppoLineItem type classand I want to insert the values for Unit price , Service start date, service end date .... into OpportunityLineItem.

 

I have created the inputfields for the LineItem below ....

 

 

And Here is my VF page --

 

  <apex:form id="form_LineItemEntry" rendered="{!istrueprojectToSelect}" >
                <div style="visibility:hidden">
                  <apex:inputField id="forDatePicker" value="{!dummyDate.ServiceDate}" style="display:none;"/>
                </div>
                <apex:pageBlock id="pb_LineItemEntry" title="{!$Label.Project_Details}">
                    <apex:pageMessages rendered="{!isError}"/>
                    <apex:pageBlockButtons id="btns_LineItemEntry" location="top">
                        <apex:commandButton id="btn_continue" value="{!$Label.Continue}"  
                          immediate="true" action="{!saveProduct}" />  
                        <apex:commandbutton id="Cancel3" value="{!$Label.Cancel}" onclick="return confirmCancel();"
                           action="{!funcCreateOpp}" immediate="true"/>
                    </apex:pageBlockButtons>
                    
                   <!--
                      ------------------------------------------------------
                                Create Line Item for Selected Project
                      ------------------------------------------------------
                    -->
                   
                   <table width = "100%">
                    <!-- apex:pageBlockSection id="pbs_LineItemEntry"  -->
                  <tr>    
                     
                    <apex:pageBlockTable id="pbt_LineItemEntry" value="{!LstProjwithLineItem}" var="o" styleClass="odd,even" width="100%"  columns="6">
                            <apex:column id="projnum"  width="1%">
                                <apex:facet name="header">{!$Label.Project_Number}</apex:facet>
                               <apex:outputText value="{!o.objCallOutServi.ProjectNumber}"/>
                            </apex:column>
                            <apex:column id="OfferingName"  style="width:250px;">
                                <apex:facet name="header">{!$Label.Offering_Name_Create_Line_Item}</apex:facet>
                                <apex:outputText value="{!o.offeringNamei}"/>
                            </apex:column>
                             <apex:column id="UnitPrice" >
                                <apex:facet name="header">{!$Label.Unit_Price}</apex:facet>
                                <apex:inputfield value="{!o.oppLineItemi.UnitPrice}" required="true"/>
                            </apex:column>
                             <apex:column id="ServiceStartDate" >
                                <apex:facet name="header">{!$ObjectType.OpportunityLineItem.fields.Service_Start_Date__c.label}</apex:facet>
                                <apex:inputfield value="{!o.oppLineItemi.Service_Start_Date__c}"  required="true"/>
                            </apex:column>
                            <apex:column id="ServiceEndDate" >
                                <apex:facet name="header">{!$ObjectType.OpportunityLineItem.fields.Service_End_Date__c.label}</apex:facet>
                                <apex:inputfield value="{!o.oppLineItemi.Service_End_Date__c}" required="true"/>
                            </apex:column>
                            <apex:column id="Description" >
                                <apex:facet name="header">{!$Label.Description}</apex:facet>
                                <apex:inputfield value="{!o.oppLineItemi.description}"/>
                            </apex:column>
                           
                        </apex:pageBlockTable>
                        </tr>
                     </table>
                </apex:pageBlock>
                                          
            </apex:form>

 

How to do this ....please suggest.