Search Results

Search found 10911 results on 437 pages for 'dynamically loaded xap'.

Page 66/437 | < Previous Page | 62 63 64 65 66 67 68 69 70 71 72 73  | Next Page >

  • How can I add styles to dynamically added table cells?

    - by Doc Hoffiday
    In my program I have a table that, when loaded, has jQuery add some styles/classes to the table cells and table headers. Everything works fine until rows are added via functionality on the rest of the page. Instead of adding the classes to the table cell during addition, is it possible to "listen" or fire some event that checks to see if child elements were added to the table. Essentially, I want something functionally equivalent to this: $("#table td").live("ready", function(){ // do something }); but the live/ready won't work on a table cell... Any ideas?

    Read the article

  • How to dynamically order many-to-many relationship in JPA or HQl?

    - by Indrek
    I have a mapping like this: @ManyToMany(cascade = CascadeType.PERSIST) @JoinTable( name="product_product_catalog", joinColumns={@JoinColumn(name="product_catalog", referencedColumnName="product_catalog")}, inverseJoinColumns={@JoinColumn(name="product", referencedColumnName="product")}) public List<Product> products = new ArrayList<Product>(); I can fetch the products for the catalog nicely, but I can't (dynamically) order the products. How could I order them? I probably have to write a many-to-many HQL query with the order-by clause? I though of passing the orderBy field name string to the query, or is there a better solution? Tables are: products, product_catalog, product_product_catalog (associative table) P.S. Using Play! Framework JPASupport for my entities.

    Read the article

  • Is it possible to dynamically set a static string during compile?

    - by LonnieBest
    I'm trying to dynamically create a connection string during compile time: public static string ConnectionString { get { string connectionString = @"Data Source=" + myLibrary.common.GetExeDir() + @"\Database\db.sdf;"; return connectionString; } } I keep running into type initialisation errors. I was trying to avoid having to set the connection string for all applications that user my code library. The location of the database is different for each project that uses the library. I have code that can determine the correction string, but was wanting run it during compile time. Is this even possible?

    Read the article

  • Ensuring dynamically added Dojo Dijits are registered in the DOM.

    - by Pro777
    I need to dynamically create Dijits to add N rules to a particular form. Currently I am adding them with the following javascript. var value = new dijit.form.Select({ id: "value_" + counter, store: ValueStore, searchAttr: "description" }, "stateSelect" + counter); value.placeAt(form, "last"); value.startup(); This is creating the element correctly in the form, but it is not associated when the form actually posts. I know Dojo is recognizing the Dijit because the styling is correct. How can I make sure they are included in the DOM form?

    Read the article

  • Can jQuery dynamically change a "username" field based on a "name" field?

    - by SoulieBaby
    Hi all, basically I have two input fields, "name" and "username". The idea is that the "username" field will change depending on what is entered into the "name" field - dynamically. I also need the username field to be in lowercase only and to change spaces into dashes. I was thinking using onkeydown but I couldn't get it to do anything. I've been looking around, but can't seem to find what I'm looking for. Anyone got any ideas? <input type="text" name="name" id="name" class="field" /> <input type="text" name="username" id="username" class="field" /> ^^ basic form inputs.

    Read the article

  • Is it possible to dynamically set a static string during *class* Initialisation?

    - by LonnieBest
    I'm trying to dynamically create a connection string during compile time: public static string ConnectionString { get { string connectionString = @"Data Source=" + myLibrary.common.GetExeDir() + @"\Database\db.sdf;"; return connectionString; } } I keep running into type initialisation errors. I was trying to avoid having to set the connection string for all applications that user my code library. The location of the database is different for each project that uses the library. I have code that can determine the correction string, but was wanting run it during compile time. Is this even possible?

    Read the article

  • How do I dynamically specify a file in DOS?

    - by donde
    I am trying to use c# in .net to run dos commands to ftp a a file. Technically, it calls a BAT file which calls a CMD file which executes the DOS code. It was up to the CMD file. The CMD fiel will work if I hardcode the path, but I need to dynamically specify the path of the file. BAT File... ftp.exe -s:%~dp0\mycmdfile.cmd And in the cmd file... open <my ost> <my user name> <my pw> quote site cyl pri=1 sec=1 lrecl=1786 blksize=0 recfm=fb retpd=30 put <here is where I need the dynamic path> + localfilename remotefilename quit

    Read the article

  • How do you assign a JavaScript 'onclick' attribute dynamically?

    - by Jack Roscoe
    Hi, I'm creating a button dynamically using JavaScript and at the same time assigning attributes such as 'ID', 'type' etc and also 'onclick' in order to trigger a function. All works fine apart from the assignment of the 'onclick'. When clicked, the button is not triggering the function as it is supposed to. the function I'm trying to run is 'navigate(-1)' as seen below. Where am I going wrong? Here's my code: function loadNavigation() { var backButton; backButton = document.createElement('input'); backButton.ID = 'backButton'; backButton.type = 'button'; backButton.value='Back'; backButton.onclick = 'navigate(-1)'; document.body.appendChild(backButton); }

    Read the article

  • How to handle lifecycle of dynamically allocated data in Windows messages?

    - by nang
    Simple task: Send a windows message with dynamically allocated data, e.g. an arbitrary length string. How would you manage the responsibility to free this data? The receiver(s) of the windows message could be responsible to free this data. But: How can you guarantee that all messages will actually be received and thus the linked data will be freed? Imagine the situation that the receiver is shutting down, so it won't process it's message queue any more. However, the message queue still exists (for some time) and can still accept messages, which won't be processed any more. Thanks!

    Read the article

  • How do I dynamically assign the Model for a .find in Ruby on Rails?

    - by Angela
    I am trying to create a Single Table Inheritance. However, the Controller must be able to know which class to find or create. These are based on another class. For example, ContactEvent with type = Letter needs to grab attributes from a corresponding Model called Letter. Here's what I've tried to do and hit a snag, labelled below. I need to be able to dynamically call assign a value of EventClass so that it can be Letter.find(:conditions =) or Calls.find(:conditions =) depending on which type the controller is acting on. def new @contact_event = ContactEvent.new @contact_event.type = params[:event_type] # can be letter, call, postcard, email @contact_event.event_id = params[:event_id] # that ID to the corresponding Model @contact_event.contact_id = params[:contact] @EventClass = case when @contact_event.type == 'letter' then 'Letter' when @contact_event.type == 'call' then 'Call' when @contact_event.type == 'email' then 'Email' SNAG BELOW: @event = @EventClass.find(@contact_letter.letter_id) #how do I make @EventClass actually the Class?SNAG # substitution of variables into the body of the contact_event @event.body.gsub!("{FirstName}", @contact.first_name) @event.body.gsub!("{Company}", @contact.company_name) @evebt.body.gsub!("{Colleagues}", @colleagues.to_sentence) @contact_event.body = @event.body @contact_event.status = "sent" end

    Read the article

  • Can I change the database server and database a report is pointing to dynamically?

    - by Randy Minder
    I have a Crystal 2008 report that will be deployed to an InfoView server. There are four different databases the user might want to execute the report against. Each of the four databases have exactly the same schema. Only the data in each is different. Each database corresponds to a plant we have around the world. Instead of creating four different reports (each one connected to one of the four databases), am I able to dynamically change the server/database the report hits based on a value the user enters into a parameter? I'm really trying to avoid having to create four identical reports except for the database connection on each. If this isn't possible, how do developers typically deal with this sort of scenario? I would imagine it's fairly common. Thanks very much.

    Read the article

  • How to create a fully qualified hyperlink to a resource dynamically?

    - by Slauma
    In ASP.NET I'd like to create a link which points to a specific Uri and send this link in an email to a user, for instance something like http://www.BlaBla.com/CustomerPortal/Order/9876. I can create the second part of the Uri /CustomerPortal/Order/9876 dynamically in code-behind. My question is: How can I create the base Uri http://www.BlaBla.com without hardcoding it in my application? Basically I want to have something like: http://localhost:1234/CustomerPortal/Order/9876 (on my development machine) http://testserver/CustomerPortal/Order/9876 (on an internal test server) http://www.BlaBla.com/CustomerPortal/Order/9876 (on the production server) So is there a way to ask the server where the application is running: "Please tell me the base Uri of the application" ? Or any other way? Thank you in advance!

    Read the article

  • Why has to be size of dynamically-allocated array a static field?

    - by Ondrej Slinták
    I have a dummy class where I am testing arrays. I've noticed that when I want to dynamically allocate size of array at runtime, fields that indicate this size have to be static. I know I should probably use collections for this kind of code, but I'm more interested why do these fields have to be static? Is there any particular reason behind this? class Foo { private static int x; private static int y; private int[,] bar = new int[ x, y ]; public Foo( int a, int b ) { x = a; y = b; } }

    Read the article

  • How do I dynamically point an interface to a specific class at runtime?

    - by Jon
    As a simple example, I have an xml file with a list of names of classes which actually carry out the work and all implement interface IDoWork with a method Process(). I loop through the items in the xml file. How do I actually dynamically assign the class to the interface from a string name? e.g. var IDoWork = new "DoWorkType1"(); IDoWork.Process(); <work> <item id="DoWorkType1"> </item> <item id="DoWorkType2"> </item> </work> I want to achieve a plugin type architecture, except the plugin isn't at an assembly level only a class level within my program.

    Read the article

  • Why does C++ allow variable length arrays that aren't dynamically allocated?

    - by Maulrus
    I'm relatively new to C++, and from the beginning it's been drilled into me that you can't do something like int x; cin >> x; int array[x]; Instead, you must use dynamic memory. However, I recently discovered that the above will compile (though I get a -pedantic warning saying it's forbidden by ISO C++). I know that it's obviously a bad idea to do it if it's not allowed by the standard, but I previously didn't even know this was possible. My question is, why does g++ allow variable length arrays that aren't dynamically allocated if it's not allowed by the standard? Also, if it's possible for the compiler to do it, why isn't it in the standard?

    Read the article

  • How to dynamically order many-to-many relationship with JPA or HQl?

    - by Indrek
    I have a mapping like this: @ManyToMany(cascade = CascadeType.PERSIST) @JoinTable( name="product_product_catalog", joinColumns={@JoinColumn(name="product_catalog", referencedColumnName="product_catalog")}, inverseJoinColumns={@JoinColumn(name="product", referencedColumnName="product")}) public List<Product> products = new ArrayList<Product>(); I can fetch the products for the catalog nicely, but I can't (dynamically) order the products. How could I order them? I probably have to write a many-to-many HQL query with the order-by clause? I though of passing the orderBy field name string to the query, or is there a better solution? Tables are: products, product_catalog, product_product_catalog (associative table) P.S. Using Play! Framework JPASupport for my entities.

    Read the article

  • How to dynamically load and switch the resource file in the web app (ASP.NET) without recompiling ?

    - by Thomas Wanner
    I would like to store the resource files (containing texts for labels etc.) for my web application in the database to be able to edit and create them dynamically later (probably in the UI). My idea was to store the whole resx file in an xml column and simply load it on demand - depending on the language and some other attributes of the current user when he is logging into the application or switching the context. The important thing is that the resources do not only depend on the culture info of the user but also on some context information that can be switched by user without logging off and on again (in our case called "group", not having anything to do with a group of users). Is it possible somehow to load the contents of the resources from an external source and simply switch them without web application being recompiled by the server ? I know that there are some interfaces on which I could hook up and implement a custom resources provider which reads from the database directly but if it could work somehow with the resx files it would probably make things a lot easier..

    Read the article

  • Rails - How do you dynamically call the request methods "get put destroy etc" at runtime in tests

    - by adam
    I'm always writing tests to check my controller restricts people from certain actions depending on their status i.e. logged in, admin? etc Regardless of whether its a get to :index or a puts to :create the code is always the same. I'm trying to refactor this so that i have one method such as should_redirect_unauthenticated_to_login_action(request, action) and call it like so should_redirect_unauthenticated_to_login_action(:get, :index) = get :index But not sure how to dynamically call the various response methods rails provides for functional tests which seem to live in the module ActionController I mucked around with module = Kernel.const_get("ActionController") module::TestProcess.get NoMethodError: undefined method `get' for ActionController::TestProcess:Module can anyone help (im very new to dynamic calling in ruby)

    Read the article

  • How do I dynamically import a module in App Engine?

    - by Scott Ferguson
    I'm trying to dynamically load a class from a specific module (called 'commands') and the code runs totally cool on my local setup running from a local Django server. This bombs out though when I deploy to Google App Engine. I've tried adding the commands module's parent module to the import as well with no avail (on either setup in that case). Here's the code: mod = __import__('commands.%s' % command, globals(), locals(), [command]) return getattr(mod, command) App Engine just throws an ImportError whenever it hits this. And the clarify, it doesn't bomb out on the commands module. If I have a command like 'commands.cat' it can't find 'cat'.

    Read the article

  • Delphi: How to assign dynamically an event handler without overwriting the existing event handler?

    - by user193655
    I need to loop through Components and assign an event handler (for example Dynamically assigning OnClick event for all TButton to ShowMessage('You clicked on ' + (Sender as TButton).Name); The problem is that in some cases I alreasy assigned the TButton OnClick event. Is there a way to solve the problem? Let's imagine I have Button1 for which the harcoded onclick event handler is: ShowMessage('This is Button1'); After my "parsing" I would like that the full event handler for Button1 becomes: ShowMessage('This is Button1'); // design time event handler code ShowMessage('You clicked on ' + (Sender as TButton).Name); // runtime added Note: I am looking for a soliution that allows me to use TButton as it is without inheriting from it.

    Read the article

  • Android: How to get text of dynamically created radio button selected by the user?

    - by Maxood
    How can i retrieve the text of a dynamically created radio button selected by the user? Here's my code: RadioGroup radiogroup = (RadioGroup) findViewById(R.id.rdbGp1); // layout params to use when adding each radio button LinearLayout.LayoutParams layoutParams = new RadioGroup.LayoutParams( RadioGroup.LayoutParams.WRAP_CONTENT, RadioGroup.LayoutParams.WRAP_CONTENT); for (int i = 0; i < 4; i++){ final RadioButton newRadioButton = new RadioButton(this); c3 = db.getAns(3); for (int j=0;j<i;j++) c3.moveToNext(); label = c3.getString(0); newRadioButton.setText(label); newRadioButton.setId(6); radiogroup.addView(newRadioButton, layoutParams); Waiting for the reply, Maqsood

    Read the article

  • How does the WP7 Pivot control dynamically load pivot items?

    - by mztan
    IIRC, the Pivot control only loads a child PivotItem if it is the currently shown child. I would then guess that the previously seen child is also somehow unloaded, presumably still stored in memory, but hidden from the UI. What I'm wondering is, how does the Pivot control dynamically load/unload a child control, and can that behavior be imitated within a custom UserControl? As for unloading, is it as simple as collapsing the previous child's visibility, or is something trickier going on? That is to say, supposing I use my own UserControl like: <my:CustomUserControl> <TextBlock x:Name="_textBlock" Text="wait for it ..." /> </my:CustomUserControl> Normally, the child TextBlock is instantiated when the surrounding PhoneApplicationPage is instantiated, via InitializeComponent and all that. Is there any way to postpone this behavior and load the child programmatically?

    Read the article

  • Drupal 6: creating location list manually or dynamically via cms...

    - by artmania
    Hi friends, I'm starting my first Drupal project, pretty excited :) I have a question; the project is a hotel directory site. at sidebar I have locations list (London, Manchester, Liverpool, etc..) and filter the hotels related on location click. So, how should I create these cities? Should I put them manually and give links manually depending on location id? or is there any better way to create this location list and linking filtering dynamically (via cms, or custom module, etc...) Appreciate advices!!!!

    Read the article

  • How to change the position of the Horizontal line dynamically ?

    - by Hari
    I am making asp.net website. In that there is a link button (named Landline number).Below that there are three textboxes. And after that there is one horizontal line. Now at a first time only link button and horizontal will be visible, and textboxes which is bellowed to link button will not be visible. Now if user will click on the link button then textboxes which is bellowed to link button will be visible. Then horizontal line which is at the first time bellowed to the link button should be adjust to its location and should go after textboxes. And if user clicks to link button again then textboxes should be visible false. And horizontal line should be displayed its original position that is bellowed to the link button. Of course I am able to do with visibility of textboxes but I can not understand how to change the position of the horizontal line dynamically?

    Read the article

  • How to apply dynamically scale down and up into a thumbnail images size?

    - by Qpixo
    I'm working on one current project, I don't have any issues to load a SWF into a main SWF but I can't figure out how to apply dynamically the scale down and up into a thumbnail images size while using the Resize event handler. I load SWF into a Loader object then add it into a container = currentMC. I want to size it and keep all the pieces inside this container. Therefore no matter browser size, I just want to be able to apply scale on it to fit it. Does anyone know how to do that? Any code examples would help me a lot. I'm using Flash.

    Read the article

< Previous Page | 62 63 64 65 66 67 68 69 70 71 72 73  | Next Page >