Christofer Dutz | 1 Jun 02:27 2005
Picon

[CForms and JX] Access cform repeater fields using jx

Hi,

I would like to claculate a total-price for a small shoping cart and am 
trying to figure out how to do this. There are two possible ways I 
thought about:
1. I put some <jx:set name="total" value="${total + 
productTotalWidgetValue}"/> somewhere inside the repeater itself.
2. I have some sort of <jx:forEach ...> stuff that iteratas through all 
Items outside the repeater.

Unfortunately I couldn't get any help from the examples, so I need some 
help :)

Thanks in advance,
    Chris
sheep | 1 Jun 05:38 2005
Picon

maven + cactus problem (Missing Cactus property [cactus.contextURL] but I have set cactus.contextURL in cactus.properties)

hi.
   I have a problem when i do a servlet test anybody who can help me.
//---------------------------------------------------------------------------------------------
   maven+cactus do servlet test.but it always report miss cactus.contextURL.I put
cactus.contextURL=http://localhost:8080/test in cactus.properties and 
System.setProperty("cactus.contextURL",http://localhost:8080/test); in Test***() method but it
seem no work.what place should i placed this property. :( maybe i can put cactus.properties to other palce ?

//-------------------------------------------------error message--------------------------------------------------------------
Testsuite: servlet.TestAdminServlet
Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.801 sec

Testcase: testGetCommandOK(servlet.TestAdminServlet): Caused an ERROR
Missing Cactus property [cactus.contextURL]
org.apache.cactus.util.ChainedRuntimeException: Missing Cactus property [cactus.contextURL]
 at org.apache.cactus.internal.configuration.BaseConfiguration.getContextURL(BaseConfiguration.java:59)
 at org.apache.cactus.internal.configuration.AbstractWebConfiguration.getRedirectorURL_aroundBody0(AbstractWebConfiguration.java:46)
 at org.apache.cactus.internal.configuration.AbstractWebConfiguration.getRedirectorURL_aroundBody1$advice(AbstractWebConfiguration.java:306)
 at org.apache.cactus.internal.configuration.AbstractWebConfiguration.getRedirectorURL(AbstractWebConfiguration.java)
 at org.apache.cactus.internal.client.connector.http.DefaultHttpClient.callRunTest(DefaultHttpClient.java:159)
 at org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody0(DefaultHttpClient.java:80)
 at org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody1$advice(DefaultHttpClient.java:306)
 at org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest(DefaultHttpClient.java)
 at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runWebTest(HttpProtocolHandler.java:159)
 at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest_aroundBody0(HttpProtocolHandler.java:80)
 at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest_aroundBody1$advice(HttpProtocolHandler.java:306)
 at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest(HttpProtocolHandler.java)
 at org.apache.cactus.internal.client.ClientTestCaseCaller.runTest(ClientTestCaseCaller.java:144)
 at org.apache.cactus.internal.AbstractCactusTestCase.runBareClient(AbstractCactusTestCase.java:215)
 at org.apache.cactus.internal.AbstractCactusTestCase.runBare(AbstractCactusTestCase.java:133)
(Continue reading)

Sebastien Arbogast | 1 Jun 06:42 2005
Picon

Re: Cocon and WebServices

2005/5/31, Jan Hinzmann <jan <at> geeksonly.de>:
> The Axisblock doubled my code, so I came up with a
> "plain-cocoon-soap-webservice"
> 
> The Axis-Block is just a kind of Proxy.
> 
> Sorry for the short answer.

Actually I could really use a more detailed answer if you had time
because I really need to figure out how to expose webservices through
Cocoon and I don't manage to understand your article on the Wiki.
Would it be possible for you to write a small sample, a very simple
Cocoon application that just exposes your echo webservice so that one
can just test it through XMLSpy SOAP request for example, and then
build something more sophisticated on top of that.
I know it can represent a bit of work for you but as you seem to be
the most advanced on this subject, I can do nothing but to place all
my faith in you ;-)

Thx in advance.
Cheers.
--

-- 
Sebastien ARBOGAST
Reinhard Haller | 1 Jun 07:34 2005
Picon

Status JTidy

Hi,

I had a strange error regarding the encoding of the xml serializer
using the following pipeline:

<map:match pattern="cwx.xhtml">
   <map:generate type="html-utf-8"
src="http://www.computerwoche.de/index.cfm?pageid=254&amp;type=detail&amp;artid=74090&amp;linktype=rss&amp;category=318"
/>
   <map:serialize type="xml"/>
</map:match>

It turned out JTidy produced invalid XML output and the
serializer refused to convert the encoding from utf-8 to iso-8859-1.
All this occurred without error messages (JTidy issued a lot 
of warnings).

JTidy as Tidy is not able to mask out script areas with offending
characters not enclosed in HTML comment as Browsers do:

<SCRIPT>
var adrandno=Math.floor(Math.random()*100);
document.write('<scr'+'ipt language="JavaScript1.1"
src="http://ad.de.doubleclick.net/adj/cowo.de/knowledge/it_security/bigsky;abr=!webtv;sz=160x800;ord='+adrandno+'?"><\/scr'+'ipt>');
	if ((!document.images &&
navigator.userAgent.indexOf('Mozilla/2.') >= 0)  ||
navigator.userAgent.indexOf("WebTV")>= 0) {
		document.write('<a
HREF="http://ad.de.doubleclick.net/jump/cowo.de/knowledge/it_security/bigsky;sz=160x800;ord='+adrandno+'?"
>');
(Continue reading)

Bart Molenkamp | 1 Jun 07:45 2005
Picon

RE: [cforms] Alert is not defined

Hi Dennis,

Use cocoon.log for logging. E.g.

if (cocoon.log.isDebugEnabled()) {
  cocoon.log.debug("my message");
}

More info is here:
http://cocoon.apache.org/2.1/userdocs/flow/api.html#log

You can configure logging in WEB-INF/logkit.xconf, but I couldn't find
any documentation on that (although I'm sure there is).

Bart.

> -----Oorspronkelijk bericht-----
> Van: dennis_riedel <at> web.de [mailto:dennis_riedel <at> web.de]
> Verzonden: dinsdag 31 mei 2005 13:39
> Aan: users <at> cocoon.apache.org
> Onderwerp: Re: [cforms] Alert is not defined
> 
> Thx to Bart for this introduction!
> Yes, print() is not suitable. I used it for debug purposes.
> Can I use Logger for debugging in Flowscript?
> 
> Greez
> Dennis
> 
> ---------------------------------------------------------------------
(Continue reading)

Upayavira | 1 Jun 08:10 2005
Picon

Re: Status JTidy

You can use nekohtml instead of jtidy. It is built in to the HTML 
serializer. See the org.apache.cocoon.generators.NekoHTMLGenerator in 
the HTML block.

Regards, Upayavira

Reinhard Haller wrote:
> Hi,
> 
> I had a strange error regarding the encoding of the xml serializer
> using the following pipeline:
> 
> <map:match pattern="cwx.xhtml">
>    <map:generate type="html-utf-8"
> src="http://www.computerwoche.de/index.cfm?pageid=254&amp;type=detail&amp;artid=74090&amp;linktype=rss&amp;category=318"
> />
>    <map:serialize type="xml"/>
> </map:match>
> 
> It turned out JTidy produced invalid XML output and the
> serializer refused to convert the encoding from utf-8 to iso-8859-1.
> All this occurred without error messages (JTidy issued a lot 
> of warnings).
> 
> JTidy as Tidy is not able to mask out script areas with offending
> characters not enclosed in HTML comment as Browsers do:
> 
> <SCRIPT>
> var adrandno=Math.floor(Math.random()*100);
> document.write('<scr'+'ipt language="JavaScript1.1"
(Continue reading)

Thorsten Scherler | 1 Jun 09:30 2005
Picon

Re: CForm repeater binding deletes prior elements

On Tue, 2005-05-31 at 23:01 +0200, Christofer Dutz wrote:
> As I was just testing a little with the simple-repeater I stumbled over 
> an optional parameter "clear-before-load". Default is set to true, but 
> you could try if seting it to false helps.

> Chris
> 

Cheers Chris,

I tried that but it did not change that behavior. I guess Joachim is
right. :(

On Tue, 2005-05-31 at 17:20 +0200, Joachim Breitsprecher wrote:
> The doSave method of 
> org.apache.cocoon.forms.binding.SimpleRepeaterJXPathBinding contains 
> these lines:
> 
> > // Delete all that is already present
> > repeaterContext.removeAll(this.rowPath);
> 
> So I guess the answer to your first question is: "You cannot" :-
> 

I ended up refactoring the whole design. ;-)

Thx for the tip.

salu2

(Continue reading)

Thorsten Scherler | 1 Jun 09:48 2005
Picon

Re: [CForms and JX] Access cform repeater fields using jx

 to claculate a total-price for a small shoping cart and am 
> trying to figure out how to do this. There are two possible ways I 
> thought about:
> 1. I put some <jx:set name="total" value="${total + 
> productTotalWidgetValue}"/> somewhere inside the repeater itself.
> 2. I have some sort of <jx:forEach ...> stuff that iteratas through all 
> Items outside the repeater.
> 
> Unfortunately I couldn't get any help from the examples, so I need some 
> help :)
> 
> Thanks in advance,
>     Chris
> 

Hi Christofer,

have a look in the dynamicrepeater.xml example.

Maybe something like the following:

<fd:output id="totalPriceProducts">
   <fd:label>Gesamtpreis aller Produkte:</fd:label>
   <fd:datatype base="string"/>
</fd:output>

<fd:repeater-action id="addpage" command="add-row" repeater="pages">
      <fd:label>Seite hinzuf├╝gen</fd:label>
      <fd:on-action>
        <fd:javascript>
(Continue reading)

Messing, Elad | 1 Jun 12:01 2005
Picon

AW: Re: CFORMS - Performing a Form level validation

Thank you Sylvain ! Exactly what I needed.

Elad

-----Urspr├╝ngliche Nachricht-----
Von: Sylvain Wallez [mailto:sylvain <at> apache.org] 
Gesendet: Dienstag, 31. Mai 2005 21:08
An: users <at> cocoon.apache.org
Betreff: Re: CFORMS - Performing a Form level validation

Messing, Elad wrote:

> Hi all
>         I tried looking for a "definition" text on the preferred way 
> of performing a Form level validation.
>         What I mean is that I need to perform validation that is 
> relevant to the Form -not to specific widget. I.E. - I have a form 
> with 2 widgets, and I need to check that either 1 of them has a value 
> in it.
>
>         So - I know I can have a validation in one of the widgets, and 
> in it write some javascript to check the other as well, and then 
> output the error to a "fi:validation-errors" tag - to show it in a 
> central place.
>
>         But this seems like a work around rather than a real plan..
>

You can add a <fd:validation> on any widget, including a form. But not every widget can hold validation
errors, as not every widget has a visual representation.
(Continue reading)

Nicole Erbe | 1 Jun 13:10 2005
Picon

Exception handling in sitemap

Hi everyone,

I'm trying to handle the following error with an exception selector in
cocoon sitemap.

I get the following error:

Exception in ServerPagesGenerator.generate()

org.apache.cocoon.ProcessingException: Exception in
ServerPagesGenerator.generate(): java.lang.NullPointerException

cause: java.lang.NullPointerException

I get this exception if a request with an invalid date stamp (i.e.
30.02.2004) is passed through a postgresql database and the returned
value is simply "null".
The easiest way might be to show the user of the related application
an error page (i.e. "invalid input values"). So I don't have to change
every concerning xsp and java file (belonging to a system which get's
test data and delivers xml/pdf etc.). This could be done via exception
handling in the cocoon sitemap as far as I got the functionality
right.

In the sitemap I added the following selector:

<map:selectors default="browser">
     <map:selector name="exception"
src="org.apache.cocoon.selection.ExceptionSelector">
            <exception class="java.lang.NullPointerException"
(Continue reading)


Gmane