Welcome to MSDN Blogs Sign in | Join | Help

EP Samples from TechReady3

Yesterday (07/24/2006) I presented at TechReady3 (Microsoft‘s Internal Technical Readiness Event) on the EP Session. I demoed creating a web page to display vendor list with “zero code”. And then I demoed how you could do the same thing completely through coding to control the layout and format. Then I demoed the WebPart Connection and how you can control what is being displayed on the left menu based on some business logic and here is the code sample that I used.

Here is the sample code  of the weblet that I created in this demo

public class TechReadyWebLet extends WebLet
{
 boolean _even;
}

public void run(Args args)
{
    str ret;
    VendTable vt;
    ret = "<h1>Top 10 Vendors</h1>";
    ret += "<table border=0>";

    _even=1;
    while select vt
    where vt.AccountNum < '3010'
    {
    if ( _even ==1)
     ret += "<tr>";
   ret += "<td><div class=formcaption>";
   if ( vt.VendGroup == '10')
     ret += "<IMG src=/_layouts/ep/images/green.gif /> ";

    if ( vt.VendGroup == '50')
    ret += "<IMG src=/_layouts/ep/images/yellow.gif /> ";

  ret+= vt.name + "</div>";
  ret += vt.address + "<br>" + vt.state +" " + vt.zipcode + "<br>" + vt.countryregionid + "</td>";

    if ( _even ==0)
     ret += "</tr>";

    _even = _even ? 0 : 1;
    }

    ret += "</table>";
    webSession().writeTxt(ret);

}

Here is the sample code that I used in EPVendTableInfo Web form to demo the Web Part connection

 

public boolean showMenuFunction(WebMenuFunction _menuFunction)
{
    boolean ret;
  
ret = super(_menuFunction);

if (_menuFunction.name() == weburlitemstr(EPDocuList) && vendTable.VendGroup == '50')
        ret = false;

    return ret;
}

public Common setMenuFunctionRecord(WebMenuFunction _menuFunction, Common _cursor)
{
 
      Common ret;
    if (_menuFunction.name() == weburlitemstr(EPDocuList))
        ret = null;
    else
        ret = super(_menuFunction, _cursor);

    return ret;

}

Published Tuesday, July 25, 2006 7:08 PM by meysun

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: EP Samples from TechReady3

Wednesday, July 26, 2006 3:16 AM by mugz
<code>
ret+= vt.name + "</div>";
 ret += vt.address + "<br>" + vt.state +" " + vt.zipcode + "<br>" + vt.countryregionid + "</td>";
</code>

In the "Writing Solid Code" was mentioned that MS inspects even examples for security flaws.

Can you add HTML escaping to this code?

# EP 4.0 Questions

Wednesday, August 16, 2006 4:26 PM by Solutions Monkey
Q: On the sales orders info web form on the enterprise portal (Sales &amp;gt; Sales orders &amp;gt; select one...

# re: EP Samples from TechReady3

Tuesday, October 09, 2007 3:24 AM by samiyusuf

i am trying to integrating dynamic Ax with WSS 2007,but i have a lot of problem,

such as when i deploy EP only have

   -deployStaticFiles:    Success

   -DeployWebPart:        Success

   -DeploySiteDefinition: Success

but it doesn't success with axwebparts.cap:Deploying to http://YourServerName

please what can i do?=???

please help me

# Solutions Monkey EP Samples from TechReady3 | Paid Surveys

# Solutions Monkey EP Samples from TechReady3 | debt solutions

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker