great, thx
| public void printFoo(){
| if(this.getInstance() != null){
| System.out.println(this.getInstance().getName());
| } else{
| System.out.println("no instance");
| }
| }
works fine.
View the or
Access instance through the getter.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4094776#4094776
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4094776
___
jboss-user mailing
Ugh, my bad. I was wrong and confused this with something else (mostly the
@Create page param problem). Of course you can call a page action and the
entity instance should be available in that page action if its identifier is
set as a page parameter.
No idea why it doesn't work in that particul
I'm confused. Doesn't seam gen create edit pages with a wire() page action
which calls getInstance()?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4094746#4094746
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=40947
I don't know what you want to do, because obviously printing something on the
console is not a regular case. You can call getInstance() _after_ the @Create
method and _after_ the page action.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4094698#4094698
Repl
OK,
anonymous wrote : there is no obvious solution except not calling getInstance()
that early
what would be a good way to call it "later"? SeamRemote and a JavaScript to
call the Method from the page once it's redered might be one way, but it sounds
like quite some work compared to the page ac
That is currently not doable with the entity framework in Seam and something I
recently discussed with Gavin. You can't call getInstance() in either a page
action or an @Create method, the identifier binding will happen afterwards (if
it's a page parameter).
Really, there is no obvious solution
Here comes some code... I hope somebody can give me a hint
Here is the entity:
@Entity
| public class Foo implements Serializable {
|
| //seam-gen attributes (you should probably edit these)
| private Long id;
| private Integer version;
| private String name;
|
"christian_zeidler" wrote : I cannot access the Home object before the view is
rendered.
Why not? I think you should be able to.
It'd be a good idea to post some code.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093771#4093771
Reply to the post :
http: