mvc

Pass PHP processing to another page

Think of it as a poor mans template system. I want to store my values into a data array and then continue processing the view on another page. What PHP command would I use to accommodate this? ...

Getting data from multiple tables when using the Zend framework?

Is there a best practice in getting data from multiple database tables using Zend? I would like to know rather than end up wanting to refactor the code I write in the near future. I was reading the Zend documentation and it said that: "You can not specify columns from a JOINed tabled to be returned in a row/rowset. Doing so will...

If I had my own user system, what might be a solution for forums?

I was thinking of building my own MVC system with a member system. However, I will need forums and I thought maybe I will just use the forums as registration and let that handle the members, but is there a better solution to wanting both an MVC system and forums? ...

Disable Model Validation in Asp.Net MVC

Hello, How do I disable Model validation for a single Action in a Controller ? Or can I do it per model by registering the model type at startup somewhere ? I want the ModelBinder to bind to the model, but afterwards it should not perform the model validation. The reason why i dont want validation to happen is because i am trying to m...

help with basic pdf generation in asp.net mvc

I have trying to generate simple pdfs from my app so that I can later move on to generating pdf with dynamic data... anyways. here's what i got.. the file is being generated but I want a way to also have the browser prompt the download of the file... (I actually dont even want to store the pdf file in my server but Im not sure how to get...

Spring MVC - How to map individual methods in a controller without anotation use

Hi, I am very new to Spring framework in general. How can I map individual methods in a controller, so that I can call any other method other than handleRequestInternal for example. Also I do not want to use annotation (@RequestMapping). Thank you manu ...

Where do I put formatting logic?

I have several classes with raw data, for example: public interface Transaction { public double getAmount(); public Date getDate(); } I need to output formatted versions of this data in several places. For example, I might display the amount as $1,000 on a web page, or 1000.00 on an Excel download. I also want to be able to reus...

How to build a multi-tenant CMS with templating

I'm tasked with building a multi-tenant cms site that allows templating, all in asp.net mvc. Any thoughts on how best to approach this? ...

GUI Best Practice: When designing a webbased management interface, it is best to use a detail view or to use forms with values as primary view?

To clarify the question, imagine having a paginated list with clients. When clicked on a specific client the system will open the 'view client x' view in order to show the client details. Now, will this view be a 'simple' list which displays client details? Or will this view be a form with input fields showing the client details and a...

How can I make Telerik TabStrip tabs persist between page requests?

Hi, in Telerik ASP.NET MVC TabStrip, I want the page to remember which tab was selected last and persist the selection through multiple page requests. What I have is a partial view that shows in multiple pages and it contains the TabStrip. With SelectedIndex the set tab always get selected, which nullifies user's selection. ...

MVC2 issues when edit an item on an textboxfor

Hello, i have this model on mvc: public class User { public string Name { get; set; } public IList<string>RelatedTags { get; set; } } And the following typed view (user) to edit an add a user (AddEdit.aspx view): <div> <%: Html.LabelFor(e => e.Name)%> <%: Html.TextBoxFor(e => e....

How to update target with Ajax.Actionlink

I am trying to learn how Ajax is working. I want to update a using a Ajax.ActionLink, but I dont manage it to work, please help... Everything else works in this code(I Delete the comment...). Here is the code: <div id="test"> <% foreach (var comment in Model.Comments) { %> <p> <b> ...

How to embed a HTMLHELP in a View of an VC8 MFC application???

Hi there, I have built a SDI splitted window app (VC8- MFC). In the bottom pane of the splitted window I want to display a .CHM file (HTML HELP file). Any expert knows how to do that? Using the call: *::HtmlHelp( m_hWnd, _T( "Sample.chm" ), HH_DISPLAY_TOPIC, NULL );* will just pop up a new window....but I wnat to embed the HTML help...

Quick Spring MVC question: If I don't return a model, how come I can still render a view via the response?

I can use: return new ModelAndView(viewName, model); Or I use: response.setContentType("text/plain"); response.getWriter().print("Hello World!"); Now where's the difference n design, other that I dont need a JSP in the second solution. But I could also output a flestream right? Maybe I just need a little bit more understanding. Ho...

MVC : Controller responsabilities

I have some doubts regarding the following controller action (in ASP.NET MVC, but it's a more generic question ) : public ActionResult DoSomething( int id, IUser currentUser ) { var myDomainObject = businessService.GetDomainObjectById( id ); if( !securityService.CurrentUserCanAcess( currentUser, myDomainObject ) ) { ...

What is the best (designwise) way to pass an NSArray of model objects to a view object?

I have a BankAccount model class that contains data like account number, bank name, transactions, etc. The transactions are each instances of the Transaction class and contained in the transactions NSArray. I also have a BankAccountView that displays all this in a single view. Right now I'm passing all the data as separate variables (ie...

How to reference the instantiating class

Currently I have my controller instantiating a model class. Every time I create this class I need to set the logged in user's info in the model. I feel like there is a more elegant way of doing this, but I'm not sure how to do it :-( Here is an example of the code: $leadModel = new Application_Model_DbTable_Leads; $leadModel->user = ...

Custom Validator Attribute exception in DataAnnotations

Has anyone seen this exception before? Google or Bing has absolutely very few results. IsValid(object value) has not been implemented by this class. The preferred entry point is GetValidationResult() and classes should override IsValid(object value, ValidationContext context). Here's the custom validator: public class PriceAttrib...

ASP.NET MVC passing Data from Controller Action to a second controller for output

So basically I have a form with browser filters for data I'm displaying. I was hoping I could simply perform a post to my "SearchPost" controller, which handles all of the incoming filters and then spits out a Jquery grid for output, but unfortunately I haven't been able to find a free Jquery grid view that works. That said, I'm still ...

How can I add an AddToFavorites link to a details page in ASP.NET MVC?

I have a details view with a sidebar and I would like to allow the user to add the current details to their favorites. I'm current using the following javascript, but I don't know how to pass the details id to the javascript to generate the link to be added to the users favorites. My javascript - This doesn't work of course... <script ...