Now Playing with APIs is Easy

Thursday, December 17, 2009 by Aslam - The Alexendra
If you wanna love to extract flicker, youtube, twitter, rss feeds etc using apis and wanna a easy way to check what results coming in a starndard way....here is the solution YQL :-

See this for more info:-
http://24ways.org/2009/the-web-is-your-cms

happy YQLing.... :)
Posted in | 2 Comments »

Salesforce Bot

Thursday, November 12, 2009 by Aslam - The Alexendra
Visit Here for a cool Salesforce Bot for you GTalk:-
http://salesforcebot.blogspot.com/
Posted in | 0 Comments »

Apex:commandButton and onClick issue...

Friday, October 2, 2009 by Aslam - The Alexendra
Hi,
Sometimes we find issues when we use <apex:commandButton> with both onClick and Action. We try to return false / true from our javascript method and expect things to be happen properly but sometimes it not happens. See below:-

<script>
function confirm(){
if(something condition){
return true;
}
return false;
}
</script>

<apex:commandButton value="Submit" action="{!CallAction}" onClick="return confirm();"/>

The above code does not call action sometimes..(Dont know why)...so if you change it with this, it will work:-
<apex:commandButton value="Submit" action="{!CallAction}" onClick="if(!confirm()) return false;"/>

The above code will work....Please don't ask why........


Thanks
Posted in | 6 Comments »

How to retrieve form values in traditional way on VF without binding

Thursday, September 24, 2009 by Aslam - The Alexendra
For exmaple you have a form with below fields:-

<apex:form>
<input type="text" name="firstname"/>
<input type="text" name="lastname"/>
<apex:commandbutton value="SubmitMe" action="{!saveform}"/>
</apex:form>


Your apex class's saveform method:-

public PageReference saveform(){
string firstName = ApexPages.currentPage().getParameters().get('firstname');

string lastName = ApexPages.currentPage().getParameters().get('lastname');

//So simple
//Do your stuff


return null
}

Enjoy!!!
Posted in | 6 Comments »

Displaying HelpText on VF page

Friday, September 18, 2009 by Aslam - The Alexendra
Hi,
We can easily show a custom field's help text on our page on our desired image like this:-

For example there is a custom field in Account object named 'Active__c'. And you wanna show its help text on VF page, do this:-

<img src="/resource/1247568559000/del_img" alt="" title="{!$ObjectType.Account.Fields.Active__c.inlineHelpText}"/>

If you need pure css based tooptip with your own style and without any javascript, here it is:-

<style>
a:hover {
background:#ffffff;
text-decoration:none;
} /*BG color is a must for IE6*/


a.tooltip span {
display:none;
padding:2px 3px;
margin-left:8px;
width:130px;
}


a.tooltip:hover span{
display:inline;
position:absolute;
background:#ffffff;
border:1px solid #cccccc;
color:#6c6c6c;
}
</style>


<a class="tooltip" href="#">
<img src="/resource/1247568559000/del_img"/>
<span>{!$ObjectType.Account.Fields.Active__c.inlineHelpText}.</span>
</a>


Enjoy!
Posted in | 2 Comments »

Share The Solutions For Tech Problems

Wednesday, September 16, 2009 by Aslam - The Alexendra
Hi All,
Here i am going to describe how to exclude some part of your web page from print / print preview. Suppose you want to hide some part of the web page lets say 'div' to be print. Use this syntax.


---------------------------------------------------------------------------
<style media="print">
.hide{
display:none;
}
</style>

<div class="hide">
some contents to be hidden
</div>

----------------------------------------------------------------------------


The media = "print" will apply for print version of the page only....On your normal page(browser) you will be able to see contents but in print you will not...

Enjoy................

Posted in | 3 Comments »