Hmmm it isn't working ... I inject the ArticleList page and tried
with your suggestion but the error is still here:
Unable to update OGNL expression '<parsed OGNL expression>' of
[EMAIL PROTECTED] to aaaaaaa: target is null for
setProperty(null, "body", aaaaaaa)
It's very strange because my article is set before entering the
articleedit page and his fields are display correctly in the edit
page, then I submit the form:
<form jwcid="@Form" success="listener:doSubmit">
<table>
<tr>
<th>Body</th>
<td>
<textarea jwcid="@TextArea" value="ognl:article.body" rows="10"
cols="40"/>
</td>
</tr>
</table>
<input type="submit" value="Confirm"/>
</form>
In the java page I have this method:
public IPage doSubmit() {
System.out.println("...doSubmit()...");
try {
getSession().getDataContext().commitChanges();
System.out.println("Article saved!");
} catch (Exception e) {
System.out.println(e);
return this;
}
return getArticleListPage();
}
I tried also putting some debug text in the doSubmit method but
nothing is displayed... so I assume the method gets never called!
Obviously I'm injecting the session state and the ArticleListPage...
it seems a simple page...
Thanks again
Il giorno 28/mar/06, alle ore 18:27, Mike Snare ha scritto:
Assuming that you are injecting the ArticleEditPage, try:
ArticleEdit ap = getArticleEditPage();
ap.setArticle(a);
return ap;
I don't think the call to getArticleEditPage() is guaranteed to return
the same instance every time if it's injected. Thus your 2 calls to
it return 2 different objects.
If you're not injecting the page but are instead creating it in the
method (and caching for later calls) then I'm not sure what the issue
could be.
-Mike
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]