I didn't really answer your question though, did I :-). If printing the username in helloAction and setUser (like Jean Pierre suggested) yields no suspicious results, you might want to check if the Details.wo/Details.html is correctly located in your Components folder. Try adding some content directly to the template and see if it renders. If WO can't find a component template, it will happily fail with a little log message that's easy to miss and render an empty page.
Cheers, - hugi On 11.3.2013, at 11:15, Hugi Thordarson <[email protected]> wrote: > Hi Miryala. > > Your code looks fine, assuming the rest of it is correct. It's a little old > style though, see example below for a nicer, type safe version. This assumes > you're using Wonder, which you probably are judging from the syntax in your > template. If you're not—well, there's your problem. > And if you're using inline syntax, you don't need a .wod file unless you > specifically want it for declaring particularly complex elements (you can mix > and match inline and wod-style syntax in components). > > // DirectAction.java > public WOActionResults helloAction() { > String username = request().stringFormValueForKey( "username" ); > Details nextPage = pageWithName( Details.class ); > nextPage.setUsername( username ); > return nextPage; > } > > Cheers, > - hugi > > > // Hugi Thordarson > // http://www.godurkodi.is > > > > On 11.3.2013, at 10:27, miriyala srinivas <[email protected]> wrote: > >> Hi All, >> I am completely new to WO.Here I am trying to pass user entered >> values from one html page to another html.I have retrieved user >> entered values in DirectAction class and I am setting retrieved values >> to another page using takeValueForKey() method and i am returning the >> page,but values are not getting populated to html page.I tried >> printing WOComponent Page,there its saying subComponents are null >> eventhough I set value to the page,can you guys help me Please.Code is >> below >> >> >> DirectAction.java >> public WOComponent helloAction() { >> >> //retrieving username,password values from request >> >> //get the page and set the value to the key >> WOComponent nextPage = pageWithName("Details"); >> nextPage.takeValueForKey(username,"username"); >> return nextPage; >> >> } >> >> Details.java >> public class Details extends WOComponent { >> >> private String username; >> >> //getter and setters >> >> } >> >> I am not sure Details.html file is correct >> Details.html >> <wo:str value="$username"/> >> >> and I am also not sure whether wod file is required for this.Please >> Help in this. >> _______________________________________________ >> Do not post admin requests to the list. They will be ignored. >> Webobjects-dev mailing list ([email protected]) >> Help/Unsubscribe/Update your Subscription: >> https://lists.apple.com/mailman/options/webobjects-dev/hugi%40karlmenn.is >> >> This email sent to [email protected] > > > _______________________________________________ > Do not post admin requests to the list. They will be ignored. > Webobjects-dev mailing list ([email protected]) > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/webobjects-dev/hugi%40karlmenn.is > > This email sent to [email protected] _______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [email protected]
