Daily Archives

Articles indexed Thursday April 8 2010

Page 26/125 | < Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >

  • ASP.NET MVC: what mechanic returns ViewModel objects?

    - by Dr. Zim
    As I understand it, Domain Models are classes that only describe the data (aggregate roots). They are POCOs and do not reference outside libraries (nothing special). View models on the other hand are classes that contain domain model objects as well as all the interface specific objects like SelectList. A ViewModel includes using System.Web.Mvc;. A repository pulls data out of a database and feeds them to us through domain model objects. What mechanic or device creates the view model objects, populating them from a database? Would it be a factory that has database access? Would you bleed the view specific classes like System.Web.Mvc in to the Repository? Something else? For example, if you have a drop down list of cities, you would reference a SelectList object in the root of your View Model object, right next to your DomainModel reference: public class CustomerForm { public CustomerAddress address {get;set;} public SelectList cities {get;set;} } The cities should come from a database and be in the form of a select list object. The hope is that you don't create a special Repository method to extract out just the distinct cities, then create a redundant second SelectList object only so you have the right data types.

    Read the article

  • Struts ActionError

    - by user287663
    Hi all. Anyone knows why the code below doesn't compile? The reason is that it could not find symbol for ActionError. Thanks in advance. package com.hbs; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.Action; import org.apache.struts.action.ActionError; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionForward; import org.apache.struts.util.MessageResources; import org.apache.commons.beanutils.PropertyUtils; public class FeedbackAction extends org.apache.struts.action.Action { private final static String SUCCESS = "success"; public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ActionErrors errors = new ActionErrors(); String fullName = (String)PropertyUtils.getSimpleProperty(form, "fullName"); String fullName1 = ""; if(fullName.equals(fullName1)) { errors.add("fullName", new ActionError("error.fullName", fullName)); saveErrors(request,errors); return (new ActionForward(mapping.getInput())); } return mapping.findForward(SUCCESS); } }

    Read the article

  • pluto or jetspeed on google app engine?

    - by Patrick Cornelissen
    I am trying to build something "portlet server"-ish on the google app engine. (as open source) I'd like to use the JSR168/286 standards, but I think that the restrictions of the app engine will make it somewhere between tricky and impossible. Has anyone tried to run jetspeed or an application that uses pluto internally on the google app engine? Based on my current knowledge of portlets and the google app engine I'm anticipating these problems: A war file with portlets is from the deployment standpoint more or less a complete webapp (yes, I know that it doesn't really work without a portal server). The war file may contain it's own web.xml etc. This makes deployment on the app engine rather difficult, because the apps are not visible to each other, so all portlet containing archives need to be included in the war file of the deployed "app engine based portal server". The "portlets" are (at least in liferay) started as permanent servlet processes, based on their portlet.xmls and web.xmls which is located in the same spot for every portlet archive that is loaded. I think this may be problematic in the app engine, because everything is in one big "web app", so it may be tricky to access the portlet.xmls from each archive. This prevents a 100% compatibility in my opinion. Is here anyone who has any experience with the combination of portlets and the app engine? Do you think it's feasible to modify jetspeed, pluto or any other portlet container to be able to run it on the app engine?

    Read the article

  • delivery mechanism, Rational ClearCase

    - by kadaba
    Hi All, We came up with a stream structure for the Rational ClearCase UCM model. We recently migrated the code base into the new setup. We had three different code bases, i.e. three physical code bases. The way migration was done in this way. we moved the production code first, created a baseline. Then the uat code and created a baseline and then the development code and created a baseline. As of now the integration stream has the latest baseline that is the development baseline. Now we have other two streams for the prd and the uat from which the release will be done in the respective environments. I have my dev stream now. I create an activity and make some changes. now I need to promote these changes into the uat environment. If I deliver the changes to the integration stream, merge is done but on a development basline. I do not want to rebase it to uat as many development apps wil get rebased into the uat which is not desired. How do I achieve promoting changes to the uat environment(uat stream). kindly advice.

    Read the article

  • Extjs internet explorer object not found problem.

    - by john misoskian
    hi; this code run firefox , but error on ie why ? please help me. xxx.js code: var gridFormf = new Ext.FormPanel({ id: 'company-form', frame: true, labelAlign: 'left', title: 'Is Emri', bodyStyle:'padding:5px', width: 1, tbar: [ newIsEmri,delIsEmri,edIsEmri,rapIsEmri,serIsEmri ], layout: 'column', // Specifies that the items will now be arranged in columns items: [ { columnWidth: 0.3, layout: 'fit', items: [{ columnWidth: 1, xtype: 'fieldset', labelWidth: 90, title:'Ekip / Servis', defaults: {width: 120, border:false}, // Default config options for child items defaultType: 'textfield', autoHeight: true, bodyStyle: Ext.isIE ? 'padding:0 0 5px 15px;' : 'padding:10px 15px;', border: true, style: { "margin-left": "10px", // when you add custom margin in IE 6... "margin-right": Ext.isIE6 ? (Ext.isStrict ? "-10px" : "-13px") : "0" // you have to adjust for it somewhere else }, items: [{ fieldLabel: 'Ekip / Personel', name: 'SERVIS_VEREN' }] },{ columnWidth: 1, xtype: 'fieldset', labelWidth: 90, title:'Ürün', defaults: {width: 120, border:false}, // Default config options for child items defaultType: 'textfield', autoHeight: true, bodyStyle: Ext.isIE ? 'padding:0 0 5px 15px;' : 'padding:10px 15px;', border: true, style: { "margin-left": "10px", // when you add custom margin in IE 6... "margin-right": Ext.isIE6 ? (Ext.isStrict ? "-10px" : "-13px") : "0" // you have to adjust for it somewhere else }, items: [{ fieldLabel: 'Cihaz', name: 'URUN_CIHAZ_ADI' }, { fieldLabel: 'Marka', name: 'URUN_MARKA_ADI' }, { fieldLabel: 'Model', name: 'URUN_MODEL_ADI' },{ fieldLabel: 'Seri No', name: 'URUN_SERI_NO' } ] }] },{ columnWidth: 0.3, layout: 'fit', items: [{ columnWidth: 1, xtype: 'fieldset', labelWidth: 90, title: 'Servis Gelis Türü', defaults: { width: 140, border: false }, // Default config options for child items defaultType: 'textfield', autoHeight: true, bodyStyle: Ext.isIE ? 'padding:0 0 5px 15px;' : 'padding:10px 15px;', border: true, style: { "margin-left": "10px", // when you add custom margin in IE 6... "margin-right": Ext.isIE6 ? (Ext.isStrict ? "-10px" : "-13px") : "0" // you have to adjust for it somewhere else }, items: [{ fieldLabel: 'Gelis Türü', name: 'SERVIS_GELIS_TURU' }] },RadioPanels ] },{ columnWidth: 0.3, layout: 'fit', items: [{ columnWidth:1, autoHeight: true, border: true, items: [gridAksesuar] },gridAriza,{ columnWidth: 1, xtype: 'textarea', labelWidth: 0, width:250, defaultType: 'textarea', autoHeight: true, border: false, name:'ARIZA_ACIKLAMASI' }] },{ columnWidth: 1.0, layout: 'fit', items: gridFormx }] }); My html code : <script src="/ApplicationJs/xxx.js" type="text/javascript"></script> <script type="text/javascript"> Ext.onReady(function() { var viewport = new Ext.Viewport({ layout:'fit', items: [gridFormf] }); </script> Internet explorer return to error. Error description is object gridFormf is not found.

    Read the article

  • Tabular (X)HTML forms

    - by detly
    I have a set of items that can be in various states. I want to allow a user to use an (X)HTML form to change the state, and easily view the state of a group of objects ...so to this end, I'd like a layout like: | item1 | radio button for state 1 | radio for state 2 | ... | [update button] | | item2 | radio button for state 1 | radio for state 2 | ... | [update button] | etc. I prefer the radio buttons to list boxes so that it's easy for a user to visually scan for things in a certain state. It seemed like perfectly tabular data to me. The only problem is, you can't have forms inside a table that cross table cells (ie. <tr> <form> <td> ... is invalid). I thought, "hey, I could have one giant form wrapping a table, and make the [update button] value contain the IDs for each row!" Turns out certain versions of IE send ALL THE SUBMIT BUTTON VALUES on any single form. So I thought perhaps to to lay it out with <div>s and place the forms inside a single <td>. But then they break a line on each <div>. So I fixed their width and made them float: left. But then they wrap inside the table cells if the table row is wider than the page, and the radio controls don't line up with the headings. Is it possible to lay this out as I intend? The XHTML below shows the intended structure. Observe what happens if you resize the browser window below the width of the table (ideally, the name would break or the table would show a scroll bar). <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head><title>Test</title> <style type="text/css"> .state-select, .thing-state-name, .update { float: left; width: 8em; } .state-select { text-align: center; } </style> </head> <body> <table> <thead> <tr> <th class="thing-name-header">Thing</th> <th> <div class="thing-state-name">Present</div> <div class="thing-state-name">Absent</div> <div class="thing-state-name">Haven't looked</div> </th> </tr> </thead> <tbody> <tr> <td>Apple</td> <td> <form action="something" method="post"> <input type="hidden" name="id" value="1" /> <div class="state-select"><input type="radio" name="presence" value="present" checked="checked" /></div> <div class="state-select"><input type="radio" name="presence" value="absent" /></div> <div class="state-select"><input type="radio" name="presence" value="unknown" /></div> <div class="update"><input type="submit" value="Update" /></div> </form> </td></tr> <tr> <td>Orange</td> <td> <form action="something" method="post"> <input type="hidden" name="id" value="2" /> <div class="state-select"><input type="radio" name="presence" value="present" /></div> <div class="state-select"><input type="radio" name="presence" value="absent" checked="checked" /></div> <div class="state-select"><input type="radio" name="presence" value="unknown" /></div> <div class="update"><input type="submit" value="Update" /></div> </form> </td></tr> <tr> <td>David Bowie</td> <td> <form action="something" method="post"> <input type="hidden" name="id" value="3" /> <div class="state-select"><input type="radio" name="presence" value="present" /></div> <div class="state-select"><input type="radio" name="presence" value="absent" /></div> <div class="state-select"><input type="radio" name="presence" value="unknown" checked="checked" /></div> <div class="update"><input type="submit" value="Update" /></div> </form> </td></tr> </tbody> </table> </body> </html>

    Read the article

  • Articles on TFS Build Server / MSBuild

    - by MartinWatts
    I have decided to write some articles on using a TFS Build Server. During the past few years I have had the responsibility and challange of keeping one running, and I found out that on some subjects, there is very little to find on the internet. So hopefully my experiences can help others. That is, before VS 2010 build server makes everything we have learnt on MSBuild so far redundant. ;) The first article is about selectively getting the sources you need to get the build done. You can find the article here.

    Read the article

  • Windows Proxy Server advice

    - by Scott
    I have a webserver that currently has about 10 IP addresses. I have various clients that require a proxy server to route their internal traffic through. The load is not that great, so I'd like to have this ONE server act as a proxy server for 10 different clients, each client having their own unique IP on the server. The hardware is already setup, but I'm wondering what software solutions you guys recommend? I've looked at WinGate, Squid-Proxy, etc...but am pretty green with this. Maybe there's even a way to have Windows do this natively? I'm running Windows Server 2008, 32 bit.

    Read the article

  • Run CGI in IIS 7 to work with GET without Requiring POST Request

    - by Mohamed Meligy
    I'm trying to migrate an old CGI application from an existing Windows 2003 server (IIS 6.0) where it works just fine to a new Windows 2008 server with IIS 7.0 where we're getting the following problem: After setting up the module handler and everything, I find that I can only access the CGI application (rdbweb.exe) file if I'm calling it via POST request (form submit from another page). If I just try to type in the URL of the file (issuing a GET request) I get the following error: HTTP Error 502.2 - Bad Gateway The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are "Exception EInOutError in module rdbweb.exe at 00039B44. I/O error 6. ". This is a very old application for one of our clients. When we tried to call the vendor they said we need to pay ~ $3000 annual support fee in order to start the talk about it. Of course I'm trying to avoid that! Note that: If we create a normal HTML form that submits to "rdbweb.exe", we get the CGI working normally. We can't use this as workaround though because some pages in the application link to "rdbweb.exe" with normal link not form submit. If we run "rdbweb.exe". from a Console (Command Prompt) Window not IIS, we get the normal HTML we'd typically expect, no problem. We have tried the following: Ensuring the CGI module mapped to "rdbweb.exe".in IIS has all permissions (read, write, execute) enabled and also all verbs are allowed not just specific ones, also tried allowing GET, POST explicitely. Ensuring the application bool has "enable 32 bit applications" set to true. Ensuring the website runs with an account that has full permissions on the "rdbweb.exe".file and whole website (although we know it "read", "execute" should be enough). Ensuring the machine wide IIS setting for "ISAPI and CGI Restrictions" has the full path to "rdbweb.exe".allowed. Making sure we have the latest Windows Updates (for IIS6 we found knowledge base articles stating bugs that require hot fixes for IIS6, but nothing similar was found for IIS7). Changing the module from CGI to Fast CGI, not working also Now the only remaining possibility we have instigated is the following Microsoft Knowledge Base article:http://support.microsoft.com/kb/145661 - Which is about: CGI Error: The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: the article suggests the following solution: Modify the source code for the CGI application header output. The following is an example of a correct header: print "HTTP/1.0 200 OK\n"; print "Content-Type: text/html\n\n\n"; Unfortunately we do not have the source to try this out, and I'm not sure anyway whether this is the issue we're having. Can you help me with this problem? Is there a way to make the application work without requiring POST request? Note that on the old IIS6 server the application is working just fine, and I could not find any special IIS configuration that I may want to try its equivalent on IIS7.

    Read the article

  • HELP! Free space not reclaimed after online resizing ext4 in Ubuntu 9.10

    - by TiansHUo
    My root partition was filling up, with only 500 mbs left, I wanted to resize my root partition from 20 Gb to 40Gb So I resized my partition by using these steps: Using Gparted to resize another partition to give space for the EXT4 Using fdisk, deleting the root partition (on /dev/sda2), and creating it again using the new size resize2fs /dev/sda2 Updating grub2 But now the problem is that although I can boot in my new partition and the new partition shows it is 40Gb, but the free size was still 500mb. So I booted from a LiveCD and checked with e2fsck -p /dev/sda2, it reported clean. So I added the -f flag (force check), still, the drive is full.

    Read the article

  • Can't find generic USB audio driver for a Samson COU1 USB microphone

    - by marcipollo
    I am unable to use a Samson USB CO1U microphone on a PC running XP, SP3. When I plug it into the USB port, Windows generates the sound indicating that it has found new hardware, and the green LED on the mic lights. But, it does not work, and the device manager reports that it cannot find a driver after searching. The same mic works on a Vista machine. Samson has no driver on their Web site, and insists that the generic audio driver in Windows should work. (http://www.samsontech.com/PRODUCTS/productpage.cfm?prodID=1810). I cannot find a generic USB audio driver at Microsoft.com. Can anyone help? Larry

    Read the article

  • SQL Server 2008 Spatial Index Performance

    The institution I work with has decided to migrate their database system to SQL Server 2008. One of the applications uses geospatial data, which consists of millions of rows. I understand that their are indexes that can be used for geospatial data, but have not worked with them. What's the scoop on them?

    Read the article

  • How to initialize an unsigned long long type?

    - by Sujay
    Hello all, I'm trying to initialize an unsigned long long int type. But the compiler is throwing an error "error: integer constant is too large for "long" type ". The initialization is shown below : unsigned long long temp = 1298307964911120440; Can anybody please let me know what the problem is and suggest a solution for the same. With Regards Sujay

    Read the article

  • {PHP} Fatal error: Using $this when not in object context (Joomla)

    - by Asher
    Hi all, i don't really know php and have hit a brick wall. The problem is that my site is showing the following error... Fatal error: Using $this when not in object context in /hermes/web07/b2350/pow.thefoodie/htdocs/index.php on line 11 This is the begining of my index.php file... // no direct access define( 'YOURBASEPATH', dirname(FILE) ); ? language; ?" lang="language; ?" main_body ul li { behavior: url(baseurl; ?/templates/template ?/css/iepngfix.htc) } baseurl; ?/templates/template ?/js/pngfix.js" baseurl; ?/templates/template ?/css/template_css.css" rel="stylesheet" type="text/css" media="all" / baseurl; ?/templates/template ?/js/fx_styles.js" baseurl; ?/templates/template ?/js/accordion.js" // *************************** // // Template Parameters // // *************************** $h1 = $this-params-get("logo"); $linked_h1 = ($this-params-get("logoLinked", 1) == 0)?"false":"true"; $h1_title = $this-params-get("logoTitle"); $h2_motto = $this-params-get("logoMotto"); // Please do NOT change this unless you know what you doing. $template_path = $this-baseurl.'/templates/'.$this-template; // template path $default_font = "default"; // **************************** ? Any help would be great as i am completely lost.

    Read the article

  • Objective-C - open SMS

    - by teepusink
    Hi, How do I open SMS from my app and have the new message popped up and prepopulated? Right now this is what I have NSString *stringURL = @"sms:"; NSURL *url = [NSURL URLWithString:stringURL]; [[UIApplication sharedApplication] openURL:url]; That opens the SMS app but you have to click on new message etc. Thanks, Tee

    Read the article

  • Resizing and rotating an image in Android

    - by kingrichard2005
    I'm trying to rotate and resize an image in Android. The code I have is as follows, (taken from this tutorial): Bitmap originalSprite = BitmapFactory.decodeResource(getResources(), R.drawable.android); int orgHeight = a.getHeight(); int orgWidth = a.getWidth(); //Create manipulation matrix Matrix m = new Matrix(); // resize the bit map m.postScale(.25f, .25f); // rotate the Bitmap by the given angle m.postRotate(180); //Rotated bitmap Bitmap rotatedBitmap = Bitmap.createBitmap(originalSprite, 0, 0, orgWidth, orgHeight, m, true); return rotatedBitmap; The image seems to rotate just fine, but it doesn't scale like I expect it to. I've tried different values, but the image only gets more pixelized as I reduce the scale values, but remains that same size visually; whereas the goal I'm trying to achieve is to actually shrink it visually. I'm not sure what to do at this point, any help is appreciated.

    Read the article

  • Why Automatically implemented properties must define both get and set accessors.

    - by Nasser Hajloo
    When we define a property like public string Name {get; set;} dot net can make our properties code. but when we use public string Name {get;} public string Name {set;} we face with 'Hajloo.SomeThing.PropertyName.set' must declare a body because it is not marked abstract or extern. Automatically implemented properties must define both get and set accessors. Actualy whay compiler can't determine the property and make code automatically ? what's happen ?

    Read the article

< Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >