• 0 Points
  • Member since 2016

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
  • 5
Hi!. I need to pass a list of records grouped on a list (<ul> <apex:repeat var="account"...><li>{!account.name}</li></apex:repeat></ul>) to my controller to update the field value of this records. ¿There's any way to do this? Thanks!
Hi!¿Does anyone have an working example of two sortable lists with a save button?
The save button must update field values of the records that where dragged and dropped in another list.
Thank you!
Hi!, in visualforce i got an UL with Account records. Now i must to set the value of a custom field of that record with a new value.¿How can i pass the list of records to my controller? Thanks!
Hi!, i got three sortable lists where i can drag and drop accounts records from one to another list. Now , when an account has dragged from one list to another, the value of a custom field in the Account object must to change, how can i did it?
thank you!
Please anybody help me to solve this u.u

I must to translate this:
<!doctype html>
<html lang="en">
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>jQuery UI Sortable - Connect lists</title>
  <link rel="stylesheet" href="//code.jquery.com/ui/1.12.0/themes/base/jquery-ui.css">
  <link rel="stylesheet" href="/resources/demos/style.css">
  #sortable1, #sortable2 {
    border: 1px solid #eee;
    width: 142px;
    min-height: 20px;
    list-style-type: none;
    margin: 0;
    padding: 5px 0 0 0;
    float: left;
    margin-right: 10px;
  #sortable1 li, #sortable2 li {
    margin: 0 5px 5px 5px;
    padding: 5px;
    font-size: 1.2em;
    width: 120px;
  <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
  <script src="https://code.jquery.com/ui/1.12.0/jquery-ui.js"></script>
  $( function() {
    $( "#sortable1, #sortable2" ).sortable({
      connectWith: ".connectedSortable"
  } );
<ul id="sortable1" class="connectedSortable">
  <li class="ui-state-default">Item 1</li>
  <li class="ui-state-default">Item 2</li>
  <li class="ui-state-default">Item 3</li>
  <li class="ui-state-default">Item 4</li>
  <li class="ui-state-default">Item 5</li>
<ul id="sortable2" class="connectedSortable">
  <li class="ui-state-highlight">Item 1</li>
  <li class="ui-state-highlight">Item 2</li>
  <li class="ui-state-highlight">Item 3</li>
  <li class="ui-state-highlight">Item 4</li>
  <li class="ui-state-highlight">Item 5</li>

to visualforce and apex lenguages. You can see the demo in : https://jqueryui.com/sortable/#connect-lists

I must to be able to reorder and change account records listed in three lists using the mouse (drag and drop).
When we move an account from a list to other, the value of a custom field created on the account objects must to change.
The custom field of account object must be named "Level" and can get three values (level1,level2,level3).
Each list is filled with accounts that meets its values.





Thank you very much!
Hi!, in visualforce i got an UL with Account records. Now i must to set the value of a custom field of that record with a new value.¿How can i pass the list of records to my controller? Thanks!
Hello everyone, I'm new in salesforce
I want to use drag and drop in my pageblock but I can't. I've created a custom field in Accounts and display data by customfield (level__c). I want to group the accounts by groups (level 1, level 2, level 3).

This is my code:

public with sharing class TheController {
    public List<Account> accounts {get;set;}
    public String[] levels {get;set;}
    public void load(){
        accounts = [SELECT Id, Name, level__c FROM Account WHERE level__c IN ('level 1', 'level 2', 'level 3')];
        Set<String> levelSet = new Set<String>();
        for (Account a : accounts)
        levels = new String[levelSet.size()];
        Integer i = 0;
        for (String level : levelSet){
            levels[i] = level;
<apex:page controller="TheController" action="{!load}">
    <apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"/>
    <apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/jquery-ui.min.js"/>

    <apex:stylesheet value="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/themes/smoothness/jquery-ui.css"/>

    	function implementSortable(){
        	$( "#sortable" ).sortable();
            $( "#sortable" ).disableSelection();

    	<apex:repeat value="{!levels}" var="level">
            <apex:pageBlock title="{!level}">
            		<apex:repeat value="{!accounts}" var="account">
                    	<apex:outputPanel id="sortable" rendered="{!IF(level=account.level__c,true,false)}">
                    		{!account.Name} - {!account.level__c}<br/>         

Thank you, greetings



I can easily dragged the text area field. How can i restrict user from dragging or stretching textarea??



Devendra S

     We are having two Lists of check box groups which are displayed in two pageblocksections> our requirement is to display the two groups in two columns.The code is like this
                        <apex:pageblockSection title="Rules" columns="0">
                        <apex:selectCheckboxes value="{!selectedRules}">
                                <apex:selectOptions value="{!rules}"/><br/>
                 <apex:pageblockSection title="Agents">
                    <apex:selectCheckboxes value="{!selectedAgents}">
                            <apex:selectOptions value="{!agents}"/><br/></p>
    Could any one suggest on how to align these two as two columns in a pageblock?