Re: R: database forms

2003-03-24 Thread webmaster
Lorenzo De Sio wrote:
[...]
I built all this about one year and a half ago, and never divulgated it ;-)
because I thought it would be better to build something new related to
XForms (but using XML, not JavaBeans). Though, if you are interested in this
system and wish to use it and help me contribute something new to Cocoon, we
could join our efforts.
[...]

ok, I haven't understood every line you wrote but I think I got the picture.

Though, if you are interested in this
system and wish to use it and help me contribute something new to Cocoon, we
could join our efforts.
ok please send me the files (DTD, XML) and how to use them because you 
are refering to

w4b:... I need to know what that is.

king regards
Thorsten
Stefan, Thorsten,

I actually implemented something similar to what Stefan outlined in its
first e-mail.
It works mainly like this:
system-wide configuration files (one for each relevant DB table) exist in a
central location, containing information about HTML widget rendering and JS
validation of each field; here is an example:
table name=tasks primary-key=task_id check-field=title
field name=task_id/
field name=title caption=Titolo write-style=width:200
validate=nonempty/
field name=priority caption=Priorita'
validate=nonempty, integer validate-min=0 validate-max=10/
field name=insertion_date caption=Data di inserimento
validate=nonempty,date/
field name=expiration_date caption=Data di scadenza
validate=date/
field name=description caption=Descrizione
widget=textarea/
field name=project_id caption=Progetto
select
esql:connection
esql:poolw4b/esql:pool
esql:execute-query
esql:querySELECT * FROM projects
ORDER BY name/esql:query

esql:resultsesql:row-resultsoptionxsp:attribute
name=valueesql:get-int
column=project_id//xsp:attributeesql:get-string
column=name//option
/esql:row-results/esql:results
 /esql:execute-query
/esql:connection
/select
/field
/table
these are XSP files, meaning that i.e. select boxes can be populated
dynamically and even based on current user data (privileges, etc.);
you can design any number of forms which refer to these common configuration
files: simply use in your XSLs a few custom tags such as:
w4b:form name=modulo onSuccess={//@referer}
w4b:row mode=write table=projects
pk-value={project_id}
w4b:field src=project_id
value={project_id}/
w4b:caption src=customer_id/:w4b:field
src=customer_id value={customer_id}/
/w4b:row
/w4b:form

the form can refer any number of rows belonging to different tables
(multiple w4b:row inside a w4b:form).
Such forms require a few transformations (a first XSL one which detects the
tables involved, and adds cinclude's to load the configuration XSP for
each table; the actual CInclude trasnformation; two final XSLs which build
all the HTML rendering and JS validation. Current renderings include text
boxes, selects (with automatic DB-bound option selection), textareas, etc.
The result is a HTML form where every field is named with a
table-pk_value-fieldname combination.
All this, after user modification, can be POSTed to a general-purpose form
processing action, which loads the required configurations from the same
files as above (PK names, etc.), writes everything to the DB, and redirects
to the desired URL (onSuccess above). To achieve more flexibility, nothing
prevents from POSTing to custom actions, one for each form, or to XSPs. The
only thing to keep is the form fields naming convention.
I built all this about one year and a half ago, and never divulgated it ;-)
because I thought it would be better to build something new related to
XForms (but using XML, not JavaBeans). Though, if you are interested in this
system and wish to use it and help me contribute something new to Cocoon, we
could join our efforts.
With my best regards,

L.

-Messaggio originale-
Da: Scherler, Thorsten [mailto:[EMAIL PROTECTED]
Inviato: venerdì 21 marzo 2003 13.50
A: [EMAIL PROTECTED]; Stefan Klein
Oggetto: AW: database forms
hi Stephan,

by the way are you in Spain right now?

see my answer below:

-Ursprüngliche Nachricht-
Von: Stefan Klein [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 21. März 2003 10:48
An: [EMAIL PROTECTED]
Betreff: Re: database forms
 

Hi Thorsten,

thanks for your reply. I've been pondering about your mail for a little
while now. The xsl looks like a clever idea. A few things remain unclear to
me:
What way do you use 

Re: Antwort: Multiple pdf with one match?

2003-03-24 Thread webmaster
hi Matthias,

that is good way!

Thank you for the tip!

My problem is a little bit different because actually I want to send 
this e.g. 4 files to a printer! That I could not to wirth a zip, or could I?

King regards
Thorsten
Stoeckel, Matthias wrote:

Hi Thorsten,

another solution would be the ZipArchiveSerializer.  If your users have an
zip client you could put all your pdf's into one zip file. This would avoid
a javascript hack. One problem with opening windows (assuming that you use
IE on Windows) is that you can have a maximum of 4 requests per browser. So
you will get serious trouble with timeouts as soon as you have to send more
than 4 pdfs.
Cheers
 Matthias
 

-Ursprüngliche Nachricht-
Von: Scherler, Thorsten [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 21. März 2003 14:31
An: Cocoon-Users (E-Mail)
Betreff: Multiple pdf with one match?
Hello group,

I want to do the following:
I have on html-Form where I put the date. With this date 
there should be called 3 different piplines resulting 3 
DIFFERENT pdf files.

Some thoughts:
I thought about open 3 different browser windows where each 
is for one resulting pdf.
I can do that with JavaScript but would prefer to do it server sided.

Any ideas or links or hints?

King regards
Thorsten
   

Mit freundlichem Gruss,

Thorsten Scherler
Marketing / Telefonmarketing
Weidmüller GmbH  Co.
P.O. Box 2807
33058 Paderborn
Tel.:+ 49 - 5252-960-350
Fax:+ 49 - 5252-960-116
eMail: [EMAIL PROTECTED]
http://www.weidmueller.de
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


GeneratorSelector error

2002-01-14 Thread Webmaster NWWV

I had cocoon 2 and resin working fine.  Apparently it crashed over the
weekend.  Well now it doesn't work anymore.  Even with a totally fresh
install.  Never had this error before.

Here is what cocoon says:

DEBUG   (2002-01-14) 14:11.46:392   [cocoon  ] (Unknown-URI)
Unknown-thread/Exca
liburComponentManager: Could not find ComponentHandler, attempting to create
one
 for role:
org.apache.cocoon.components.language.generator.ServerPagesSelector
DEBUG   (2002-01-14) 14:11.46:394   [cocoon  ] (Unknown-URI)
Unknown-thread/Defa
ultComponentFactory: ComponentFactory creating new instance of
org.apache.cocoon
.components.language.generator.GeneratorSelector.

Here is what resin says:

[2002-01-14 14:11:10.809] initializing application /
wn Source)
at
org.apache.cocoon.components.language.generator.GeneratorSelector.addGenerat
or(GeneratorSelector.java:135)
at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.addComp
iledComponent(ProgramGeneratorImpl.java:345)
at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(Pr
ogramGeneratorImpl.java:179)
at org.apache.cocoon.sitemap.Handler.run(Handler.java:208)
at java.lang.Thread.run(Thread.java:479)


Any ideas on what is causing this?  My enviroment is as follows:

Solaris 8
Apache 1.3.22
Resin 2.0.4
Cocoon 2.0
JDK 1.3

Any help would be appreciated.


Dustin Tenney 

-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




xsp-request:get-uri do not show root when called from aggregation

2001-10-05 Thread Webmaster

Hi,

I have a problem with Cocoon2.0rc1: xsp-request:get-uri/ do not show
root (/) when called from a map:aggregate

That is the xsp:

xsp:page .. ..
test

get-requested-urlxsp-request:get-requested-url//get-requested-url
get-urixsp-request:get-uri//get-uri
/test
/xsp:page


with that in sitemap:

map:match pattern=testuri.xml
map:generate type=serverpages src=testuri.xsp/
map:serialize type=xml/
/map:match


you can call (in my case: http://localhost:8102/testuri.xml) and get
that expected:

test xmlns:xsp=.. ..
 
get-requested-urlhttp://127.0.0.1:8102/testuri.xml/get-requested-url 
  get-uri/testuri.xml/get-uri 
/test


BUT if you put in sitemap:

map:match pattern=testuri-as-part.xml
  map:aggregate element=content-list
map:part src=cocoon:/testuri.xml element=content/
  /map:aggregate
  map:serialize type=xml/
/map:match


you call http://localhost:8102/testuri-as-part.xml) and get:

content-list
  content
test xmlns:xsp=.. ..
 
get-requested-urlhttp://127.0.0.1:8102testuri.xml/get-requested-url
  get-uritesturi.xml/get-uri
/test
  /content
/content-list


If anybody know: WHY I am lost the root (/) between
http://127.0.0.1:8102; and testuri.xml???

Thanks in advance.

Antonio Sotomayor
[EMAIL PROTECTED]


PD: 
1) Some data: Test done in W2000Server (US) + ServicePack2 + JRun3.1 +
Cocoon2.0rc1
2) The test gives the same result if I aggregate several parts instead
only one.


-
InforNet

Cristobal Bordiu, 35. 28003 Madrid.
Teléfono: 34 1 533 30 00*
Fax: 34 1 533 40 36
e-mail: [EMAIL PROTECTED]

http://www.infornet.es
http://www.megastorevirtual.com
http://www.enlaweb.com
-

-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]