i koe mu e smeshnoto, che neshto chuwstwoto mi za humor se e izparilo?  

Da towa veroqtno e code pisan ot Musala.

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED]]On Behalf Of Tsvetan Alexiev
> Sent: Monday, November 13, 2000 9:58 PM
> To: Jokes
> Subject: [JOKES] Source pisan ot Musala Software (?)
> 
> 
> package com.instill.idx.admin.ui.transferUnit;
> 
> import java.util.ArrayList;
> import java.util.Iterator;
> import javax.servlet.jsp.JspWriter;
> import javax.servlet.ServletRequest;
> import com.instill.idx.admin.objects.*;
> import com.instill.idx.admin.jspcontrolls.*;
> import com.instill.idx.admin.ui.IDXPage;
> import java.util.Enumeration;
> 
> public class EditTransferUnitPage extends IDXPage {
> 
>   public EditTransferUnitPage(JspWriter writer,
> ServletRequest request,HeadControl head, String path,
> boolean isDummy) throws Exception {
>       super(writer, request, head, path, isDummy,
> "EditTransferUnitPage");
>   }
> 
> 
>   protected void initBody() throws java.lang.Exception {
> 
>       body = new BodyContainer(m_out, m_request);
> 
>       LabelControl lcTitle = new LabelControl(m_out,
> "<h2>Update&nbsp;Transfer&nbsp;Unit</h2><br>");
>       body.add(lcTitle);
> 
>       String unitId = m_request.getParameter("unitId");
>    if (unitId == null || unitId.equals(""))
>    throw new Exception("Parameter 'unitId' is obligatory and
> it's not passed");
> 
>       TransferUnit transferUnit = new TransferUnit(unitId);
> 
> 
>       String receivedStatusCode =
> m_request.getParameter("statusList");
>       if (receivedStatusCode == null)
>           receivedStatusCode = transferUnit.getStatus();
> 
> 
>       String receivedOperation =
> m_request.getParameter("Operation");
>       if ( receivedOperation != null &&
> receivedOperation.equals("update") )
>       {
>       JSFunctions js = new JSFunctions(m_out);
>    body.add(js);
> 
>             // here must be set new values
>              TransferUnit updatedTu = new
> TransferUnit(unitId, "0", "", receivedStatusCode.trim(),
> "");
>              // updatedTu.setName(receivedName);
>              //
> updatedTu.setStatus(receivedStatusCode.trim());
> 
>              // force reload
>                 //updatedTu.getStatusTime();
> 
>             if ( !updatedTu.updateTransferUnit())
>             {
>        js.addFunction( "alert('For some reason Transfer Unit
> was not updated');");
>             }
>             else
>             {
>        js.addFunction( "alert('Transfer unit successfully
> updated');");
>          }
> 
>       }
> 
> 
>       TableContainer tc = new TableContainer(m_out);
>       TRContainer tr1 = new TRContainer(m_out);
>       TRContainer tr2 = new TRContainer(m_out);
> 
>       String taskId = transferUnit.getTaskId();
>       Task task = new Task(taskId);
>       Datafeed df = new Datafeed( task.getDatafeedId() );
> 
>       String  orgLocCode = df.getOrganization();
>       String  dfType = df.getDatafeedType();
>       String  taskStatus = task.getTaskStatus();
> 
>       TDContainer td11 = new TDContainer(m_out);
>       LabelControl org1 = new LabelControl(m_out,
> "Organization &nbsp;Code:   ");
>       td11.setWidth("10%");
>       td11.add(org1);
>       TDContainer td12 = new TDContainer(m_out);
>       LabelControl orgVal = new LabelControl(m_out,
> orgLocCode );
>       td12.setWidth("10%");
>       td12.add(orgVal);
>       TDContainer emptyTd = new TDContainer(m_out);
>       emptyTd.setWidth("10%");
>       TDContainer td14 = new TDContainer(m_out);
>       LabelControl lcType = new LabelControl(m_out,
> "Datafeed &nbsp;Type:  ");
>       td14.setWidth("10%");
>       td14.add(lcType);
>       TDContainer td15 = new TDContainer(m_out);
>       LabelControl lcTypeVal = new LabelControl(m_out,
> dfType);
>       td15.setWidth("10%");
>       td15.add(lcTypeVal);
>       TDContainer td16 = new TDContainer(m_out);
>       td16.setNowrap(true);
>       td16.setWidth("100%");
> 
>       tr1.add(td11);
>       tr1.add(td12);
>       tr1.add(emptyTd);
>       tr1.add(td14);
>       tr1.add(td15);
>       tr1.add(td16);
> 
>       TDContainer td21 = new TDContainer(m_out);
>       LabelControl lcStatus = new LabelControl(m_out, "Task
> &nbsp;Status:  ");
>       td21.setWidth("10%");
>       td21.add(lcStatus);
>       TDContainer td22 = new TDContainer(m_out);
>       LabelControl lcVal = new LabelControl(m_out,
> taskStatus);
>       td22.setWidth("10%");
>       td22.add(lcVal);
>       TDContainer lastTd = new TDContainer(m_out);
>       lastTd.setWidth("100%");
>       lastTd.setNowrap(true);
> 
>       tr2.add(td21);
>       tr2.add(td22);
>       tr2.add(emptyTd);
>       tr2.add(emptyTd);
>       tr2.add(emptyTd);
>       tr2.add(lastTd);
> 
>    tc.add(tr1);
>       tc.add(tr2);
>       body.add(tc);
> 
> //    FormContainer fc = new FormContainer(m_out,
> FormContainer.POST_METHOD, FORM_NAME);
>       body.add(fc);
> 
> 
>       HiddenControl hcOper = new
> HiddenControl(m_out,"Operation", "");
>       fc.add(hcOper);
>       HiddenControl hcId = new HiddenControl(m_out,"unitId",
> unitId);
>       fc.add(hcId);
> 
> 
>       TableContainer table = new TableContainer(m_out);
>       table.setWidth("100%");
>       fc.add(table);
> 
>       TRContainer tr = new TRContainer(m_out);
>       table.add(tr);
> 
>       TDContainer td1 = new TDContainer(m_out);
>       td1.setWidth("10%");
>       LabelControl lcName = new LabelControl(m_out, "Name:
> ");
>       td1.add(lcName);
>       tr.add(td1);
> 
>       TDContainer td2 = new TDContainer(m_out);
>       td2.setWidth("10%");
>       LabelControl teName = new LabelControl(m_out,
> transferUnit.getName());
>       td2.add(teName);
>       tr.add(td2);
> 
>       tr.add(emptyTd);
> 
>       TDContainer td4 = new TDContainer(m_out);
>       td4.setWidth("10%");
>       LabelControl leStatus = new LabelControl(m_out,
> "Status: ");
>       td4.add(leStatus);
>       tr.add(td4);
> 
>       ArrayList statuses =
> factory.getTransferUnitStatuses();
>       Iterator iterator = statuses.iterator();
>       String listOfStatuses = "";
>       while (iterator.hasNext()) {
>           ComboHelperClass comboElement = (ComboHelperClass)
> iterator.next();
>           if (iterator.hasNext())
>               listOfStatuses += comboElement.getName()+
> ComboBoxWithId.SEPARATOR + comboElement.getValue() + ",";
>           else
>               listOfStatuses += comboElement.getName()+
> ComboBoxWithId.SEPARATOR + comboElement.getValue();
>       }
> 
>       TDContainer td5 = new TDContainer(m_out);
>       td5.setWidth("10%");
>       ComboBoxWithId sStatus = new ComboBoxWithId(m_out,
> "statusList", listOfStatuses);
>       sStatus.setSelectedValue(receivedStatusCode);
>       td5.add(sStatus);
>       tr.add(td5);
> 
>       tr.add(emptyTd);
> 
>       TDContainer td7 = new TDContainer(m_out);
>       td7.setWidth("10%");
>       LabelControl lcStatusTime = new LabelControl(m_out,
> "Status &nbsp;Time: ");
>       td7.add(lcStatusTime);
>       tr.add(td7);
> 
>       TDContainer td8 = new TDContainer(m_out);
>       td8.setWidth("10%");
>       String statusTime = transferUnit.getStatusTime();
>       LabelControl lcStatusTimeVal = new LabelControl(m_out,
> statusTime);
>       td8.add(lcStatusTimeVal);
>       tr.add(td8);
> 
>       tr.add(emptyTd);
> 
>       TDContainer td9 = new TDContainer(m_out);
>       td9.setWidth("10%");
>       String href = JSFunctions.GetParameterString(fc,
> hcOper.getName(), "update", true);
>       href += JSFunctions.GetSubmit(fc, false);
>       ImageButtonControl ibUpdate = new
> ImageButtonControl(m_out,href, "SetButton.gif");
>       td9.add(ibUpdate);
>       tr.add(td9);
> 
>       ArrayList purchaseOrders =
> transferUnit.getPurchaseOrders();
>       EditTransferUnitTable tuTable = new
> EditTransferUnitTable(m_out, m_request, purchaseOrders, fc,
> null);
>    tuTable.setLinesPerPage((new
> Integer(linesPerPage)).intValue());
>       fc.add(tuTable);
> 
>       TableContainer buttonTable = new
> TableContainer(m_out);
>       buttonTable.setWidth("100%");
>       body.add(buttonTable);
>       TRContainer buttonTr = new TRContainer(m_out);
>       buttonTable.add(buttonTr);
> 
>       TDContainer buttonTd = new TDContainer(m_out);
>       buttonTd.setWidth("20%");
>       String backHref = JSFunctions.GetActionString(fc,
> "transferUnit.jsp", true);
>       backHref += JSFunctions.GetSubmit(fc, false);
>       ImageButtonControl backButton = new
> ImageButtonControl(m_out, backHref, "BackButton.gif");
>       buttonTd.add(backButton);
>       buttonTr.add(buttonTd);
> 
>       buttonTd = new TDContainer(m_out);
>       buttonTd.setWidth("100%");
>       buttonTd.setNowrap(true);
>       buttonTr.add(buttonTd);
> 
>   // needed for  back button to TransferUnitPage
> /*
>   String po = m_request.getParameter("po");
>   if (po == null || po.equals(""))
>    throw new Exception("parameter 'po' is obligatory and it
> is not passed");
>     HiddenControl hc = new HiddenControl(m_out, "po", po);
>   fc.add(hc);
> */
> 
>   String str = m_request.getParameter("id");
>   if (str == null || str.equals(""))
>    throw new Exception("parameter 'id' is obligatory and it
> is not passed");
>   HiddenControl hc = new HiddenControl(m_out, "id", str);
>   fc.add(hc);
> 
>   HiddenControl hcp = new HiddenControl(m_out, "parentPage",
> m_request.getParameter("parentPage"));
>   fc.add(hcp);
> /*
>   str = m_request.getParameter("parentId");
>   if (str == null || str.equals(""))
>    throw new Exception("Parameter 'parentId' is obligatory
> when parent is DatafeedTaskPage and it's not passed");
>   hc = new HiddenControl(m_out, "parentId", str);
>   fc.add(hc);
> 
>         String po = "0";
>   if (po.equals("1") )
>   {
>    hc = new HiddenControl(m_out, "Distributor",
> m_request.getParameter("Distributor"));
>    fc.add(hc);
> 
>    hc = new HiddenControl(m_out, "tfPoNumber",
> m_request.getParameter("tfPoNumber"));
>    fc.add(hc);
> 
>    hc = new HiddenControl(m_out, "tfPoStatus",
> m_request.getParameter("tfPoStatus"));
>    fc.add(hc);
> 
>    hc = new HiddenControl(m_out, "tfSubmittedDate",
> m_request.getParameter("tfSubmittedDate"));
>    fc.add(hc);
> 
>    hc = new HiddenControl(m_out, "tfScheduledDate",
> m_request.getParameter("tfScheduledDate"));
>    fc.add(hc);
> 
> //   hc = new HiddenControl(m_out, "po",
> m_request.getParameter("po"));
> //   fc.add(hc);
> 
>    if ( m_request.getParameter("Account") != null)
>    {
>     hc = new HiddenControl(m_out, "Account",
> m_request.getParameter("Account"));
>     fc.add(hc);
>    }
>   }
>  */
>    }
> }
> 
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> =-=-=-=-=
> * To unsubscribe from this list, send e-mail to 
> [EMAIL PROTECTED]
> without subject and with message body "unsubscribe jokes [EMAIL PROTECTED]"
> (without quotes)
> * To subscribe to this list, send e-mail to [EMAIL PROTECTED]
> without subject and with message body "subscribe jokes [EMAIL PROTECTED]"
> (without quotes)
> * Mails to this list should be sent to [EMAIL PROTECTED]
> * If you experience any problems contact [EMAIL PROTECTED]
> * Archives available at [EMAIL PROTECTED]
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> =-=-=-=-=
> 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
* To unsubscribe from this list, send e-mail to [EMAIL PROTECTED]
without subject and with message body "unsubscribe jokes [EMAIL PROTECTED]"
(without quotes)
* To subscribe to this list, send e-mail to [EMAIL PROTECTED]
without subject and with message body "subscribe jokes [EMAIL PROTECTED]"
(without quotes)
* Mails to this list should be sent to [EMAIL PROTECTED]
* If you experience any problems contact [EMAIL PROTECTED]
* Archives available at [EMAIL PROTECTED]
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Одговори путем е-поште