I am looking for a Panel UI option comparable to the AJAX Update Panel or ASP.NET Panel Server controls for MVC but so far I am not getting much results.
I am not interested so much in the AJAX Panels capability to control full page postbacks since that's not an issue in the MVC world, but toward of the ability to contain other objects within another container on the page with scrollbars.
I have used the div tags in effort to simulate this and its a hack at best because I am rendering a object tree structure and sometimes the scrollbars don't seem to detect the need to be present using overflow: scroll; and setting it to always be present does not neccessarily mean that the scrollbars will be functional when needed.
Can anyone provide some direction to a web control that would give this functionality for MVC? Preferrably free. :-) I have found nothing in the Telerik suite of controls for MVC for this.
Related
I have looked and found nothing on this subject. It must be a common requirement though. I am assuming that if I could deduce the route to my form then I could call it into a modal via a jquery click action on a class.
I can render a whole page (i.e. with header, footer and navigation) in this fashion - but I just want the actual form part to load in the dialog not the whole page.
I am new to Orchard - though so far impressed aside from this stumbling block.
Because Orchard is an MVC, all content (widgets, or regular pages, etc.) on the page has their views. You can override any of this views by making an Alternate. And it's really simple using Designer Tools.
Hope it helps.
I have been following the GWT MVP tutorial (https://developers.google.com/web-toolkit/articles/mvp-architecture-2) and while it all makes a lot of sense, I have some trouble taking it from the example they explain to a larger scale application.
In particular, I would like to use a DockLayoutPanel to have a separate navigation, content and header section. What I'm struggling with is primarily the question of: where does the main dock panel live? Is it a view with it's own associated presenter? Does it constitute a special case where I don't want to use a view as this is really just the fundamental page layout?
It would be greatly appreciated to get some practical insights from people having faced a similar issue before.
Well I think as always it depends.
But I would recommend to create a View (i.e. MainPageView) with it's own associated Presenter (i.e. MainPagePresenter) even when there is almost no business logic and the View only defines the layout of the application.
Maybe in the future there will be some business logic.
For example if you want to show alerts or notification popups to a user you will probably do this in this View.
So your MainPagePresenter will listen for Notification events on the global EventBus and once an event is fired from any nested Presenter it will display a notification popup in the MainPageView.
Another use case would be if you want to display breadcrumbs in the north panel.
Of course you could create a separate Presenter for breadcrumbs but IMHO that's too much overengineering. You could however easily do that in the MainPagePresenter
I am using GWTP as my MVP framework and there it is really trivial to create View/Presenter pairs and it also supports nested PresenterWidgets which you can for example embed in any panel of your DockLayoutPanel
After searching for something related, I stumbled across another thread that asks a similar question and was quite insightful for me:
GWT MVP - maintaining multiple displays that are separate of one another
I am currently trying to replicate the functionality of the Sticky application (fourth example under "samples") in my GWT application, specifically NoteView (see the class NoteView in SurfaceView.java in my personal repo or download Google App Engine's SDK, where you'll find it in appengine-java-sdk-1.5.1/demos/sticky).
However, as hard as I try, I just cannot find the place where Google put in the gripper bars on the bottom right hand corner of every note, and where their code allowed the user to resize the note. grepping for "resize" and "resizable" in their sticky dir was not fruitful, and the CSS "resize" functionality was not used either. Also, GWT Textareas are not automatically resizable in the way that these notes in GWT are, and I don't know how to enable this or set it up.
I'm sorry but it really just is a textarea, and your browser does the rest (most browsers make textareas resizable nowadays).
Using Firebug or a similar developer tool, can you tell which differences are there between the Sticky sample and what your code does?
I figured it out -- it was old crud css left over from a gxt implementation. As soon as I removed the css file, the textarea automatically had gripper bars.
I'm fighting to understand the weird behavior of GWT Layout Panels. I'm wondering how GWT translate Layout logic into javascript and html. sometimes we don't get the expected Layout . something under the cover is done by GWT compiler.
the GWT documentation is not clear enough on how Layout is performed under the cover.
is there some good books or tutorials that explains well the GWT Layout issues?
thanks.
I don't know about good books or tutorials but here's a little information that may be helpful.
First, as you may know there's a big difference between the FooPanels and the FooLayoutPanels. These are two different sets of panels that are based on different layout mechanisms. The Layout Panels are the new stuff that seems to be suited better for layouts that have hard-coded sizes, Google Wave style. The older FooPanels (VerticalPanel, etc.) are based on HTML tables mostly.
FlowPanel - this is simply something that outputs your widgets as successive HTML elements in a single DIV. As documented: "A panel that formats its child widgets using the default HTML layout behavior".
DockLayoutPanel - Looking at the code shows that it hard-codes the sizes of the different regions according to what you specify in the children (north, east, etc.)
Finally - my experience has led me to abandon all usage of the Layout Panel system and rely only on HTML and CSS wherever I can. This means using HTMLPanel + UiBinder mostly and sometimes FlowPanel, rarely also some of the other panels.
Trying to understand and battle the Layout Panel system to do things that are not the "default case" was a waste of time. I'm not saying it's the best thing to do, but I just couldn't get the kind of control I wanted without this - especially with regard to elements that should automatically expand vertically. If you haven't already, take note of this from the GWT documentation about Layout Panels:
The panels described above are best used for defining your application's outer structure — that is, the parts that are the least "document-like". You should continue to use basic widgets and HTML structure for those parts for which the HTML/CSS layout algorithm works well. In particular, consider using UiBinder templates to directly use HTML wherever that makes sense.
I have a project in which I need a way to display essentially a list of tabs, each with their own content pages, down the left side of the page. I'm using TabLayoutPanels elsewhere to good effect, but after looking at how they are constructed it seems like it would be quite a bit of work to undo Google's carefully constructed layout and get it to work in any other orientation than top-aligned.
This doesn't seem like it would be an uncommon layout, so does anyone know of a successful implementation of this kind of container?
Best you can do is use DeckPanel, and make your custom tab controls to switch visible widget in that DeckPanel.