• saimadhu
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 20
    Questions
  • 12
    Replies

Hey, I want to to read 7 digit no 

i tried with input text like

 <apex:inputtext value="{!phoneno}" id="no" size="7"/>

 it showing 7 digit width but accepting many.how can i restrict this field to 7 digits.

Hi,

In a table I placed two checkboxes yes and no .if i click yes then checkbox NOshould deselect(if it already selected).

if a click  checkbox  NO it should deselect YES.

Here is my vf page:

<table class="list" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr border="1" class="dataRow even first" onblur="if (window.hiOff){hiOff(this);}" onfocus="if (window.hiOn){hiOn(this);}" onmouseout="if (window.hiOff){hiOff(this);}" onmouseover="if (window.hiOn){hiOn(this);}">
<td> </td>
<td> Higher Capacity Circuit </td>
<td class="actionColumn"><apex:inputCheckbox value="{!prihighcapacity}" id="checkyes" immediate="true">YES
<apex:actionSupport event="onclick" action="{!highcapacity}" rerender="PRIcapacity">
<apex:param name="checkyes" value="true" assignTo="{!yescheck}" />
</apex:actionSupport>
</apex:inputCheckbox>
</td>
<td class="actionColumn"><apex:inputCheckbox value="{!prinohighcapacity}" id="checkno" immediate="true">NO
<apex:actionSupport event="onclick" action="{!nohighcapacity}" rerender="PRIcapacity">
</apex:actionSupport>
</apex:inputCheckbox>
</td>
</tr>
</tbody>
</table>

 

the controller is:

public void highcapacity() {



if(prihighcapacity == true){
prinohighcapacity = false;
}

}

public void nohighcapacity(){


if(prinohighcapacity == true){
prihighcapacity = false;
}

}

 but it is not working as i expect if i click yes and then click no both are selecting .

we shuold select either one.any suggestion please.

Hi, Iam trying to place some checkboxes and trying to read those values in modal popup window, but my page is not recognising the actions.

Here is my code

<apex:outputPanel id="priModalPanelWrap" rendered="{!ap.pg.name == 'PRI Services'}">
<a href="#" id="modalButton{!p.b.Id}" class="actionLink">Select</a>

<apex:outputPanel rendered="{!ap.pg.name == 'PRI Services'}" >
<div id="theModal{!p.b.Id}" class="reveal-modal medium" style="width:320px;" >


<div style="line-height:18px; margin:0 0 20px; padding:0; border:0; font-weight:bold; font-size:13px; font-style:normal; text-align:left; display:block;">
<label style="font-size:14px;">Will this PRI be:</label>
<br />
<table border="1">
<tr border="1" class="dataRow even first" onblur="if (window.hiOff){hiOff(this);}" onfocus="if (window.hiOn){hiOn(this);}" onmouseout="if (window.hiOff){hiOff(this);}" onmouseover="if (window.hiOn){hiOn(this);}">
<td> </td>
<td> Higher Capacity Circuit </td>
<td class="actionColumn"><apex:inputCheckbox value="{!prihighcapacity}" id="checkyes">YES
<apex:actionSupport event="onclick" action="{!highcapacity}" rerender="PRIcapacity">
<!-- <apex:param name="selectedproductid" value="{!ap.pg.id}" assignTo="{!selectedproductid}" />-->
</apex:actionSupport>
</apex:inputCheckbox>

</td>
<td class="actionColumn"><apex:inputCheckbox value="{!prinohighcapacity}" id="checkno">NO
<apex:actionSupport event="onclick" action="{!nohighcapacity}" rerender="PRIcapacity">
<!--<apex:param name="selectedSiteABuildSiteId" value="{!epl.bs.Id}" assignTo="{!selectedSiteABuildSiteId}" />-->
</apex:actionSupport>
</apex:inputCheckbox>
</td>
</tr>
<tr>

</tr>
</table>

</div>

<a class="close-reveal-modal">&#215;</a>
<apex:commandButton value="Submit" action="{!prioptions}"/>

</div>
</apex:outputPanel>

<script type="text/javascript">
jQuery(document).ready(function(jQuery) {
jQuery('#modalButton{!p.b.Id}').click(function(e) {
e.preventDefault();
jQuery('#theModal{!p.b.Id}').reveal();
});
});
</script>


</apex:outputPanel>

 

in the controller:

 

public string selectedproductid {get;set;}
public boolean prihighcapacity {get;set;}
public boolean prinohighcapacity {get;set;}

public void highcapacity() {


system.debug('we are in highcapacity module');
if(prihighcapacity == true){
prinohighcapacity = false;
}
system.debug('value in highcapacity is'+prihighcapacity);
system.debug('value in highcapacity is'+prinohighcapacity);
}

public void nohighcapacity(){

system.debug('we are in non-high capacity module');
if(prinohighcapacity == true){
prihighcapacity = false;
}
system.debug('value in highcapacity is'+prihighcapacity);
system.debug('value in highcapacity is'+prinohighcapacity);
}


public void prioptions() {

system.debug('in pri options method');

}

 

 

when i execute my page , when i click yes or no, it is not executing the actions and not displaying system.debug messages.

is it not possible to place checkboxses in modal window?

Hi,

I have a select option with some existing contact list.

here is my code:

<apex:outputpanel id="contract" >
<apex:pageblocksection title="Existing contract" >

<apex:pageblocksectionitem >
<apex:outputlabel value="Select the contact"/>
<apex:selectList value="{!existcontactName}" size="1" >
<apex:selectOptions value="{!contactlist}" />
</apex:selectList>

</apex:pageblocksectionitem>
</apex:pageblocksection> 

controller() is

public void updatecontactlist() {



contactName = [select Id,Name,StageName,CloseDate from contact where AccountId = :acctid.AccountId];
contactlist.add(new selectOption('',' - Select contact Name -'));
for (contact ot: contactName) {
contactlist.add(new selectOption(ot.Id,ot.Name+' , '+ot.StageName+' , '+ot.CloseDate));

}
}

 

now instead of select option i want to display a table with this id,name,stage,closedate and also a checkbox.

by default all check boxes are deselcte and if i click a chekbox then it should get that contact id.

how can i write for this.

any sample code please

 

 

In my vf page i have a date filed

date: input text 

i have to place calendar lookup for this date field

how to do this.

please give me sample code.

hi,i have a label and input box.if i enter a name on the input it  is displaying  records related to that name.but when i enter the name and hit enter the name is not displaying on that label.it goes balnk ( displaying the records).

how to retain the entered value in the input box.

here is my code.

 

<apex:toolbarGroup location="left" style="padding-top:6px;">

<script type="text/javascript">
function doSearch() {
var t = setTimeout(function() {
searchServer(document.getElementById("pgName").value);
}, 500);
}
</script>

<apex:actionFunction name="searchServer" action="{!runSearch}" status="status2" rerender="soqlDebug,errors,pbtSearch">
<apex:param name="pgName" value="" />
</apex:actionFunction>

<label for="Product Search" style="color:#666;">Product Group Search</label>
<input name="Product Search" id="pgName" onkeyup="doSearch();" type="text" style="width:220px;" />

</apex:toolbarGroup>

 

 

 

 

 

 

 

 

Hi, here is my controller:

 

public class status_option{
public integer optioncount {get;set;}
public list<Status_Option__c> statop = new list<Status_Option__c>();
public List<Status_Option__c> getstatop()
{
return statop;
}

}
public list<status_option> status_option_list = new list<status_option>();
public list<status_option> getstatus_option_list()
{
return status_option_list;
}
public list<Status_Option__c> temp_statop = new list<Status_Option__c>();
public List<Status_Option__c> gettemp_statop()
{
return temp_statop;
}
public list<Build_Status__c> status_option_picklist = new list<Build_Status__c>();
public List<Build_Status__c> getstatus_option_picklist()
{
return status_option_picklist;
}

/* public status_option getstatusobj()
{
return statusobj;
}*/


public void updatestatusop()
{
statusop = true;

status_option_picklist = [SELECT Name FROM Build_Status__c];
temp_statop = [select Name,Current_Build_Status__c,Next_Build_Status__c
from Status_Option__c
where Product_Group__c = :productId ];
integer k=0;
for(integer i=0;i<temp_statop.size();i++)
{
status_option statusobj = new status_option();
statusobj.statop.add(temp_statop.get(i));
statusobj.optioncount = ++k;
status_option_list.add(statusobj);
system.debug('value of optioncount is-'+status_option_list);
}


}

 

my VF page is:

 

<apex:pageblock title="STATUS OPTIONS" rendered="{!statusop}">
<apex:outputpanel >
<apex:pageblocktable value="{!status_option_list}" var="sl" columns="1">
<apex:column ><b><apex:outputlabel value="stausoption{!sl.optioncount}"/></b>
<apex:pageblocktable value="{!sl.statop}" var="statopl">
<apex:column ><apex:outputlabel value="Name"/><apex:inputfield value="{!statopl.Name}"/><br />
<apex:outputlabel value="CurrentBuildStatus"/><apex:inputfield value="{!statopl.Current_Build_Status__c}"/><br />

<apex:outputlabel value="NextBuildStatus"/><apex:inputfield value="{!statopl.Next_Build_Status__c}"/>
</apex:column>
</apex:pageblocktable>
</apex:column>
</apex:pageblocktable>

</apex:outputpanel>
</apex:pageblock>

 

the o/p is

status option1

name : text

nextbuildstatus: text

currentbuildstatus:text

 

status option2

name : text

nextbuildstatus: text

currentbuildstatus:text

 

now i want to change nextbuildstatus,currentbuildstatus as picklist with  values of sobject like(select name from buildstatus)

how can i change my code

any suggestion please.

hey, when i click the checkbox(list of checkboxes) i want to read the corresponding filed value.

 

here is my code:

<apex:outputpanel >
<table>
<apex:repeat value="{!parentlist}" var="p1">

<tr>
<td>
<h1><b> {!p1.statusName} </b></h1>
<apex:param name="statusopname" assignTo="{!newstatusname}" value="{!p1.statusName}"/>
</td>
</tr>
<tr><td>
<h5> <b> Next Status Option</b> </h5>
</td></tr>

<apex:repeat value="{!p1.statussubmenu}" var="p12" >

<td colspan='2'>

<apex:inputcheckbox value="{!p12.chklist}">{!p12.submenu}
<apex:param name="nextstatuschkbox" assignTo="{!chkbox}" value="{!p12.chklist}"/>
<apex:param name="nextstatusop" assignTo="{!nextstatus}" value="{!p12.submenu}"/>
<apex:actionSupport event="onclick" action="{!updatestatusoption}" rerender="statusdialog"/>
</apex:inputcheckbox>


</td>

</apex:repeat>
</tr>


</apex:repeat>

</table>
</apex:outputpanel>

here p1 is list of lists

the output is:

 

staus1

chbox status2 chkbox status3

chkbox status4 chkbox status4

 

status2

chkbox status1 chkbox status3

chkbox staus4  chkbox status5

...

now if i select status2 status 3under status1

i need to update the custom object with those values.

how can i get those values when click the checkbox

 

is there anyway to read values from those listof lists.

 

 

Hi, I want to display values inthis format

 ex-i have 5names

name1,name2,name3,name4,name5

format is:

name1

 name2  name3

name4   name5

 

name2

name1 name3

name4 name5

 

name3

name1 name2

name4name5

so on

I tried many ways but i didnt

 

my ocde is here:

public class statuslist{
public string statusName{get;set;}
public list<string> statussubmenu{get;set;}

 

public list<statuslist> parentlist = new list<statuslist>();

public list<statuslist> getparentlist()
{

return parentlist;
}

 

public void updatestatusop()
{
statusop = true;
List<Status_Option__c> statop = new List<Status_Option__c>([select                  Name,Current_Build_Status__c,Next_Build_Status__c
from Status_Option__c
where Product_Group__c = :productId ]);
system.debug('list size is:'+statop.size());


for(integer i=0;i<statop.size();i++)
{
statuslist tmp =new statuslist();  
system.debug('status name is'+statop.get(i).Name);     
tmp.statusName = statop.get(i).Name;

for(integer j=0;j<statop.size();j++)
{
if(i==j)
continue;
else
tmp.statussubmenu.add(statop.get(j).Name);


}
parentlist.add(tmp);

}
}

 

   but iam getting nummobject refernce error.can anybody help me

my code is

<apex:pageblock value="{!status}" var="s"}

<apex:column headerValue="name"   value="{!s.name"}/>

.

.

.

 

my controller is

status_option__c status=new status_option__c();

status= [select name,build_status__c from status_option__c];

but my page is displaying only the last record