• DS777
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 27
    Questions
  • 47
    Replies
Anybody experiencing issues on na6 for Visual Force Pages having return URL?
  • November 18, 2008
  • Like
  • 0
Is there any way to insert new picklist values using Apex for a Custom Object?
  • November 14, 2008
  • Like
  • 0
I would like to permanently delete records from one of the custom object . basiclly do not want to see any records in recycle bin as the custom objects holds temporary queue records in my app.
 
Any help will be appreciated.
 
  • August 11, 2008
  • Like
  • 0
I have a page which has one or more lookup fields of the object.
I am using outputfield tag to display the value of the lookup fields.
The page is getting rendered with values in PDF but the hyperlink is also rendered.
Is there any way to supress the underline - in HTML using stylesheet I can supress it but for PDF I am not able to supress.

Any help in this area is appreciated.

  • July 07, 2008
  • Like
  • 0
How to avoid wrapping of table column values?
 
<apex:PageBlock >
    <apex:pageBlockButtons >
                             <apex:commandButton value="Save"   action="{!save}"></apex:commandButton>
                             <apex:commandButton value="Cancel" action="{!cancel}">
    </apex:commandButton>
</apex:pageBlockButtons>
<apex:pageBlockSection > 
<apex:pageBlockTable value="{!test}" var="pick" > 
            <apex:column headervalue="{!$ObjectType.testDetail__c.Fields.testQuantity__c.label}"><apex:outputfield value="{!test.PickQuantity__c}"/></apex:column>    
      <apex:column headervalue="{!$ObjectType.testtDetail__c.Fields.StockUM__c.label}"><apex:outputField value="{!test.StockUM__c}"/></apex:column>  
      <apex:column ></apex:column> 
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:PageBlock>
  • July 06, 2008
  • Like
  • 0
I have 3 tabs on my page. After editing a record(followed by save)  or on cancel on tab 2  how to return back to tab 2 as
Current behaviour is that  you get re-directed to tab 1 which is the default tab as selectedtab is set to tab1.
Here save and cancel are standard buttons.
 
An example would be helpful.
  • July 06, 2008
  • Like
  • 0
I have following scenerio in a vf page
The page uses standardController for Object A
                   Column - 1                    Column 2                Column 3
---------------------------------------------------------------------------------------------------------------------------------
Record 1 - <Col 1 of the objectA>  < Input Check box> <an Input field whichis not an objectA column>
Record 2  <Col 1 of the object A> <Input Check box>    <an Input field which is not an object A column>
...
... and so on
 
And I have two command buttons <Save> <Cancel>
Now on <Save> , I want to check  which record is checked and get the value entered in Column 3 and call an class to process the data.
 
Any examples will be quite helpful.
 
Thanks in advance.
  • June 28, 2008
  • Like
  • 0
I want to display a related column value in a datatable. The id is being displayed enclosed in [ ]
 
How can i display the actual value of the related column in VF page? Do I have to query the data from related object and get the actual value and display or VF provide any function to obtain the data value?
 
 
 
  • June 21, 2008
  • Like
  • 0
I have command buttons on my page
and then based on javascript's value i would like to call the action.
 
  <apex:commandButton value=" Convert To Sales Order "  onclick="checkSOConv();" action="{!save}" status="ajaxStatus" rerender="main" />
                <apex:commandButton value=" Cancel " action="{!cancel}" />
 
How this can be achieved? Any help is appreciated.
  • June 21, 2008
  • Like
  • 0
Is it possible to include S-Control code in VF page to update records?
  • June 20, 2008
  • Like
  • 0
How to enable the "GO!" button for listViews in VF.
if somebody is using <apex:listViews.....
 
Then how to overrirde the following page button (eg : New Opportunity )
  • June 18, 2008
  • Like
  • 0
<apex:pageBlock >
 <apex:pageBlockButtons >
                        <apex:commandButton value="Create Sales Order" action="{!save}" />
                        <apex:commandButton value="Cancel" action="{!cancel}" />
</apex:pageBlockButtons>
 <apex:pageBlockTable value="{!accounts}" var="opp" rows="5">
<apex:column >
     <apex:facet name="header">
     </apex:facet>                           
     <apex:inputCheckbox value="{!opp.OrderConversion__c}"
                                id="theCheckbox"
                               rendered="true" />
     </apex:column>
               <apex:column headervalue="Opportunity Name">
                <apex:outputPanel > 
                   <apex:actionSupport event="onmouseover" rerender="detail">
                      <apex:param name="id" value="{!opp.id}" />
                   </apex:actionSupport>
                   {!opp.name}
                 </apex:outputPanel>
               </apex:column>
               <!--
                <apex:column value="{!opp.AccountId}" />
               -->
                <apex:column value="{!opp.Amount}" />
                <!--
                <apex:column value="{!opp.closedate}" />
                -->
                <apex:column value="{!opp.stageName}" />
    <apex:facet name="footer"></apex:facet>
 </apex:pageBlockTable>
 </apex:pageBlock>
 </apex:form>
</apex:pageBlock>
<!--
<apex:actionStatus id="status" startText="{!CurrentPageReference.parameters.cid}" />
-->
<apex:outputPanel id="detail">
<apex:actionStatus startText="Requesting ...">
<apex:facet name="stop">
        <apex:detail subject="{!Opportunity}" relatedList="false" title="false" />
</apex:facet>
</apex:actionStatus>
</apex:outputPanel>
</apex:page>
 
currently i am displaying only 5 rows
now i need <<next>> and <<forward>> so as to scroll to next set of data.
How can this be achieved.
  • June 17, 2008
  • Like
  • 0
I am building an application which makes use of Apex Code, Apex Web Services API , Triggers (in Developer Edition account).
Can the managed packaged of the application run on Professional Edition?
 
  • June 14, 2008
  • Like
  • 0
Is Apex or triggers using Apex code or creating a button with Apex supported in Professional Edition?
What are the alternatives ?
  • June 14, 2008
  • Like
  • 0
I am getting following error
"Unable to find form for this button" for a detail page button. Any idea what may be wrong.
  • June 13, 2008
  • Like
  • 0
How to include Printable view in VF pages? - so as to look like SFDC page
  • June 12, 2008
  • Like
  • 0
How to get session id in an Apex Trigger code ?
  • June 12, 2008
  • Like
  • 0
I want to have a trigger on before insert ( if quantity is > then some condition error message is given).
I have written the trigger code in two ways, I need to know which is the correct or efficient way and why?
 
1st approach
-------------------
trigger ReceivedQtyCheck on Receipt__c (before insert) {
Set<ID> supplyId = new Set<ID>();
// Supply Order id
for (Receipt__c  receipts : Trigger.new)
        supplyId.add(receipts.SupplyOrder__c);
// Get the  Required Quantity and Received Quantity for the Supply Order
Map<Id, SupplyOrder__c> Supplies = new Map<Id, SupplyOrder__c> (
[select requiredQuantity__c, receivedQuantity__c from SupplyOrder__c where id in :supplyId]);

// Check the Receipt Quantity
for (Receipt__c receipts : Trigger.new)
        if (receipts.receivedQuantity__c > ((Supplies.get(receipts.SupplyOrder__c).requiredQuantity__c == null ? 0: Supplies.get(receipts.SupplyOrder__c).requiredQuantity__c)-
                                            (Supplies.get(receipts.SupplyOrder__c).receivedQuantity__c == null ? 0: Supplies.get(receipts.SupplyOrder__c).receivedQuantity__c)
                                           )
           )
        {
        receipts.addError('Received Quantity cannot be greater then Supply open quantity');
        }
}
 
2nd Approach
------------------
trigger ReceivedQuantityChk_01 on Receipt__c (before insert) {
for (Receipt__c receipts : Trigger.new) {
// get the Supply Order details
   SupplyOrder__c supplies = [select p.id, p.receivedQuantity__c, p.requiredQuantity__c from SupplyOrder__c p where p.id = :receipts.SupplyOrder__c Limit 1];
   try {  
// check the received quantity
  
      if (receipts.receivedQuantity__c > (supplies.requiredQuantity__c == null ? 0: supplies.requiredQuantity__c)
                                   -  (supplies.receivedQuantity__c == null ? 0: supplies.receivedQuantity__c)
         ) 
         {
         receipts.addError('Received Quantity cannot be greater then Supply open quantity');
         }
    }
    catch (Exception e) {
           System.debug(e.getMessage());
    }
 }
}
 
 
 
  • May 28, 2008
  • Like
  • 0
Is there a way to suppress action,edit or delete links? Not by having reading permissions on the object.
But using javascript or Apex.
  • May 22, 2008
  • Like
  • 0
Just signed for Summer'08 pre-release. While signing there was a note saying that "data will be lost" when Summer'08 version is released.
 
Is "Data will be lost"  means that  the data created in environment will be lost but not the apex code or objects.
I plan to develop some application using Summer '08 pre-release version and don't want to lose the code.
 
 
  • May 20, 2008
  • Like
  • 0
Hi,

     I am embedding inline s-control into Leads. The URL s-control calls the visualforce page with Lead Email Id as parameter.
  when the Leads page is loaded I am getting insufficient privilege error.  The source code is attached below. Any help in this would be appreciated.

The URL s-control:

Code:
https://na3.salesforce.com/apex/SquareDrive—email={!Lead.Email}

The VF page:

Code:
<apex:page showHeader="false" sidebar="false" controller="SquareDrive">
<!-- <apex:scontrol controlName="email" ></apex:scontrol>-->
<apex:form >
  <style>
                .activeTab {background-color: #fee6a6; color:#ac6106; background-image:none;font-size: 11px;font-weight: bold;padding:4px 8px 4px 8px;text-align:center;text-decoration: none;}
                .inactiveTab { background-color: #e9e9e9; color:#85859f; background-image:none;font-size: 11px;font-weight: bold;padding:4px 8px 4px 8px;text-align:center;text-decoration: none;}
                .x-panel{border-style:solid;border-color:#99bbe8;border-width:0;}
                .x-panel-header{overflow:hidden;zoom:1;color:#15428b;font:bold 11px tahoma,arial,verdana,sans-serif;padding:5px 3px 4px 5px;border:1px solid #99bbe8;line-height:15px;background:transparent url(../images/default/panel/white-top-bottom.gif) repeat-x 0 -1px;}
                .box{height: 100%;width: 75%;}
                .x-panel-body{border:1px solid #99bbe8;border-top:0 none;overflow:hidden;background:white;position:relative;}
                
   </style>
   
   <div style="background-color:white;">
    
    <apex:tabPanel switchType="server" tabClass="activeTab" inactiveTabClass="inactiveTab">
    <apex:tab label="BUZZ" style="background-color:white;">
    <div style="background-color:white;">
    <center>
       <table cellpadding="10" cellspacing="10" width="75%" border="5">
       <apex:repeat value="{!squareData}" var="data">
            <tr>
                <td width="50%" ><apex:outputField value="{!data.Description__c}" /></td>
                
                <td cols="2">
                <apex:image id="theImage" value="{!$Resource.Thumbsup}" width="137" height="103"/>
                <apex:outputField value="{!data.positive__c}" />
                </td>
                
               
            </tr>
        
    </apex:repeat>
           
           <tr>
           <td align="right">
           <apex:commandButton image="{!$Resource.redLight}" action="{!back}"></apex:commandButton>
           <apex:commandButton image="{!$Resource.greenLight}" action="{!next}"></apex:commandButton>
           
           <apex:commandButton image="{!$Resource.mail_image}" action="{!sendEmail}" value="Send Mail">
           </apex:commandButton>
           </td>
           
           </tr>
       </table>
       </center>
    </div>
    </apex:tab>
  
    <apex:tab label="Connections" style="background-color:white;">
    <div style="background-color:white;">
   
    </div>
    </apex:tab>
    <apex:tab label="History" style="background-color:white;">
    <div style="background-color:white;">       
</div>
    </apex:tab>    
    </apex:tabPanel>    
    </div>
    <apex:detail subject="{!$CurrentPage.parameters.email}" relatedList="false" title="false"/>
    </apex:form>    
</apex:page>

The Controller:

Code:
public class SquareDrive {

    public PageReference sendEmail() {
    PageReference p1=new PageReference('/apex/page11');
        return p1;
    }

    String counter='1';
    Integer intCounter;
    public PageReference back() {
    intCounter=Integer.valueof(counter);
     intCounter--;
     counter=String.valueof(intCounter);
        return null;
    }


    public PageReference next() {
     intCounter=Integer.valueof(counter);
     intCounter++;
     counter=String.valueof(intCounter);
        return null;
    }
    List<SquareDrive__c> squareData;

        public List<SquareDrive__c> getSquareData() {
                 squareData= [select Description__c,positive__c from SquareDrive__c where idSquare__c=:counter];
                return squareData;
        }


}

 
 
Thanks in advance.

Joseph
 


Is there any way to insert new picklist values using Apex for a Custom Object?
  • November 14, 2008
  • Like
  • 0
I have a pick list and I am trying to create a clear button that clears the value. This is pretty simple but I can't seem to figure it out.

Here is the simple code to reproduce:

Code:
PAGE:
<apex:page controller="clearCon" action="{!load}">
    <apex:form>
        <apex:pageBlock >
           <apex:pageBlockButtons location="bottom">
               <apex:commandButton value="Clear Criteria" action="{!clear}" rerender="industry"/>
           </apex:pageBlockButtons>
           <apex:pageBlockSection columns="2" id="industry">
               <apex:inputField value="{!acct.Industry}"/>
           </apex:pageBlockSection>
       </apex:pageBlock>
   </apex:form>
</apex:page>

Controller:
public class clearCon {

    public Account acct {get; set;}
     
    public PageReference load() {
        acct = new Account();
        return null;
    }
    
    public PageReference clear(){
        acct.Industry = null;
        return null;
    }

}

 



Message Edited by TehNrd on 10-07-2008 08:52 AM
  • October 06, 2008
  • Like
  • 0
I have a developer account on NA1.

Suddenly, today, all VisualForce pages with <apex:inputfield> tags are failing when I hit any button from the VF page, even just a Cancel. The error is:

Could not resolve field 'Shipped__c' from &lt;apex:inputField&gt; value binding '{!slab.Shipped__c}'

The field name varies, but it is whatever the input field value is.

The same code is working in a production version on NA5.

What is happening?

I am scared !!

Hi,

I have a situation where I need to dynamically set the default tab in a tab panel. I have a parameter in my controller that I'm trying to use but for some reason the default tab isn't being set. If I hard code the name of the tab it works but once I try to use a visual force parameter the default tab doesn't get set properly. Here's sample code that illustrates the problem:

Code:
public class TabTest {


 public String ActiveTab {get; set;} 
 
 
 public TabTest() {
  this.ActiveTab = 'Tab2'; 
 }


}

Code:
<apex:page controller="TabTest">
 <apex:tabPanel switchType="client" selectedTab="{!ActiveTab}" id="slipTabPanel">
    <apex:tab label="Tab 1" name="tab1" id="tab1">
      Tab1
    </apex:tab>
    <apex:tab label="Tab 2" name="tab2" id="tab2">
      Tab2 
    </apex:tab>
    <apex:tab label="Tab 3" name="tab3" id="tab3">
      Tab3
    </apex:tab>
 </apex:tabPanel>
</apex:page>

 If I hard code to selectedTab="tab2" then it works fine but if I try to use a controller parameter it doesn't work. Any ideas what I might be doing wrong?
 

  • September 10, 2008
  • Like
  • 0
I'm in the process of converting an s-control to a Visualforce page, and the only stumbling block I've ran into is sending the page to the printer.

As a background, in the s-control, I had added the following code to the top and bottom of the s-control to provide "Print Screen" buttons that allowed for printing.

Code:
     <form name="PrintInformationTop">
        <input type="button" name="PrintInformationTop" value=" Print Screen " onClick = "window.print()">
     </form>

 The above code worked nicely by bringing up the standard print dialog and the output generated nicely.  In addition, it only printed the s-control frame and did not print the top tabs nor the sidebar.

When I placed the above code into Visualforce page, it continues to work, but it does not exclude the top tabs and the sidebar.  I'm assuming visualforce pages are not rendering in the same sort of a frame as s-controls did.

In addition, as you can see in the screenshots below, I've got a bit of basic formatting to do on the visualforce pages so that they print nicely with grids, etc. 

My initial question is what is the best way to print a Visualforce page to exclude the top bar and the side bar?

Secondly, for the formatting, based on what I found on the discussion boards, I was considering using "media" stylesheets to try to cleanup the look and feel for printing.  Visually on the page, the Visualforce page looks great, but when printed without gridlines, it doesn't read as well as the old s-control page.  Below is a snippet of what I found elsewhere in the discussion forum that I was going to try and use?  Does this seem to be the best approach to doing this?

Code:
style type="text/css" media="print">
...
</style>

 
I did review the solutions regarding displaying a Visualforce page as a PDF, and although I like that functionality, I don't know if it would help in this instance.  When I display this page, It contains a lot of historical actiivities.  By default the descriptions for these activities are hidden, but "Show"/"Hide" functionality exists so that a user can unhide the descriptions they want to print prior to printing.  What I can tell about the PDF functionality, it redraws the Visualforce page from scratch, so if I used some of the current methods discussed, if I had the button generate a PDF version, it would be a brand new page of the Visualforce page, not one where the user has made a number of changes upon.  If I'm incorrect on this one, let me know, because this would be a nice way of handling it.  (I know when calling the PDF version of the page, I could try to pass parameters, but this would get pretty complex with hundreds of activities...)

Thanks for any ideas!

Jon Keener
jhkeener@ashland.com






Hi there,
 
I'm trying to list all direct reports for the logged in User using User and UserRole.
 
I'm querying the UserRole tables ParentRoleID field to find any children of the parent, then going back to the User table to find the users login id.
 
Here is my controller:
 
Code:
public class FindReports {

public List<UserRole> getMyRoles() {
    //return [Select u.UserRole.Name, u.UserRole.Id, u.UserRoleId, u.Alias From User u WHERE u.UserRoleId != null LIMIT 10];
 return [Select u.Name, u.Id, (SELECT Alias FROM Users) From UserRole u WHERE u.ParentRoleId = :UserInfo.getUserRoleId()];

}

}

 
I can't seem to access the "Alias" from the Users object in my VisualForce code:
 
Code:
<apex:page Controller="FindReports" tabStyle="Account">
 
 <apex:pageBlock title="My Reports Roles">
 
 <apex:dataTable value="{!myRoles}" var="aRole" cellpadding="2" rowClasses="odd,even" styleClass="tableClass">
     <apex:column >
      <apex:facet name="header"><b>Role Name</b></apex:facet>

      {!aRole.Name}
     </apex:column>
     <apex:column >
      <apex:facet name="header"><b>Role ID</b></apex:facet>
      {!aRole.Id}
     </apex:column>
 <apex:column >
      <apex:facet name="header"><b>User 6+2</b></apex:facet>
      <!--  {!aRole.Users.Alias}  -->
     </apex:column>
   </apex:dataTable>   
  </apex:pageBlock>
 
 
</apex:page>

 I can't find "Alias" in the returned Object: java.util.ArrayList does not have the property "Alias".
 
Thank you!
 
 
I have a page which has one or more lookup fields of the object.
I am using outputfield tag to display the value of the lookup fields.
The page is getting rendered with values in PDF but the hyperlink is also rendered.
Is there any way to supress the underline - in HTML using stylesheet I can supress it but for PDF I am not able to supress.

Any help in this area is appreciated.

  • July 07, 2008
  • Like
  • 0
I have following scenerio in a vf page
The page uses standardController for Object A
                   Column - 1                    Column 2                Column 3
---------------------------------------------------------------------------------------------------------------------------------
Record 1 - <Col 1 of the objectA>  < Input Check box> <an Input field whichis not an objectA column>
Record 2  <Col 1 of the object A> <Input Check box>    <an Input field which is not an object A column>
...
... and so on
 
And I have two command buttons <Save> <Cancel>
Now on <Save> , I want to check  which record is checked and get the value entered in Column 3 and call an class to process the data.
 
Any examples will be quite helpful.
 
Thanks in advance.
  • June 28, 2008
  • Like
  • 0
What i can do to display mutiple accounts in a VF page,using standard controller.It is possible or not ?
  • June 18, 2008
  • Like
  • 0
I can't find any details in the documentation for how one would go about setting up VF page that uses the Standard controller for and object and a controller extension when the page is designed to expect a set of records rather than a single one. Would you still use the ApexPages.StandardController.getRecord() method? Also what if you wanted to use the same controller to handle both the single record case and the multi-record case. How would you evaluate what the standardcontroller returns to determine whether you're getting a single record or a set? In the case of a single record, I'd rather do this evaluation prior to the property assignment statement and avoid having to go through assigning the results to a single element collection just to then assign them to the single record...if possible.

Thanks for any info on how this works. Hey, and congrats to everyone involved in the Summer 08 release! :)
Hi all.......any suggestions????
 
I have two fields which are of data type checkbox on a custom object. Upon selection of one check box the other one should be automatically selected. Is there any way in SFDC to solve this issue.
 
Ex: Status and In-Process are two fields upon selection of Status ,In-process should be selected.
 
I tried this using Trigger , but the problem with that is the trigger fires only when i press save button.
But i need this immediately upon selection of status.
  • June 13, 2008
  • Like
  • 0
I am getting following error
"Unable to find form for this button" for a detail page button. Any idea what may be wrong.
  • June 13, 2008
  • Like
  • 0
How to get session id in an Apex Trigger code ?
  • June 12, 2008
  • Like
  • 0
I have 3 tabs on my page. After editing a record(followed by save)  or on cancel on tab 2  how to return back to tab 2 as
Current behaviour is that  you get re-directed to tab 1 which is the default tab.
Here save and cancel are standard buttons.
  • May 19, 2008
  • Like
  • 0
I'm attempting to use a dataTable to create an entry grid for users to enter 1-many items.  Screenshots and snippets of code are below:
 
The issues I'm having in making this fully functional are:
  1. Enabling the "Delete" button on each line.  To enable this, what would be the optimum answer is having a commandButton Action like:
Code:
<apex:commandButton action="{!RemoveMaterial(lines.index)}" value="Delete" styleClass="btn" rerender="MaterialGrid" immediate="true"/>

The key difference, the RemoveMaterial(lines.index).

So the first question, is there any way to access the actual index of the List in a column of a dataTable?

The second question is passing parameters in the action parameter of the commandButton.  From previous attempts, I've found that I could pass a parameter in an action call, like shown above.  However, the current documentation (Spring 08) states on page 100 - "To add query string parameters to a commandButton, specify them in the associated action method".  Assuming this is true, how do you do this if not like above, and how would you set up the code in the class to access these parameters.

A third item that I ran into, however I'm planning to work around it for now, is if I make any of the inputFields required, when I add a second+ line, when a required field on a previous line is blank, I get the error message popping up stating that the field is required. I'd rather not yell :smileyhappy: at the user to they hit the "next" button (not shown in screenshot, but it's part of a multistep wizard)

I've got some less elegant alternatives for deleting a row that I might try, like placing regular html input buttons instead of commandButtons, etc., but I'm hoping to solve this without resorting to that, because then the code will be a bit bulkier to support this.  Based on the code involved so far, it should be pretty reusable for other grids.

Thanks for any assistance!

Jon Keener


 

, without resorting to Javascript onclick events(which I'm going to be investigating after this, but I foresee some of the same issues there also)

 
 
The Entry form is working nicely and the Add Another Material is working. 
 
 
 
 
Entry Form:
 
Page Snippet
Code:
<apex:pageBlockSection title="Material(s) to be included in Sample:" collapsible="false">
 <apex:dataTable value="{!sampleMaterials}" var="lines" styleClass="list" id="MaterialGrid">
  <apex:column> 
    <apex:facet name="header"><CENTER><b>Actions</b></CENTER></apex:facet>
    <apex:commandButton action="{!RemoveMaterial}" value="Delete" styleClass="btn" rerender="MaterialGrid" immediate="true"/>
  </apex:column> 
  <apex:column> 
    <apex:facet name="header"><b>Material Name</b></apex:facet> 
    <apex:inputField value="{!lines.name}"/>  
  </apex:column>  
  <apex:column>  
    <apex:facet name="header"><b>Sample Quantity</b></apex:facet>
    <apex:inputField value="{!lines.Sample_Quantity__c}"/>  
  </apex:column>  
  <apex:column>  
    <apex:facet name="header"><b>UOM</b></apex:facet>
    <apex:inputField value="{!lines.Sample_UOM__c}"/>  
  </apex:column> 
 </apex:dataTable> 
</apex:pageBlockSection> 

<apex:panelGrid columns="1"> 
    <apex:commandButton action="{!AddNewMaterial}" value="Add Another Material" styleClass="btn" rerender="MaterialGrid" immediate="true"/> 
</apex:panelGrid> 

 Controller Snippet
Code:
List<Sample_Material__c> sampleMaterials;

public List<Sample_Material__c> getSampleMaterials() {
    if (sampleMaterials == null)
       {
       //Initialize the Object
       sampleMaterials = new List<Sample_Material__c>();
       sampleMaterials.add(new Sample_Material__c());
       }
    return sampleMaterials;
}


public void AddNewMaterial() {
    if (sampleMaterials != null)
       {
       sampleMaterials.add(new Sample_Material__c());
       }
}

public void RemoveMaterial() {
}

 
Hi,
 
I am trying to get dabatable with a column with checkboxes which should decide which row to pick from the data table; but I am always running in problems, because the checkboxes are created for each row, so i couldnt manage to get the value of  the checkbox which is selected:
 

<apex:dataTable value="{!ent}" var="contact" cellPadding="4" border="1" align="center">

<apex:column>

<apex:selectRadio value="{!which}">

<apex:facet name="header">Ent_ID</apex:facet>

<apex:selectOption itemValue="{!contact.name}">{!contact.name}</apex:selectOption>

</apex:selectRadio>

</apex:column>

 

Is there a way to create one checkbox in a column. If I put the the selectRadio tags out of the column tags nothing is displayed in the column.

 

Thanks in advance.

  • January 07, 2008
  • Like
  • 0