Sunday, February 27, 2011

The Mysteries of Business Object



Ref: http://javaboutique.internet.com/tutorials/businessObject/
The Mysteries of Business Object



Definition : Business Objects represent tangible entities within an application that the users create,access and manipulates while performing a Use Case. The Business Objects within a system are typically stateful, persistent and long-lived. Business Objects contain business data and models the business behavior.

--

Friday, January 28, 2011

How to Embed Existing Files into Open Office Text document

There is a procedure to link the file in to Microsoft Office document as a Display Icon which is available at http://www.associatedcontent.com/article/321749/how_to_embed_existing_files_into_microsoft.html


Here I would like to explain how to do the same using OpenOffice.org suite


Step 1:

Click on the Insert section of tool bar and you will be able to an option with name Object. After clicking on Object you would be able to see OLE Object as further option and click on it.

Simply Insert --> Object--> OLE Object

Step 2:

Now a window opens something like below, then click on Further Objects and Click OK button.

Step 3: You are almost done after this step.

Now you have to select Create From File Option and then select the document to embed and click OK button.Same is show below. By now the file will be embedded in the sheet.


Finally the doc will look like below...



--

Thanks



Wednesday, January 12, 2011

Fedora -- Create Duplicate or Clone root user account

If yo want a two root accounts for the Fedora OS you can achieve the way proposed below (Be careful doing these things):

http://www.labtestproject.com/create_root_user_account


--

Tuesday, February 17, 2009

Cross browser pop up opener and select options for a Text box

Main.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!--
    function searchPopUp(idfield,nameField){
        document.getElementById('localIdfield').value = idfield;
        document.getElementById('localNameField').value  = nameField;
        window.open("popUp.html","Ratting", "width=550,height=170,left=150,top=200,toolbar=1,status=1,");
    }
//-->
</SCRIPT>
</HEAD>
<BODY>
<form method=post action='' name=f1>
    <INPUT TYPE="hidden" NAME="localIdfield" id="localIdfield">
    <INPUT TYPE="hidden" NAME="localNameField" id="localNameField">
    <table border=0 cellpadding=0 cellspacing=0 width=550>
    <tr>
        <td >
            <font size=2 face='Verdana'>Program Manager</font>
            <input type="text" disabled="true" name="programManagerContactId" id="programManagerContactId"  size='8'>
            <input type="hidden" name="programManagerName" id="programManagerName" size='8'>
            <a href="javascript:void(0);" NAME="My Window Name" title=" My title here " onClick="javascript:searchPopUp('programManagerContactId','programManagerName');">Search Program Manager</a>
        </td>
    </tr>
    <tr>
        <td >
            <font size=2 face='Verdana'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Auditor</font>
            <input type="text" disabled="true"  name="auditorContactId" id="auditorContactId" size='8'>
            <input type="hidden" name="auditorName" id="auditorName" size='8'>
            <a href="javascript:void(0);" NAME="My Window Name" title=" My title here " onClick="javascript:searchPopUp('auditorContactId','auditorName');">Search Auditor</a>
        </td>
    </tr>
</table>
</form>
</BODY>
</HTML>

popUp.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>

<script langauge="javascript">
    function return_values(local_id, local_name){
        var parentIdField = opener.document.getElementById('localIdfield').value;
        var parentNameField = opener.document.getElementById('localNameField').value;

        opener.document.getElementById(parentIdField).value = document.getElementById(local_id).value;
        opener.document.getElementById(parentNameField).value =document.getElementById(local_name).value;
        self.close();
    }
</script>

<title>(Type a title for your page here)</title>
</head>

<body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000">

<form name="frm" method=post action=''>
    <table border=0 cellpadding=0 cellspacing=0 width=250>
        <tr>
            <td align="center">
                Id to be set<input type="text" name="local_id" id="local_id" size="12">
            </td>
        </tr>
        <tr>
            <td align="center">
                Name to be set<input type="text" name="local_name" id="local_name" size="12">
            </td>
        </tr>
    </td></tr>
    </table>
    <input type=button value='Submit' onclick="return_values('local_id','local_name');">
</form>
</html>

Tuesday, February 10, 2009

Dot Net Installer download direct links

Ref from : http://www.msfn.org/board/lofiversion/index.php/t122149.html

.NET Frameworks 1.1, 1.1SP1, 2SP1 are full downloads

.NET Framework 3 and 3.5 from the general MSDN and windows update site are bootstrappers (installs, checks config, and then downloads what's needed).

Microsoft Dot Net Framework 3.0 Bootstrapper 2.8 MB
CODE
http://www.microsoft.com/downloads/details.aspx?familyid=10CC340B-F857-4A14-83F5-25634C3BF043&displaylang=en


Microsoft Dot Net Framework 3.0 SP1 is a full download

Microsoft Dot Net Framework 3.0 Redistributable 50.3 MB - Direct Link
CODE
http://go.microsoft.com/fwlink/?LinkId=70848

Microsoft Dot Net Framework 3.5 Bootstrapper 2.7 MB
CODE
http://www.microsoft.com/downloads/details.aspx?familyid=333325FD-AE52-4E35-B531-508D977D32A6&displaylang=en

Microsoft Dot Net Framework 3.5 Redistributable 33.3 MB
CODE
http://www.microsoft.com/downloads/details.aspx?FamilyID=e3821449-3c6b-42f1-9fd9-0041345b3385&DisplayLang=en


Microsoft Dot Net Framework 3.5 Full Package 197 MB Direct Link
CODE
http://download.microsoft.com/download/6/0/f/60fc5854-3cb8-4892-b6db-bd4f42510f28/dotnetfx35.exe

It's the last one - the 197 MB file that looks to contain all preceding Dot NET versions... It also looks like it contains the x64 architecture files as well - I'm just not too sure???



Tuesday, February 3, 2009

Spring Mail and Gmail SMTP server

Spring Mail and Gmail SMTP server

February 1, 2008 at 9:04 pm · Filed under open source, spring

In case you need to use Spring Mail with Gmail SMTP server, first of all configure a mail sender bean:

<!-- Mail Sender -->
<bean
id= "mailSender" class= "org.springframework.mail.javamail.JavaMailSenderImpl" >
  <property
name= "host" value= "${mail.host}" />
  <property
name= "port" value= "${mail.port}" />
  <property
name= "username" value= "${mail.username}" />
  <property
name= "password" value= "${mail.password}" />
  <property
name= "protocol" value= "${mail.protocol}" />
  <property
name= "javaMailProperties" >
    <props>
      <prop
key= "mail.smtps.auth" >true</prop>
      <prop
key= "mail.smtps.starttls.enable" >true</prop>
      <prop
key= "mail.smtps.debug" >true</prop>
    </props>
  </property>
</bean>

We could take to a property file the relevant properties:

mail.
host = smtp. googlemail . com
mail.
port = 465
mail.
username = yourUsername
mail.
password = yourPassword
mail.
protocol = smtps

Let’s see an integrational test for this:

public class SimpleMailSenderTest extends AbstractDependencyInjectionSpringContextTests {
  
protected MailSender mailSender ;
  
public SimpleMailSenderTest () {
    setPopulateProtectedVariables
( true );
  
}
  @
Override
  
protected String [] getConfigLocations () {
    
return new String [] { ”applicationContext. xml ” };
  
}
  
public void testSendEmail () throws Exception {
    SimpleMailMessage simpleMessage =
new SimpleMailMessage ();
    simpleMessage.
setFrom ( ”fromEmail” );
    simpleMessage.
setTo ( ”toEmail” );
    simpleMessage.
setText ( ”Testing text” );
    simpleMessage.
setSubject ( ”Testing subject” );
    mailSender.
send ( simpleMessage );
  
}
}

In case we have a template for sending these emails we could define a template message bean:

<bean
id= "templateMessage" class= "org.springframework.mail.SimpleMailMessage" >
  <property
name= "from" value= "fromAddress" />
  <property
name= "to" value= "toAddress" />
</bean>

Alternatively, we could also specify replyTo, cc, bcc, sentDate, subject and text.