Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #26468

HtmlFormGenerator

X-Received by 10.236.36.39 with SMTP id v27mr2050159yha.5.1383330527089; Fri, 01 Nov 2013 11:28:47 -0700 (PDT)
X-Received by 10.49.94.116 with SMTP id db20mr65125qeb.19.1383330527072; Fri, 01 Nov 2013 11:28:47 -0700 (PDT)
Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!i2no5144753qav.0!news-out.google.com!9ni3876qaf.0!nntp.google.com!i2no5144748qav.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.java.programmer
Date Fri, 1 Nov 2013 11:28:46 -0700 (PDT)
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=41.142.27.249; posting-account=o5euywoAAABoWUue6NVisOhucTGOn-cZ
NNTP-Posting-Host 41.142.27.249
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <8e2a98e6-f11e-4173-ba99-91efdc0cfcf2@googlegroups.com> (permalink)
Subject HtmlFormGenerator
From chokri abdessamad <chokri052@gmail.com>
Injection-Date Fri, 01 Nov 2013 18:28:47 +0000
Content-Type text/plain; charset=windows-1252
Content-Transfer-Encoding quoted-printable
X-Received-Bytes 2636
Xref csiph.com comp.lang.java.programmer:26468

Show key headers only | View raw


bonjour,

s'il vous plaît je souhaite générer une page HTML a des label (Identificateur, nom, NumTel, email) et des champ de saisir à côté de chaque label dans le même ligne avec des taille différents (je les définir à l'aide des annotations ) 

voici mon classe contact 

public class Contact {
	@Column(label="Identificateur", size=10)
	private int id;
	
	@Column(label="Nom",size=30)
	private String name;
	
	@Column(label="N de téléphone")
	private String tel;
	
	@Column(label="Adresse Email",size=30)
	private String email;

	public Contact() {
		super();
	}
	public Contact(int id, String name, String tel, String email) {
		super();
		this.id = id;
		this.name = name;
		this.tel = tel;
		this.email = email;
	}

et voici aussi l’annotation @culumn pour les champs 

@Retention(RetentionPolicy.RUNTIME) // RetentionPolicy.SOURCE ==> par default
@Target(ElementType.FIELD)
public @interface Column {
	String label();
	int size() default 20;
	//String sqlType() default "VARCHAR";
}
 

et voila mon code JAVA qui sera faire ceci que je entrain de expliquer 

public class HtmlFormGenerator {
	private Object source;
	private String target; //chemin des fichiers cibles
	public HtmlFormGenerator(){		
	}
	public static boolean generate(){
		//...	formulaire de saisie des informations sur l objet, l                                            //introspection et l annotation
		return true;
	}}

s'il vous plaît si quelqu’un a un solution ou un suggestion
et merci d'avance

Back to comp.lang.java.programmer | Previous | Next | Find similar | Unroll thread


Thread

HtmlFormGenerator chokri abdessamad <chokri052@gmail.com> - 2013-11-01 11:28 -0700

csiph-web