Hello Everybody!
Thank u very much for your answer Joerg, i think i understand (somewhat)
whats going on there. But i can't get it to work and don't know whats wrong.
Do i need nothing else but the <map:transform
src="resources/forms-samples-styling.xsl"/> command plus the rescources
folder and the styling tags like <fi:styling type="tabs"/> and such to make
it work?
On my maschine it doesn't. I also copied the ecamples from defiition and
templates and tried my (changed) pipline. The form got displayed but the
Tabs wont get displayed. Just their labal as plane text. The source file of
the browser shows that the styling is applied:
(Note that the Form elements and Labels also get displayed correctly but not
the Tabs)
NOT COMPLETE (out of "view scource" on browser):
-------------------------------------------------------
<!-- group with tabs. Each of the children of <items> will constitute a tab
-->
<div title="" id="N1001A">
<input value="0" name="tab-state" type="hidden">
<div class="forms-tabArea">
<span onclick="forms_showTab('N1001A', 0, 3, 'tab-state')" id="N1001A_tab_0"
class="forms-tab forms-activeTab">String fields</span><span
onclick="forms_showTab('N1001A', 1, 3, 'tab-state')" id="N1001A_tab_1"
class="forms-tab">Number fields</span><span onclick="forms_showTab('N1001A',
2, 3, 'tab-state')" id="N1001A_tab_2" class="forms-tab">Boolean
fields</span>
</div>
<div id="N1001A_items_0" class="forms-tabContent">
<div title="">
<table summary="" border="0">
<tbody>
<tr>
<td><label title="" for="email">Enter an <b>email</b>
address:</label></td><td><input type="text" title="" value="" id="email"
name="email"><span class="forms-field-required"> * </span>
<div style="visibility:hidden; position:absolute;" id="helpN10042"
class="forms-help">
An email address must be in <i>[EMAIL PROTECTED]</i> format.
<br>
...
----------------
But as i said there are no Tabs just their labels as plane Text. My form
definition and template shoule be okay since i copied them from the samples
and changed the action attribut and their names. And here is my Sitemap:
------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
<map:flow language="javascript">
<map:script src="registration.js"/>
</map:flow>
<map:pipelines>
<map:pipeline>
<map:match pattern="">
<map:call function="registration"/>
</map:match>
<map:match pattern="*.continue">
<map:call continuation="{1}"/>
</map:match>
<map:match pattern="registration-display-pipeline">
<map:generate src="template.xml"/>
<map:transform type="forms"/>
<map:transform src="resources/forms-samples-styling.xsl"/>
<map:serialize/>
</map:match>
<map:match pattern="registration-success-pipeline">
<map:generate type="jx" src="registration_success.jx"/>
<map:transform src="xml_2_xhtml.xsl"/>
<map:serialize type="xhtml"/>
</map:match>
</map:pipeline>
</map:pipelines>
</map:sitemap>
-------------------------
My Flowscript is really simple like this
(some Model and bizdata stuff i deleted because that works for shure):
-------------------------
cocoon.load("resource://org/apache/cocoon/forms/flow/javascript/Form.js");
function registration() {
var form = new Form("form.xml");
form.showForm("registration-display-pipeline");
cocoon.sendPage("registration-success-pipeline");
}
-----------------------
Again I am using the exact same rescources Folder as the Samples because i
copied it. What have I done wrong? Is there example out there with just this
tab feature and less other stuff wich would be easier to understand?
Thank you very much again!
Regards,
Philipp
> On 24.09.2004 13:52, Philipp Rech wrote:
>
> > How can I create the tabs? How does <fi:styling type="tabs"/> works?
> Does it
> > create the tabs just through the form-samples-styling.xsl (or one of the
> > other xsl files in rescources)? The Blocks Sample page works with
> Actions
> > (another with Flowscript) are the Actions creating the Tabs?
>
> No, the action have nothing to do with it (separation of concerns ;-) ).
>
> > All I could find out that is the Form Definition of the Sample has this:
> >
> > <fd:widgets>
> > <fd:field id="tab-state">
> > <fd:datatype base="string"/>
> > </fd:field>
>
> This is just for the correct re-selecting of a tab on re-displaying the
> form, so more a usability feature.
>
> > An the Form Template has this:
> >
> > <!-- group with tabs. Each of
> > the children of <items> will constitute a tab -->
> >
> > <fi:group>
> > <fi:styling type="tabs"/>
> > <fi:label>Choose a panel: </fi:label>
> > <fi:state>
> > <ft:widget id="tab-state"/>
> > </fi:state>
>
> This is the important one. Each fi:items/* becomes a tab.
>
>
> > How does this work? Thanks a lot for any help and ideas!!!
> > if i create one on my own i dont get an error but also the tabs
> > are not there just an output like "String fieldsNumber fieldsBoolean
> fields
> > " on the screen/browser.
>
> It's done in one of the stylesheets as you already guessed above. It's
> forms-page-styling.xsl:
>
http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/blocks/forms/samples/resources/forms-page-styling.xsl?annotate=1.5#42
>
> Joerg
>
> ---------------------------------------------------------------------
> 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]