Hello To ALL
        I recently updated shindig and its working fine .
        I want to use Activity template for my various activity gadget
but some were i  m wrong.
        whenever i m calling "messagebundle.xml" , its simply giving
me string value whatever lies inside <msg> ${title}</msg>. its simply
displaying ${title} on my view page but it suppose to display the
value of title . I m not getting any idea why  not <messagebundle></
messagebundle> file is taking value that is passed from activity.

attaching files:

<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="music">
  <Locale messages="http://172.19.98.74/php/anandkumar/GOS/
GOSDemoAppPHP/gadgets/messages.xml"/>
  <Require feature="opensocial-0.7"/>
</ModulePrefs>
<UserPref name="activity" display_name="__MSG_activity__"
default_value="Gift" datatype="enum">
    <EnumValue value="music" display_value="__MSG_music__" />


</UserPref>

<Content type="html">
<![CDATA[

<div id="content_div"></div>


<script type="text/javascript">



var div = document.getElementById('content_div');


function onLoadFriends() {
  var viewer ='anand';
  var owner= 'aki';
  var params = {};
  params[opensocial.Activity.Field.TEMPLATE_PARAMS]='music';
  params[opensocial.Activity.Field.TITLE] = 'AKS ';
var activity = opensocial.newActivity('music',{Song:'Do Dil Mil
Rahe',Artist: 'SRK',Subject:viewer,Owner: owner});



 opensocial.requestCreateActivity(activity,
opensocial.CreateActivityPriority.HIGH, function(){});

var div = document.getElementById('content_div');

 
alert(activity.getField(opensocial.Activity.Field.TEMPLATE_PARAMS));
        var div = document.getElementById('content_div');
        // Get userprefs
        var prefs = new gadgets.Prefs();
        // Set font color to user's color choice
        div.style.color = prefs.getString("activity");
        // Display message
        var html = "<br><h1>";
        // Use prefs.getMsg to go to the appropriate message bundle
        // and get the string associated with the "hello_world"
message.
        html += prefs.getMsg("music");
        html +=  "</h1>";
        div.innerHTML = html;

  }


function init() {
  onLoadFriends();

  }

 gadgets.util.registerOnLoadHandler(init);



  </script>

  ]]>

</Content>
</Module>

messages.xml file

<messagebundle>
 <msg name="music">
    ${Song} told ${Artist} to
    listen to a song!
 </msg>
</messagebundle>



thx,,

Anand
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Implementing OpenSocial Containers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/opensocial-container?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to