fields

how to access form array fields with struts2

Hello friends, Currently I am working on one form which contains 2 buttons. Clicking on 1 button I am getting block of html fields as below. ` <table width="100%"> <tbody><tr> <td class="style4" width="12%" align="center">CODE<span class="style3"> </span></td> <td width="18%"><input name="c_code[]" value="" id="c_...

How-to get a System.Collections.Generic.List<FieldInfo> list which holds all FieldInfo's of an object of a Type T up to the Object in the class hierarchy in C# ?

I am trying to reuse an existing code ... but with no success . Here is the code snippet: using System; using System.Collections.Generic; using System.Collections.Specialized; using System.Text; using System.Reflection; namespace GenApp.Utils.Reflection { class FieldTraverser { public static string SearchFieldValue(obje...

Is it possible to alter a marked field´s field function with Word 2007 VBA?

Hi, i want do the following: In Word 2007 place the Cursor on a field (or mark that field) and call a macro wich edit the field function of that field. (add some string). I´m even grateful for some tipps what term to google. I used the macro recorder and got following: WordBasic.FormatField Field:="CITATION Gro05 \p 9 \l 1031" Th...

jQuery and dynamically generated forms.

I am creating form fields dynamically. If I use <script> $().ready(function() { $("input[name=salesPrice1]").blur(function() { var nameID = $("input[name=salesPrice1]").val(); alert(nameID); //var newName = $("input#newName").val(); $.ajax({ type: "POST", url: ...

jQuery validate with a dynamic number of fields

I have a form with a stage that has a dynamic number of groups of fields, where the number is based upon answers in the previous stage. I'm generating the fields server-side as an array, i.e. <input id="foo[0]"... <input id="bar[0]"... <input id="foo[1]"... <input id="bar[1]"... <input id="foo[2]"... <input id="bar[2]"... etc No ma...

Should all the fields in a GlobalSettings modelling class be static ( C# centric ) ?

The idea is that the ApplicationSettings class will get some default values from a configuration / resource file and later on some but not all from those settings will be applied to UserSettings ...

Getting number of fields in a database with an SQL Statement?

How would i get the number of fields/entries in a database using an SQL Statement? Thanks, Ash ...

Unlimited fields in PHP?

How do I do unlimited fields in php? Here is the scenario: At first, there are only 2 fields, lets called: first name1, last name1 What I want to do is, when I click the "add" button, it will add another 2 fields in new row, the fields label/name should be first name2, last name2. And when I click again, it will have first name3, last ...

Mysql Compare two datetime fields

Hi All, I want to compare two dates with time, I want all the results from tbl where date1 > date2 Select * From temp where mydate > '2009-06-29 04:00:44'; but it is just comparing dates not time. it is giving me all the result set of today's date '2009-06-29 11:08:57' '2009-06-29 11:14:35' '2009-06-29 11:12:38' '2009-06-29 11:37:48...

Reflection in C# -- want a list of the data types of a class' fields

My C# class MyClass (below) has members a, b, c, d, e, and f. I'd like to use reflection to obtain a list of the data types of those members; for example (borrowing from Python notation): [ char[], ushort, char, byte, uint, ulong ]. class MyClass { public char [ ] a ; public ushort b ; public char c ; ...

.NET Reflection: determine sizes of a class' fields

Goal: to programmatically determine the sizes (in bytes) of the fields of a class. For example, see the comments below ... class MyClass { public byte b ; public short s ; public int i ; } class MainClass { public static void Main() { foreach ( FieldInfo fieldInfo in typeof(MyClass).GetFields(B...

Why can't IPython return records with multiple fields when submitting a query to sqlite?

I am trying to write a simple query to an sqlite database in a python script. To test if my parameters were correct, I tried running the query from the ipython command line. It looked something like this: import sqlite3 db = 'G:\path\to\db\file.sqlite' conn = sqlite3.connect(db) results = conn.execute('SELECT * FROM studies').fetchall()...

Initializing Class Fields at the Field Definition or in Class Contructor

Say I have a class with a field that needs to be initialized when the object is initialized. Such as list that need to be created before objects can be added/removed from it. public class MyClass1 { private List<MyOtherClass> _otherClassList; public MyClass1() { this._otherClasslist = new List<MyOtherClass>(); }...

Critique my MySQL Database Design for Unlimited DYNAMIC Fields

Looking for a scalable, flexible and fast database design for 'Build your own form' style website - e.g Wufoo. Rules: User has only 1 Form they can build User can create their own fields or choose from 'standard' fields User's 1 Form has as many fields as the user wants Values can be the sibling of another value E.g A photo value coul...

Why is the fields pragma incompatible with multiple inheritance in Perl?

Multiple inheritance is great, and Perl handles it just fine as long as you have a clear understanding of your inheritance heirarchy and some of the potential pitfalls (such as those described in perldoc perltoot). Yet it does not discuss the prohibition of using the fields pragma with multiple inheritance. Indeed, I can find no docume...

C#: Public Fields versus Automatic Properties

We're often told we should protect encapsulation by making getter and setter methods (properties in C#) for class fields, instead of exposing the fields to the outside world. But there are many times when a field is just there to hold a value and doesn't require any computation to get or set. For these we would all do this number: publ...

How do I read a private field in Java?

I have a poorly designed class in a 3rd-party JAR and I need to access one of its private fields. For example, class IWasDesignedPoorly { private Hashtable stuffIWant; } IWasDesignedPoorly obj = ...; How can I use reflection to get the value of stuffIWant? ...

Initializing a lot of fields - constructor vs method return values

Hi, I'm currently working on a Java trading card game, similar to the old Pokémon one. What I now want to do is to define all the cards in some way, but because there's a lot of fields that need to be initialized, I'm thinking of alternative ways, because a constructor will be very long and hardly readable for each card. I also have to i...

Access fields or properties from within the declaring class

Public Class FooBar { private int _foo; public int Foo { get { return _foo; } set { _foo = value; } } public void DoStuff() { _foo++; // Do this? Foo++; // Or this? } } Is there a more accepted practice to either access fields or properties (if one exists) in a class? I've alwa...

Drupal Views combine 2 columns into 1?

I've got two content types, both have a node title and a document attachment, the doc attachment fields are different names (being from two different content types). In my view, I'm displaying the node title and the file name in a table. The node titles are great all in one column, but the two content typed attachment fields are display...