Search Results

Search found 22153 results on 887 pages for 'view'.

Page 10/887 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • MVC 2 View Layout CSS Control Layout

    - by Cory Mathewson
    I'm new to a lot of what I'm trying to do with the development of a new MVC2 web application so this is a beginner question. I need to understand my options for control and content layout on a web page. I’m using MVC2 so I’m using Controllers, Views, ViewModels, and View Templates. What I need to spin up on…fast…is control the granular layout of controls and content on any particular view. Below I’ve pasted two examples of auto generated templates that illustrate my challenge. I see that layout is controlled by CSS in my Site.css document. In the first example I get a sequential flow of DisplayLabel and DisplayField. I prefer the adjacent layout of DisplayLabel on the same line as DisplayField produced from example 2. However, example 2 is too simple because the formatting is applied to the Label and the Field. I think the correct way to tackle this learning curve is Microsoft Expression but I don’t have personal bandwidth at the moment to tackle Expression. Can anyone point me to a resource that will expose me to lots of examples for CSS formatting? I have lots of syntax questions. For instance, I believe is referencing the Site.css but I can’t find a "display-label" section in Site.css. Example 1 <fieldset> <legend>Fields</legend> <div class="display-label">DocTitle</div> <div class="display-field"><%: Model.DocTitle %></div> <div class="display-label">DocoumentPropertiesID</div> <div class="display-field"><%: Model.DocumentPropertiesID %></div> Example 2 <h2>Title: <%: Model.DocTitle %></h2> <h2>Created: <%: Model.Created %></h2> <h2>Modified: <%: Model.Modified %></h2> <h2>Author: <%: Model.tbl_Author.Name %></h2> <h2>Genre: <%: Model.tbl_DocumentGenre.GenreName %></h2>

    Read the article

  • Display a view using modalPresentationStyle

    - by happyCoding25
    Hello, I have heard that you can make a view popup like in the Mail app for iPad by using modalPresentationStyle. Im having a hard time figuring out how to use it though. I looked a this post here and still couldn't figure out how to do this task. If anyone could explain how to hook up the controllers to make this code work that would be great. Thanks

    Read the article

  • Why do I get a null pointer exception from TabWidget?

    - by rushinge
    I'm writing an android program in which I have an activity that uses tabs. The Activity public class UnitActivity extends TabActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TabHost tabHost = getTabHost(); TabSpec spec; Resources res = getResources(); LayoutInflater.from(this).inflate(R.layout.unit_view, tabHost.getTabContentView(), true); spec = tabHost.newTabSpec("controls"); spec.setIndicator("Control", res.getDrawable(R.drawable.ic_tab_equalizer)); spec.setContent(R.id.txtview); tabHost.addTab(spec); } } The XML referenced by R.layout.unit_view <?xml version="1.0" encoding="utf-8"?> <TabHost xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/tabhost" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="5dp"> <TabWidget android:id="@android:id/tabs" android:layout_width="fill_parent" android:layout_height="wrap_content"/> <FrameLayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="5dp"> <TextView android:id="@+id/txtview" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="bottom" android:text="nullpointer this!" /> </FrameLayout> </LinearLayout> </TabHost> As far as I can see I'm doing the same thing I see in the tabs1 api sample from the android sdk. I've tried "getLayoutInflator()" instead of "LayoutInflator.from(this)" with the same result. If I replace the LayoutInflater line with "setContentView(R.layout.unit_view)" my program doesn't crash with a null pointer exception but my content is completely blank and empty. I get the tab and that's it. I've checked to make sure R.layout.unit_view and tabHost are not null when it runs the LayoutInflater line and they seem to be fine. They're defenitely not null. I've also checked to make sure LayoutInflater.from(this) returns a valid layout inflater object and it does. The logcat indicating the error says E/AndroidRuntime( 541): java.lang.NullPointerException E/AndroidRuntime( 541): at android.widget.TabWidget.dispatchDraw(TabWidget.java:206) E/AndroidRuntime( 541): at android.view.ViewGroup.drawChild(ViewGroup.java:1529) E/AndroidRuntime( 541): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258) E/AndroidRuntime( 541): at android.view.ViewGroup.drawChild(ViewGroup.java:1529) E/AndroidRuntime( 541): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258) E/AndroidRuntime( 541): at android.view.ViewGroup.drawChild(ViewGroup.java:1529) E/AndroidRuntime( 541): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258) E/AndroidRuntime( 541): at android.view.ViewGroup.drawChild(ViewGroup.java:1529) E/AndroidRuntime( 541): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258) E/AndroidRuntime( 541): at android.view.ViewGroup.drawChild(ViewGroup.java:1529) E/AndroidRuntime( 541): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258) E/AndroidRuntime( 541): at android.view.ViewGroup.drawChild(ViewGroup.java:1529) E/AndroidRuntime( 541): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258) E/AndroidRuntime( 541): at android.view.View.draw(View.java:6538) E/AndroidRuntime( 541): at android.widget.FrameLayout.draw(FrameLayout.java:352) E/AndroidRuntime( 541): at android.view.ViewGroup.drawChild(ViewGroup.java:1531) E/AndroidRuntime( 541): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258) E/AndroidRuntime( 541): at android.view.ViewGroup.drawChild(ViewGroup.java:1529) E/AndroidRuntime( 541): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258) E/AndroidRuntime( 541): at android.view.View.draw(View.java:6538) E/AndroidRuntime( 541): at android.widget.FrameLayout.draw(FrameLayout.java:352) E/AndroidRuntime( 541): at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1830) E/AndroidRuntime( 541): at android.view.ViewRoot.draw(ViewRoot.java:1349) E/AndroidRuntime( 541): at android.view.ViewRoot.performTraversals(ViewRoot.java:1114) E/AndroidRuntime( 541): at android.view.ViewRoot.handleMessage(ViewRoot.java:1633) E/AndroidRuntime( 541): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime( 541): at android.os.Looper.loop(Looper.java:123) E/AndroidRuntime( 541): at android.app.ActivityThread.main(ActivityThread.java:4363) E/AndroidRuntime( 541): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 541): at java.lang.reflect.Method.invoke(Method.java:521) E/AndroidRuntime( 541): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860) E/AndroidRuntime( 541): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) E/AndroidRuntime( 541): at dalvik.system.NativeStart.main(Native Method) I/Process ( 61): Sending signal. PID: 541 SIG: 3 I/dalvikvm( 541): threadid=7: reacting to signal 3 I/dalvikvm( 541): Wrote stack trace to '/data/anr/traces.txt' Anybody have any idea how I can get this content into a tab without crashing my application? My actual program is more complex and has more than one tab but I simplified it down to this in an attempt to find out why it's crashing but it still crashes and I don't know why. If I don't use LayoutInflator my program doesn't crash but I don't get any content either, just tabs.

    Read the article

  • Literals that precede { in spark view engine.

    - by Quintin Par
    I was going through the spark view engine documentation and found a lot of literals showing up in code for which I couldn’t find any references. For e.g. ! , #, $ , !$ , ... What are these for? What do the combinations mean? When do they come into use? Am I missing any more literals that precede or comes after {

    Read the article

  • HTML comments in Spark view engine

    - by Rory Fitzpatrick
    How can I comment out parts of a Spark view so they aren't rendered to the client? In aspx pages I can do this: <%-- server-side comment --%> I had thought using three dashes would work: <!--- server-side comment ---> but it doesn't work and I now can't find the resource where I read that.

    Read the article

  • How to add View to Gallery?

    - by sunil
    Hi, I have multiple ListViews and would like to add those to Gallery. I tried with addView but it is not supported since Gallery view is an AdapterView. Can someone let me know how to go about it? Regards Sunil

    Read the article

  • Grails efficient hasMany-Relationship in View

    - by Jan
    Hi folks, I'm saving contacts (email, mobile phone, ICQ, AIM etc.) for people like this: class Person { static hasMany = { contacts: Contact } } class Contact { String code ContactType type } class ContactType { String name } In my view, I've written some Templates for displaying each contact with a select-box for the contact-type and a textfield for the code, spiced up with some JavaScript for adding and deleting. My question is: Is there an easy and elegant way to update the data similar to personInstance.properties = params or do I have to read out all the fields, deleting removed, updating changed and adding new ones?

    Read the article

  • Google Checkout View Cart Button

    - by Tyler
    I'm trying to add a view cart button to my website that is using google checkout, does anyone know a trick to do this? I think I may need to use a special div with a class to create a button that will display the cart when clicked, I'm lost. Thank you

    Read the article

  • Pay per view video solution

    - by Bassem Hefny
    Hello, We are planning on building a pay per view (PPV) video solution but we have no idea from where to start. Here are the current givens: it will be hosted on Linux using PHP Database: MySQL And by PPV I mean: - going to website, selecting a movie to watch/download - going to payment portal and paying - being now able to watch/download So here is my question, from where to start? is there an existing (recommended) solution that we can download/buy? Any information would be really appreciated

    Read the article

  • view Large PDF file in iPhone SDK

    - by aRrAY
    I have followed some tutorial that teach me how to view PDF file in UIWebView, however I found that if the file size is large, it will be lag when I zoom the PDF, but it doesn't occur in Mobile Safari. So anyone know how to solve it?

    Read the article

  • SQL Count in View as column

    - by alex
    I'm trying to get the result of a COUNT as a column in my view. Please see the below query for a demo of the kind of thing I want (this is just for demo purposes) SELECT ProductID, Name, Description, Price, (SELECT COUNT(*) FROM ord WHERE ord.ProductID = prod.ProductID) AS TotalNumberOfOrders FROM tblProducts prod LEFT JOIN tblOrders ord ON prod.ProductID = ord.ProductID This obviously isn't working... but I was wondering what the correct way of doing this would be?

    Read the article

  • which view/widget can support zooming in android?

    - by Sephy
    Hi everybody, I think my question is fairly clear, I would like to know if every kind of view can support zoom. I know that some have built in zoom controls like the MapView and the WebView, but how about a LinearLayout with some TextViews and ImageViews? I will edit this post to have a list of the answers.

    Read the article

  • How to show own view in Spinner Widget instead of Text View?

    - by Janusz
    I have a selection for some items using a spinner widget. At the moment the spinner will load a simple Textview and show the name of the item. It is possible to define an own view to show inside the spinner row? I would suspect it being similar to a custom List row. I simply want to show an individual icon left from the spinner text for each item in the list.

    Read the article

  • How to switch between views in android?

    - by aurezza
    I've tried several methods to switch between two views in my program. I've tried creating a new thread then have the view run for 5 seconds before creating intent to start my main activity. This is the code snippet from the said view class: mHelpThread = new Thread(){ @Override public void run(){ try { synchronized(this){ // Wait given period of time or exit on touch wait(5000); } } catch(InterruptedException ex){ } finish(); // Run next activity Intent intent = new Intent(Intent.ACTION_MAIN, null); intent.addCategory(Intent.CATEGORY_HOME); startActivity(intent); //stop(); } }; mHelpThread.start(); I can access the said view without error but it doesn't disappear after 5 seconds nor did it switched to main view when I even utilized an onTouchEvent() to detect touch on the screen of which it should have automatically closed. I've also tried adding a button on the said view to manually switch to main view: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.help); final HelpView helpView = this; final Button btnback = (Button) findViewById(R.id.back); btnback.setOnClickListener(new View.OnClickListener(){ public void onClick(View v) { Intent intent = new Intent(helpView, MainActivity.class); startActivity(intent); } }); } These codes worked, though, for creating a launcher for my program. So I thought that it would work the same if I added an option for help/rules(for the game) that would switch to another view. I've only since started using eclipse for android so pardon my lack of knowledge. Here is also the snippet from my manifest: <uses-sdk android:minSdkVersion="11" android:targetSdkVersion="15" /> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name="MainActivity" android:label="@string/title_activity_main"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.DEFAULT"/> </intent-filter> <intent-filter></intent-filter> </activity> <activity android:name="SplashScreen" android:theme="@style/Theme.Transparent"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> </activity> <activity android:name="HelpView" android:theme="@style/Theme.Transparent"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.DEFAULT"/> </intent-filter> <intent-filter></intent-filter> </activity> </application>

    Read the article

  • Accessory view in UITableView: view doesn't update

    - by Kamchatka
    I'm trying to add checkmarks to items when the user select rows in a table view. However, the view is not refreshed and the checkmarks do no show up: - (void)tableView:(UITableView *)tv didSelectRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell* oldCell = [self tableView:tv cellForRowAtIndexPath:[NSIndexPath indexPathForRow:selectedIndex inSection:0]]; oldCell.accessoryType = UITableViewCellAccessoryNone; if (indexPath.section == 0) { selectedIndex = indexPath.row; } UITableViewCell* newCell = [self tableView:tv cellForRowAtIndexPath:indexPath]; newCell.accessoryType = UITableViewCellAccessoryCheckmark; [tv deselectRowAtIndexPath:indexPath animated:NO]; } What could be a reason for that?

    Read the article

  • Overriding properties of child view controller vs setting them via parent view controller

    - by robinjam
    If you want to modify the default behaviour of a View Controller by changing the value of one of its properties, is it considered better form to instantiate the class and set its property directly, or subclass it and override the property? With the former it would become the parent View Controller's responsibility to configure its children, whereas with the latter the children would effectively configure themselves. EDIT: Some more information: The class I am referring to is FetchedTableViewController, a subclass of UITableViewController that I made to display the results of a Core Data fetch operation. There are two places I want to display the results of a fetch, and they each have different fetch requests. I'm trying to decide whether it's better to create a subclass for each one, and override the fetchRequest property, or make it the responsibility of the parent controller to set the fetchRequest property for its children.

    Read the article

  • CakePHP: Ajax view problem (nothing in the view showing)

    - by Adim
    I created a function in my controller called addToPlaylist($songName). I wanted to add these song names to an array and then a session variable using an Ajax call. The first time i did this i got an error saying i do not have a template file to display in the chosen div ("add_to_playlist.ctp was missing"). I created this file and everything seemed to be working correctly. Basically I went to bed woke up and it is broken (it is possible I changed something before I went to bed). The problem now is that it does not show anything when i click the ajax link. when i click on the ajax link it seems to call the function but nothing displays in the view (except debug info) even when i delete the view (add_to_playlist.ctp) i get no errors, I just see debug info now.

    Read the article

  • Constants in Model and View with select option and show view

    - by caplod
    i have a some values ,that i use in my model as constants. class Animal < ActiveRecord::Base LEGS = {:vierbeiner => 4, :zweibeiner => 2 } end in the form (formtastic) for the collection i use: <%= f.input :legs, :as => :select, :collection => Animal::LEGS => but how do i format the show view so instead showing me the number , the key of the hash? in show view i have: <p> <strong>Legs:</strong> <%=h @animal.legs %> </p>

    Read the article

  • Render view as string when Ajax request to view is made

    - by mare
    I have my views render to route requests like /controller/action (for instance, /Page/Create), so pretty classic. I am creating a form where view will be loaded through AJAX request with jQuery get(), so essentially I need my Views or to be precise, my controller actions, to return plain HTML string when an AJAX request is made to the route that renders the View. I want to use the same views as for normal requests, so I cannot afford to create any new views. It is something like calling RenderPartial("MyViewUserControl") but from inside the JS code.

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >