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
Davide GiordanoDavide Giordano 

Manage booking whit a graphic Cinema seating plan

Hello, I manage reservations of seats in a movie theater with a Visual Force page that shows the floor plan with all the seats (green = free, occupied = red). You could do? in what way? using flash? How to be integrated with data from the database? thanks so much.

LSKozLSKoz
It's possible to do with visualforce and maybe a bit of javascript alone.

You would need a developer to do this for you.
Davide GiordanoDavide Giordano

Ok I wrote an example on the contact object. The contacts with the checkbox = False DoNotCall are displayed in green while True are shown in red.

Now the problem is how to display this data in a grid and not in a table. I would like to display the data on a grid with three columns and 10 rows and have the opportunity to decide what value show in which cell by reading the coordinates (x, y) from custom fields on the object. For example whit two custom filed on Contact (x_location__c, y_location__c), so if a contact whit the value (3,8) i want show this contact in the cel whit colum 3 and row 8.

It's possible? can you show me any example code?

 

this is the code that i wrote now...

 

page

 

<apex:page controller="dataTableCon" id="thePage">
<div style="padding:10px 50px 20px 50px;">
<apex:dataTable value="{!contacts}" var="contact" id="theTable" rowClasses="odd,even" styleClass="tableClass">
<apex:column >
<apex:outputPanel rendered="{!(contact.DoNotCall = true)}" >
<div style="width: 100px; height: 30px; text-align: center; background-color: red; font-weight:bold ; color: white; font-size:100%;
padding:5px 0px 5px 0px;border-style: solid; border-width: 2px;border-color:grey;box-shadow: 5px 5px 2px #888888;border-radius:5px; ">
<apex:outputText value="{!contact.name}" />
</div>
</apex:outputPanel>

<apex:outputPanel rendered="{!(contact.DoNotCall = false)}" >
<div style="width: 100px; height: 30px; text-align: center; background-color: blue; font-weight:bold ; color: white; font-size:100%;
padding:5px 0px 5px 0px;border-style: solid; border-width: 2px;border-color:grey;box-shadow: 5px 5px 2px #888888;border-radius:5px; ">
<apex:outputText value="{!contact.name}" />
</div>
</apex:outputPanel>
</apex:column>
<apex:column >
<apex:facet name="header">Do Not Call</apex:facet>
<apex:outputText value="{!contact.DoNotCall }"/>
</apex:column>
</apex:dataTable>
</div>
</apex:page>

 

 

controller

 

public class dataTableCon {

 

List<Contact> contacts;

 

public List<Contact> getContacts() {

if(contacts == null) contacts = [select name, Email, DoNotCall from contact];

return contacts ;

}

}