• shinerajb
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 48
    Questions
  • 46
    Replies

Hai,

 

I want all these radio buttons vertically.Please do help me,now its coming horizontally

 

 

<apex:selectRadio id="typical" onclick="alert(this.value);" > <br/>
<apex:selectOption itemValue="0" itemLabel="Increasing Revenue" />
<apex:selectOption itemValue="1" itemLabel="Reducing Costs" />
<apex:selectOption itemValue="2" itemLabel="Reducing Time, Effort or Cycles for Employees" />
<apex:selectOption itemValue="3" itemLabel="Reducing Time, Effort or Cycles for Assets" />
<apex:selectOption itemValue="4" itemLabel="Reducing RIsk" />
</apex:selectRadio>

 

Shine

Hai,

I am trying to hide and display  a inputText field ,on change of a radio button,using javascript,but the issue is that,this is affecting only to the label of that text field,and no efffect on the text field.Please suggest me a solution

 

 

<script type="text/javascript">

function showVisibility(radio_value,id)

if(radio_value==1)
document.getElementById("average_sales").style.display="block";
if(radio_value==0)
document.getElementById("average_sales").style.display="none";
}
</script>

 

*********VF page **********

<label for="typical">4.Is this typical?</label>
<apex:selectRadio id="typical" onchange="showVisibility(this.value)" >
<apex:selectOption itemValue="0" itemLabel="Yes" />
<apex:selectOption itemValue="1" itemLabel="No" />
</apex:selectRadio>

<div id="average_sales">
<label for="average_sales_price">4.1.what is the average sales price?</label>
<apex:inputText id="average_sales_price" label="4.1.what is the average sales price?"/>
</div>

 

 

Shine

Hai,

I want to change the Accounts tab default home page,Can I change it from search layoutsand edit it .I want to give a link to another visual source page.


Shine

Hai,

 

I had created one App named as "DL",and I have one custom tab named as "Login",this is my landing tab,and the VF page for this tab is 

 

*****Login*****

 

<apex:page controller="Login" action="{!redirect}">
</apex:page>

****************************************

 ************controller************

******controller****

public class Login{
public PageReference redirect() {
PageReference pr;
Integer total_records;
String email_login;
email_login=UserInfo.getUserName();
Http httpProtocol ;
httpProtocol = new Http();
HttpRequest request;
request = new HttpRequest();
String endpoint ;
endpoint = 'http:///Services/validate_user_login.php?id='+email_login;
request.setEndPoint(endpoint);
request.setMethod('GET');
pr=Page.loginfailure;
HttpResponse response;
response = makeCallout(request);
JSONParser parser = JSON.createParser(response.getBody());

while (parser.nextToken() != null)
{
if ((parser.getCurrentToken() == JSONToken.FIELD_NAME) && (parser.getText() == 'total_records'))
{
parser.nextToken();
total_records=integer.valueof(parser.getText());
}
}
if( total_records>0){

return Page.welcome_login;}
else{
return Page.loginfailure;}
}

}

**********************************

 

Here I am checking that user is valid or not,if valid it should go to 

 

***********welcome_login*******

<apex:page >
<h1> Welcome</h1>

</apex:page>

***********************************

if user is invalid,then it should go to 

 

********loginfailure*****

<apex:page >

<br/>
<h1>
You do not have a valid account on <a id="theLink" name="theLink" href="https://mail.google.com/">www.gmail.co.in</a>. Please contact the folks at Decisionlink for further assistance</h1>
</apex:page>

***************************

 

In my case resulting page is displaying in the home tab of some other application and not under under my app "DL",So how can I solve this problem.

Hai,

 

I had created one App named as "DL",and I have one custom tab named as "Login",this is my landing tab,and the VF page for this tab is 

 

*****Login*****

 

<apex:page controller="Login" action="{!redirect}">
</apex:page>

****************************************

 ************controller************

******controller****

public class Login{
public PageReference redirect() {
PageReference pr;
Integer total_records;
String email_login;
email_login=UserInfo.getUserName();
Http httpProtocol ;
httpProtocol = new Http();
HttpRequest request;
request = new HttpRequest();
String endpoint ;
endpoint = 'http:///Services/validate_user_login.php?id='+email_login;
request.setEndPoint(endpoint);
request.setMethod('GET');
pr=Page.loginfailure;
HttpResponse response;
response = makeCallout(request);
JSONParser parser = JSON.createParser(response.getBody());

while (parser.nextToken() != null)
{
if ((parser.getCurrentToken() == JSONToken.FIELD_NAME) && (parser.getText() == 'total_records'))
{
parser.nextToken();
total_records=integer.valueof(parser.getText());
}
}
if( total_records>0){

return Page.welcome_login;}
else{
return Page.loginfailure;}
}

}

**********************************

 

Here I am checking that user is valid or not,if valid it should go to 

 

***********welcome_login*******

<apex:page >
<h1> Welcome</h1>

</apex:page>

***********************************

if user is invalid,then it should go to 

 

********loginfailure*****

<apex:page >

<br/>
<h1>
You do not have a valid account on <a id="theLink" name="theLink" href="https://mail.google.com/">www.gmail.co.in</a>. Please contact the folks at Decisionlink for further assistance</h1>
</apex:page>

***************************

 

In my case resulting page is displaying in the home tab of some other application and not under under my app "DL",So how can I solve this problem.

Hai,

 

I had created one App named as "DL",and I have one custom tab named as "Login",this is my landing tab,and the VF page for this tab is 

 

*****Login*****

 

<apex:page controller="Login" action="{!redirect}">
</apex:page>

****************************************

 ************controller************

******controller****

public class Login{
public PageReference redirect() {
PageReference pr;
Integer total_records;
String email_login;
email_login=UserInfo.getUserName();
Http httpProtocol ;
httpProtocol = new Http();
HttpRequest request;
request = new HttpRequest();
String endpoint ;
endpoint = 'http:///Services/validate_user_login.php?id='+email_login;
request.setEndPoint(endpoint);
request.setMethod('GET');
pr=Page.loginfailure;
HttpResponse response;
response = makeCallout(request);
JSONParser parser = JSON.createParser(response.getBody());

while (parser.nextToken() != null)
{
if ((parser.getCurrentToken() == JSONToken.FIELD_NAME) && (parser.getText() == 'total_records'))
{
parser.nextToken();
total_records=integer.valueof(parser.getText());
}
}
if( total_records>0){

return Page.welcome_login;}
else{
return Page.loginfailure;}
}

}

**********************************

 

Here I am checking that user is valid or not,if valid it should go to 

 

***********welcome_login*******

<apex:page >
<h1> Welcome</h1>

</apex:page>

***********************************

if user is invalid,then it should go to 

 

********loginfailure*****

<apex:page >

<br/>
<h1>
You do not have a valid account on <a id="theLink" name="theLink" href="https://mail.google.com/">www.gmail.co.in</a>. Please contact the folks at Decisionlink for further assistance</h1>
</apex:page>

***************************

 

In my case resulting page is displaying in the home tab of some other application and not under under my app "DL",So how can I solve this problem.

i made a new application and a tab inside that how do i attach a visual source page to the tab.

Like i have made an page called ma and i created another application i craeted a tab there.

How do i attach the page to the tab there

Regards

Shine

Hai,

 

 

I have a package containing my pages and controllers,How do I set my first page of my application,from this?

 

Shine

How do i do the unit testing for this.Unit testing does not go into this part. 

it is not being tested from response.getbody().

We are doing a lot of  json parsing please do help

Shine

 

************Code*******************

JSONParser parser = JSON.createParser(response.getBody());

while (parser.nextToken() != null)
{
if ((parser.getCurrentToken() == JSONToken.FIELD_NAME) && (parser.getText() == 'total_records'))
{
// Get the value.
parser.nextToken();
// Compute the grand total price for all invoices.
total_records=integer.valueof(parser.getText());
// total_records=
}

 

************Code*******************

Hai,

 

I am not familiar with test class.Can anyone help me to write th test code for this class ?

 

 

public class Login{

public PageReference redirect() {

Integer total_records;
String email_login;
email_login=UserInfo.getUserName();
Http httpProtocol = new Http();
HttpRequest request = new HttpRequest();
String endpoint = 'http://50.57.52.21/salesforce/Services/validate_user_login.php?id='+email_login;
request.setEndPoint(endpoint);
request.setMethod('GET');
HttpResponse response = httpProtocol.send(request);
JSONParser parser = JSON.createParser(response.getBody());

while (parser.nextToken() != null)
{
if ((parser.getCurrentToken() == JSONToken.FIELD_NAME) && (parser.getText() == 'total_records'))
{
// Get the value.
parser.nextToken();
// Compute the grand total price for all invoices.
total_records=integer.valueof(parser.getText());
// total_records=
}

}
if( total_records>0)
{
return Page.mkt_ana;
}
else
{
return Page.loginfailure;
}
return null ;
}
}

Hai,

 

I want to create a page simlar to default productsUI. i want o make some adiitional changes . What tool
should i use to create this.i need to add some additional fields like two butttons which should go to another page.

 

Shine

Hai,

 

How can I refresh/reload my parent  VF page  on clicking back button on the browser,while going back  from my child page.

Hai,

 

I have an issue with my javascript for treeview.The issue is that while I am selecting a single parent checkbox,then the entire child checkboxes of every parent node is also get checked.What is the issue with my javascript?

 

***script***

 

function checkAll(cb,cbid)
{

var inputElem = document.getElementsByTagName("input");

for(var i=0; i<inputElem.length; i++)
{
if(inputElem[i].id.indexOf(cbid) !=-1)
{
if(cb.checked)
{
inputElem[i].checked = true;

}
else
{
inputElem[i].checked = false;

}
}
}

}

 

*****VF page*****

 

<ul id="tree1" class="filetree">
<apex:repeat value="{!AllIndustries}" var="parent">
<li><span class="folder"><strong><input type="checkbox" id="checkInd1" name="{!parent.industries_level1_id}" value="{!parent.industries_level1_id}" onclick="checkAll(this,'checkInd2')"/>
<apex:outputtext style="color:blue;" escape="false" value="{!parent.industries_level1_name}"/></strong></span>
<ul>
<apex:repeat value="{!parent.industries_level2}" var="child">
<li><span class="folder">
<input type="checkbox" id="checkInd2" value="{!child.industries_level2_id}" />
<apex:outputtext style="color:green;" escape="false" value="{!child.industries_level2_name}"/></span>

</li>
</apex:repeat>
</ul>

</li>
</apex:repeat>
</ul>

hai,

 

I have made a tree view with jquery from

 

this link

 

http://www.forcetree.com/2011/04/tree-view-in-visualforce-page.html

 

i have added a check box  for each item, how do i populate the child checkboxs while i click on a parent check box.

 

Regards

Shine

hai,

 

I have made a tree view with jquery from

 

this link

 

http://www.forcetree.com/2011/04/tree-view-in-visualforce-page.html

 

i have added a check box  for each item, how do i populate the child checkboxs while i click on a parent check box.

 

Regards

Shine

hai,

 

I have made a tree view with jquery from this link http://www.forcetree.com/2011/04/tree-view-in-visualforce-page.html i have added a check box for each item, how do i populate the child checkboxs while i click on a parent check box.

 

Regards

 Shine

Hai,


I have 2 VF pages and 1 controller, from first page I want to pass 3 values from javascript to my controller class,from there I want to display the result in a new page

 

 

*******First VF page******

 

<script type="text/javascript">

function callActionMethod()
{
var txtVal0 = include;
var txtVal1 = include1;
var txtVal2 = include2;
echo(txtVal0,txtVal1,txtVal2);
}
</script>

 

<b> <span onclick="callActionMethod()" style="color:red;cursor:pointer"> Generate>>> </span></b>
<apex:actionFunction name="echo" action="{!echoVal}" reRender="resultPanel" status="myStatus">
<apex:param name="firstParam" value="" />
<apex:param name="secondParam" value="" />
<apex:param name="thirdParam" value="" />
</apex:actionFunction>

 

*********controller page************

 

 

public void echoVal()
{
val = Apexpages.currentPage().getParameters().get('firstParam');
val1= Apexpages.currentPage().getParameters().get('secondParam');
val2 = Apexpages.currentPage().getParameters().get('thirdParam');

}

 

I want to display these values in a ne VF page.I tried it by using page redirect method,but I got the values as null.But if I am displaying these 3 values in my first page,its comming correctly.What is the issue with my code

So please suggest me a solution

 

 

 

Shine

hai,

 

I have made a tree view with jquery from

 

this link

 

http://www.forcetree.com/2011/04/tree-view-in-visualforce-page.html

 

i have added a check box  for each item, how do i populate the child checkboxs while i click on a parent check box.

 

Regards

Shine

i have made a tree view with jquery from

this link

 

http://www.forcetree.com/2011/04/tree-view-in-visualforce-page.html

 

i have added a check box  for each item, how do i populate the child checkboxs while i click on a parent check box.

 

Regards

Shine

 

i am having problem in this i am taking three vales from javascript--firstParam,secondParam,thirdParam
these are working correctly. but When i want to redirect This to another page i.E-- when i remove ---reRender="resultPanel"--
Then the values are coming as null, please do help me

Regards

Shine
------page---------
<span onclick="callActionMethod()" style="color:red;cursor:pointer"> Generate>>> </span></u></i></b>
<apex:actionFunction name="echo" action="{!echoVal}" reRender="resultPanel" status="myStatus">
<apex:param name="firstParam" value="" />
<apex:param name="secondParam" value="" />
<apex:param name="thirdParam" value="" />
</apex:actionFunction>

------page---------
-----code---------

echoVal()
{
val = Apexpages.currentPage().getParameters().get('firstParam');
val1= Apexpages.currentPage().getParameters().get('secondParam');
val2 = Apexpages.currentPage().getParameters().get('thirdParam');
industriestr_id=val2;
solutionstr_id=val;
regionstr_id=val1;
}
-----code---------

i made a new application and a tab inside that how do i attach a visual source page to the tab.

Like i have made an page called ma and i created another application i craeted a tab there.

How do i attach the page to the tab there

Regards

Shine

Hai,

 

 

I have a package containing my pages and controllers,How do I set my first page of my application,from this?

 

Shine

Hai,

 

I want to create a page simlar to default productsUI. i want o make some adiitional changes . What tool
should i use to create this.i need to add some additional fields like two butttons which should go to another page.

 

Shine