You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Aurélien DEHAY <ad...@zorel.org> on 2004/12/12 14:29:05 UTC
Database in flow/problem with jxpath
Hello.
I've got the following flow code:
function modifierContenu() {
var conn = Database.getConnection("llinfo");
var result = conn.query("SELECT * FROM people");
var record = result.rows;
conn.close();
cocoon.sendPage("protected-test-2", {"record": record});
}
I've got the following jxpath file (called by the protected-test-2
pipeline):
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:c="http://apache.org/cocoon/templates/jx/1.0" >
<head>
<title>Bienvenue dans la Batcave</title>
<meta name="author" content="Aurélien DEHAY" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
</head>
<body>
<c:forEach select="#{record}">
<h1>-= #{login} =-</h1>
<p>-= #{id} =-</p>
</c:forEach>
</body>
</html>
The #{login} and #{id} are not set to the corresponding values. It only
works when I put the following thing:
<foo bar="#{login}" booh="#{id}"/> (i.e. the #{} are replace only when
they are in a attribute).
I've tried to put a jx:out value="#{login}", which doesn't work either.
I'm using cocoon 2.1.6 on a Tomcat 5.0.28.
I someone could give me hints about this problem....
Rgds.
--
Aurélien
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Forms in Cocoon
Posted by javascript <ja...@tin.it>.
I'm working on a page with form that update a database (Xindice).
The job is simple, but i'm working a lot because the forms, the
database, and the flow are various. I'm trying a lot this database and
that other, this esql solution and the native database, tha cform and
soon and soon...
Can anything send me any suggestions? What is the better way? What is
the better solution in form's management?
Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Database in flow/problem with jxpath
Posted by Aurélien DEHAY <ad...@zorel.org>.
Aurélien DEHAY wrote:
For example, the following jxpath file (passed throught jx generator):
<c:forEach select="#{record}">
<h1>-= <c:out value="#{./login}"/> =-</h1>
<p>-= #{./id} =-</p>
<p>-= ${password} =-</p>
<machin truc="#{login}" plop="#{id}"/>
</c:forEach>
generates things like:
<h1>-= =-</h1>
<p>-= =-</p>
<p>-= =- </p>
<machin truc="anonymous" plop="1"/>
<h1>-= =-</h1>
<p>-= =-</p>
<p>-= =- </p>
<machin truc="z" plop="2"/>
<h1>-= =-</h1>
<p>-= =-</p>
<p>-= =- </p>
<machin truc="s" plop="3"/>
The #{./id}, ${password}, jx:out, (or even #{id} as tested before), are
not substitued.
Rgds.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Database in flow/problem with jxpath
Posted by Aurélien DEHAY <ad...@zorel.org>.
Laurent Perez wrote:
>> <h1>-= #{login} =-</h1>
>> <p>-= #{id} =-</p>
>
>
> try #{./login} and #{./id}, unless I misunderstand you :).
>
Hi. I've tried this already, without success. Tryied with varStatus
attribute to forEach, without any success. Keep trying and searching the
net without any success yet.
Rgds.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Database in flow/problem with jxpath
Posted by Laurent Perez <ha...@gmail.com>.
> <h1>-= #{login} =-</h1>
> <p>-= #{id} =-</p>
try #{./login} and #{./id}, unless I misunderstand you :).
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org