I basically want to replicate this on the blackberry - http://img641.imageshack.us/img641/4628/tempi.jpg
Is there a simple way of doing it instead of messing around with the graphics object of ListView?
Thanks,
Teja
Take a look at the "Displaying a List of Complex Records" (zip file) sample from the Blackberry Development Labs page.
It teaches you how to implement a class called TableListField, and includes a completed source file that you can use. The TableListField basically lets you place multiple items in a row of a ListField and select the whole row.
If you don't want to implement your own ListFieldCallback implementation the only other "pre-built" implementation is the ObjectListField class - but you'd be limited to a list of strings and it looks like you want a lot more control over the UI including fixed-width columns with multiple pieces of data, image, etc.
So basically - the only way to render a custom UI such as the one you want is by implementing your own ListFieldCallback including the drawListRow() method.
Related
I was wondering if there was a way, to show certain parts of my footer, only when in certain categories.
E.g. a email link (mailto) only when in the Category:FAQ
I am using a custom Skin.
With help of this snippet a CSS class is added to your body tag for every category the current page belongs to. You could then display or hide certain elements with help of the corresponding class.
If you are using your own, custom skin, you can just check what categories your current wikipage belongs to, by calling
OutputPage::getCategories(). This will probably affect caching, though.
if (in_array( 'FAQ', $out->getCategories() ) {
// do something
}
edit: #Florian points out below, that you should use OutputPage methods to output stuff, rather than echoing them, so I removed that unfortunate example. And as #Florian also points out, if you want this effect to persist also for users who might have selected another skin than your custom one, you'll have to use a hook, e.g.SkinTemplateOutputPageBeforeExec.
I have requirement like this.I can drag and drop my one Order list to another.
and Save also into Data base.
Again when reload same format will be display.
I want to store Parameter like
DocumentCategory,
DocumentName,
Ordering
any one can give the idea class structure and table structure?
This really depends on the database you're using. However, if you decide to use MySQL, you can use this library that I put together recently to automate the whole process of storing/retrieval of user-defined classes. It also contains support for nested classes. Hope this helps!
I am building an Android app via Xamarin Mono for Android, I recently started using the azure mobile service .
I need guidance regarding the architecture that should be designed for this functionality:
3 Fragments in my app will be using the Mobile service database, all of them using the same table Item:
Fragment A - List Fragment - querying Item and populate the list with the result.
Fragment B - List Fragment - querying Item and populate the list with the result (with different ListItem layout than Fragment A list).
Fragment C - Fragment - Insert an item to Item table.
I currently have a Adapter class implementing BaseAdapter that holds the table and queries it and insert to it, and then populates the Fragment A list.
However this way I'm unable to show a different ListItem layout in fragment B as the adapter is already set to a specific layout.
I have tried to find documentation about the design standards when using azure mobile service but with no luck.
I would be glad if someone could refer me to a guide like that, or explain where should the MobileServiceClient, MobileServiceTable etc. should be held and where should the table methods InsertAsync, ToListAsync... should be called.
Thank you
Since you already have a instantiated class that I assume is populated there are a couple different ways of going about this. You could create an abstract base class adapter that contains all your code except for the GetView methods, and then create a specialized class adapter for each view that has the GetView method that applies to that view. When you fire up the fragment just pass it the list items in the constructor.
Alternatively (and I'm not sure how well or not this would work since I have never tried it) would be to keep 1 class, but set a bool to designate if it is View A or view B you want to display. You would need to have the fragment change the flag as appropriate for your particular requirements.
I use MvxActionBasedTableViewSource for my custom binding on common grids.
Func CellCreator is really great and everything works fine with that.
But. What way is it expected to deal with groupped tables?
I need some dynamic binding with them.
So, does that mean that I should implement that logic by my own and CellCreator can not be used for such behaviour anyhow?
Thanks!
MvxActionBasedTableViewSource is designed for simple tables only - so cannot be used for grouping without some changes - e.g. via inheritance or copy and paste.
For a list of available TableViewSources, see What class to inherit from for bound table source
For an example of grouping, see Creating UITable with section using Mono touch and slodge mvvmcross (the code is out of date, but the principles are still the same)
Ok, so this is an alternative to this question.
I'm trying to produce an MVC application using LinqToSql that allows for bulk editing of data on a single page.
Imagine a simple table Item with ItemId, ItemName, ItemPrice as fields.
There are many examples out there of extrmely simple MVC applications that show you a list of these items with an edit button next to each and an add button at the bottom.
From a UI perspective I find this very time consuming when a lot of data needs entering / updating.
I'm after a single page containing the items names and prices in textboxes that can all be edited in one go and then a single "Save" button pressed to update the data.
I've seen a number of examples that perform various stages of this but have yet to find one that implements the full solution. In particular the interaction with Linq.
I have a number of methods I've tried which all work, however, my gut feeling tells me my methods "smell" and therefore I'd like to see some examples of how other people have attempted this.
So, put simply, my question is can anyone provide some links to some examples please?
I have written about how to do this with MvcContrib's FluentHtml. Steve Sanderson has written about how to do it without FluentHtml. Both of our articles have a sample solution you can download and look at.
As far as LinqToSql, I would consider any interaction between bulk editing mechanism (controller and view) and LinqToSql to be a smell. That is to say, as far as possible your UI should be ignorant of your persistence mechanism.
What I would probably do to get around this is use jQuery to call a jsonResult when you switch rows. This jsonResult would call the code in the model to save the ItemId, ItemName, ItemPrice for only the row you are switching off of. More on general jsonResult w/ jQuery usage here : http://www.dev102.com/2008/08/19/jquery-and-the-aspnet-mvc-framework/
The other thing you could do is do model binding to a list of Items, iterating thru the list saving each item -- Phil Haack has an example of list binding here: http://haacked.com/archive/2008/10/23/model-binding-to-a-list.aspx With either method you'll want to do something to signify the row has changed so you're not updating every field if you're just changing a handful of rows.
What is your goal exactly, are you trying to commit a series of information all at once? Or do you simply not want your page to postback every time you change something. In either case jQuery is your best bet. If you want to do everything in one pass it is going to get complex unless you use a jQuery control that will do this for you. There are some great ones out there such as the Flexigrid.