Child pages
  • Adding a Normal WOComponent Page to an ERModernLook-based application

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

What is your name?<wo:WOTextField value = 

Wiki Markup
"\[WO:username\]"
/>

<wo:WOSubmitButton action=

Wiki Markup
"\[WO:fixUsername\]"
/>

</wo:WOForm>

<wo:WOConditional condition = 

Wiki Markup
"\[WO:usernameExtended\]"
>

Hello <wo:WOString value = 

Wiki Markup
"\[WO:userNameExtended\]"
/>

</wo:WOConditional>

...

aPage.setUserNameExtended(extendedUserName);

return aPage;{color:#333333}}

public String username() {

return username;{color:#333333}} 

public void setUsername(String username) {

this.username = username;{color:#333333}} 

public String userNameExtended() {

return userNameExtended;

{color:#333333}} 

public void setUserNameExtended(String userNameExtended) {

this.userNameExtended = userNameExtended;{color:#333333}}

 }

========================

...

nextPage = (HelloWorld)  myApp().pageWithName(HelloWorld.class.getName(),session().context());

return nextPage;

{color:#333333}}

We still are getting errors:

...

What is your name?<wo:WOTextField value = 

Wiki Markup
"\[WO:username\]"
/>

<wo:WOSubmitButton action=

Wiki Markup
"\[WO:fixUserName\]"
/>

</wo:WOForm>

<wo:WOConditional condition = 

Wiki Markup
"\[WO:userNameExtended\]"
>

Hello <wo:WOString value = 

Wiki Markup
"\[WO:userNameExtended\]"
/>

</wo:WOConditional>

...

Wiki Markup
Apr 19 17:20:52 PSTennisExtended\[WO:54682\] WARN&nbsp; NSLog&nbsp; - <com.webobjects.appserver._private.WOComponentRequestHandler>: Exception occurred while handling request:

...

Wiki Markup
The reason that you get this error is because every DirectToWebpage should have an entity, and a task. And you have to make sure that the templateNameFor\[WO:task\]Page for that task points to your component:

Wiki Markup
pageConfiguration = 'HelloWorld' => entity = "Contacten" \[WO:com.webobjects.directtoweb.EntityAssignment\]

Wiki Markup
pageConfiguration = 'HelloWorld' => task = "inspect" \[WO:com.webobjects.directtoweb.Assignment\]

Wiki Markup
pageConfiguration = 'HelloWorld' => templateNameForInspectPage = "HelloWorld" \[WO:com.webobjects.directtoweb.Assignment\]

...

Wiki Markup
pageConfiguration = 'HelloWorld' => navigationState = "HelloWorld" \[WO:com.webobjects.directtoweb.Assignment\]

...

aPage.setUserNameExtended(extendedUserName);

return aPage;{color:#333333}}

public String username() {

return username;{color:#333333}}

public void setUsername(String username) {

this.username = username;{color:#333333}}

public String userNameExtended() {

return userNameExtended;

{color:#333333}}

public void setUserNameExtended(String userNameExtended) {

this.userNameExtended = userNameExtended;

{color:#333333}}

 

HelloWorld.wo:

<wo:PageWrapper>

...

What is your name?<wo:WOTextField value = 

Wiki Markup
"\[WO:username\]"
/>

<wo:WOSubmitButton action=

Wiki Markup
"\[WO:fixUserName\]"
/>

</wo:WOForm>

<wo:WOConditional condition = 

Wiki Markup
"\[WO:userNameExtended\]"
>

Hello <wo:WOString value = 

Wiki Markup
"\[WO:userNameExtended\]"
/>

</wo:WOConditional>

...

Wiki Markup
pageConfiguration = 'HelloWorld' => entity = "Contacten" \[WO:com.webobjects.directtoweb.EntityAssignment\]

Wiki Markup
pageConfiguration = 'HelloWorld' => task = "inspect" \[WO:com.webobjects.directtoweb.Assignment\]

Wiki Markup
pageConfiguration = 'HelloWorld' => templateNameForInspectPage = "HelloWorld" \[WO:com.webobjects.directtoweb.Assignment\]

Wiki Markup
pageConfiguration = 'HelloWorld' => navigationState = "HelloWorld" \[WO:com.webobjects.directtoweb.Assignment\]

...