Thanks for replying so soon. ^^
I'm using wicket-1.2.3.
I used to use getInput to get userInput of "Textfield", but this time I had
to transform input to another format, so I wanted to override getInput().
However, I saw the comments in the wicket source codes, which said anyone
who want to override this method should overwrite getInputAsArray() instead.
So I did that, and the bug happened.
I think this may be a strange problem and hard to reproduce, so I use
another way for avoiding this bug to achieve my goal.
Thanks for help again. :)
JFC Hsieh
----- Original Message -----
From: "Eelco Hillenius" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, April 05, 2007 8:26 AM
Subject: Re: [Wicket-user] something strange
aboutFormComponent.getInputAsArray()
Which version are you using? And why wouldn't you be using models and
components rather then getInputAsArray, which is basically a framework
function?
Eelco
On 4/2/07, JFC <[EMAIL PROTECTED]> wrote:
>
>
> Sorry to bother, but I found a strange thing, I don't know if I
> misunderstand the usage of "getInputAsArray()". Here is my case:
>
>
> HTML code:
>
> <!-- -->
> <tr>
> <td class=td-field01>
> Ims Ports
> </td>
> <td class=tb-bgcolor>
> <input type="text" wicket:id="gbeTMSImsPortmap" value="abc">
> </td>
> </tr>
>
> JAVA Code:
>
> public String[] getInputAsArray()//This, Usually is size==1. Only when
> multiple choices.
> {
> String[] ans = super.getInputAsArray();
> if(ans != null)
> {
> String temp = ans[0];
> ans[0] = String.valueOf(codingUtil.encodeToInteger(temp));
> //ans[0] = String.valueOf(codingUtil.encodeToInteger(ans[0]));
> }
> return ans;
> }
>
> ------------------------------
>
> When I input "4-5" in the html form, I got "0" from
> "super.getInputAsArray()"
> But if I change JAVA codes to
>
> public String[] getInputAsArray()//This, Usually is size==1. Only when
> multiple choices.
> {
> String[] ans = super.getInputAsArray();
> if(ans != null)
> {
> //ans[0] = String.valueOf(codingUtil.encodeToInteger(ans[0]));
> }
> return ans;
> }
>
> I could got the correct value "4-5". I tried it twice. Could anybody help
> me
> about this? Thanks a lot !!
>
>
>
> by: JFC
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
--------------------------------------------------------------------------------
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
--------------------------------------------------------------------------------
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user