Thank you VERY much.  That works like a champ... except I keep getting
an exception in the log, though it doesn't affect the UI.  Here's the
way I ran with your suggestions.  First, the tml:

    <t:beaneditform t:id="beanEditForm" object="propertiesBean"
submitlabel="message:save-label">
      <t:parameter name="type">
        <t:label for="type"/>
        <t:select t:id="type" value="propertiesBean.type"
                  t:mixins="t5components/OnEvent" event="change"
onCompleteCallback="typeChanged"/>
      </t:parameter>
      <t:parameter name="port">
        <t:label for="port"/>
        <t:textfield t:id="port" value="propertiesBean.port"/>
      </t:parameter>
    </t:beaneditform>

    <script type="text/javascript">
      function typeChanged(response) {
        $('port').value = response;
      }
    </script>

Next, the page java:

    StreamResponse onChangeFromType(String typeName) {
        DatabaseType type = DatabaseType.valueOf(typeName);
        return new TextStreamResponse("text/plain",
String.valueOf(type.getDefaultPort()));
    }

And lastly, the exception:

java.io.IOException: The filename, directory name, or volume label
syntax is incorrect
        at java.io.WinNTFileSystem.canonicalize0(Native Method)
        at java.io.Win32FileSystem.canonicalize(Win32FileSystem.java:395)
        at java.io.File.getCanonicalPath(File.java:531)
        at org.mortbay.util.FileResource.getAlias(FileResource.java:176)
        at org.mortbay.http.ResourceCache.getResource(ResourceCache.java:251)
        at org.mortbay.http.HttpContext.getResource(HttpContext.java:2118)
        at 
org.mortbay.jetty.servlet.WebApplicationContext.getResource(WebApplicationContext.java:785)
        at 
org.mortbay.jetty.servlet.ServletHandler.getResource(ServletHandler.java:735)
        at 
org.mortbay.jetty.servlet.ServletHandler$Context.getResource(ServletHandler.java:1082)
        at 
org.apache.tapestry.internal.services.ContextImpl.getResource(ContextImpl.java:43)
        at $Context_119abd0bad3.getResource($Context_119abd0bad3.java)
        at $Context_119abd0ba6e.getResource($Context_119abd0ba6e.java)
        at 
org.apache.tapestry.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:56)
        at $RequestHandler_119abd0ba72.service($RequestHandler_119abd0ba72.java)
        at 
nu.localhost.tapestry.acegi.services.internal.RequestFilterWrapper$1.doFilter(RequestFilterWrapper.java:60)
        at 
nu.localhost.tapestry.acegi.services.internal.AcegiExceptionTranslationFilter.doFilter(AcegiExceptionTranslationFilter.java:67)
        at 
nu.localhost.tapestry.acegi.services.internal.RequestFilterWrapper.service(RequestFilterWrapper.java:54)

with lots more frames below.  Using the debugger, I find that Jetty is
getting a request for a URL that looks like this:

/myapp/admin/database.type:change/MYSQL_5

which it's passing to File.getCanonicalPath as this:

C:\ResearchWorkspace\myapp-tapestry5\src\main\webapp\admin\database.type:change\MYSQL_5

which it doesn't like.  Any ideas?  MYSQL_5 is, of course, a value for
my database-type enum.

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

Reply via email to