[jboss-user] [JBoss Seam] - Re: Nested Conversations (tricky interceptor)

2007-10-23 Thread denis-karpov
anonymous wrote : Entities references in conversational components are moved 
from the object to the conversation at the end of a request and are repopulated 
in the object at the beginning of the next request.
As I understand not a request, but method invocation.

I can tell you where is the problem.
Suppose that we have component AA in parent conversation with a field reference 
bb to an another component Q. At some point this reference is moved to 
conversation context with the name "AA.bb". 
Then we start nested conversation. We can still access field bb in the nested 
conversation, because in the time of invocation it gets reference from the 
parent conversation and put it inside the component.
Then we change the reference of the field. And at the end of an invocation seam 
moves the reference to the conversation context (nested)
Then we end the nested conversation. And try to access field bb in the parent 
conversation. Seam restores a reference from context (parent). And we get the 
old value.



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4097725#4097725

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4097725
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Nested Conversations (tricky interceptor)

2007-10-22 Thread denis-karpov
>From the first look my question seems to be trivial, but it is not.

How to return some information form the nested conversation to the parent 
conversation?
In docs there is line:anonymous wrote : A nested conversation has its own 
conversation context, and also has read-only access to the context of the outer 
conversation. (It can read the outer conversation's context variables, but not 
write to them.)
I always thought this as that I can't change the Map of the parent context 
variables, but I can change the state of any object in parent conversation 
context. And everything works as expected till Seam 2.x.

After Seam2 there was strange behavior all around in my application. Some 
fields of some objects unexpectedly becomes nulls or old values. After 
examining this situation I have found this interceptor 
ManagedEntityIdentityInterceptor. With this interceptor I have problems with 
changing state of objects in the parent conversation context. 
Is it intended behavior or a bug?
If it is intended then how to transmit parameters to the parent conversation in 
Seam 2.x?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4097519#4097519

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4097519
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: HTML source codes has some characters like

2007-10-11 Thread denis-karpov
Your box  chicochen on hotmail.com doesn't accept my message.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4094142#4094142

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4094142
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: HTML source codes has some characters like

2007-10-11 Thread denis-karpov
It is always the problem for non-english speaking people. 
In this case problem is in JSF RI.

We have patch it for us just yesterday.

com/sun/faces/util/HtmlUtils.java
 /**
  |  * Writes a character as a decimal escape.  Hex escapes are smaller than
  |  * the decimal version, but Netscape didn't support hex escapes until
  |  * 4.7.4.
  |  */
  | static private void _writeDecRef(Writer out, char ch) throws 
IOException {
  | if (ch == '\u20ac') {
  | out.write("?");
  | return;
  | }
  |  else {
  | out.write(ch);
  | return;
  |  }
  | /*out.write("&#");
  | // Formerly used String.valueOf().  This version tests out
  | // about 40% faster in a microbenchmark (and on systems where GC is
  | // going gonzo, it should be even better)
  | int i = (int) ch;
  | if (i > 1) {
  | out.write('0' + (i / 1));
  | i = i % 1;
  | out.write('0' + (i / 1000));
  | i = i % 1000;
  | out.write('0' + (i / 100));
  | i = i % 100;
  | out.write('0' + (i / 10));
  | i = i % 10;
  | out.write('0' + i);
  | } else if (i > 1000) {
  | out.write('0' + (i / 1000));
  | i = i % 1000;
  | out.write('0' + (i / 100));
  | i = i % 100;
  | out.write('0' + (i / 10));
  | i = i % 10;
  | out.write('0' + i);
  | } else {
  | out.write('0' + (i / 100));
  | i = i % 100;
  | out.write('0' + (i / 10));
  | i = i % 10;
  | out.write('0' + i);
  | }
  | 
  | out.write(';');*/
  | }

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093921#4093921

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093921
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Discussion: FlushModeType.NONE ?

2007-09-27 Thread denis-karpov
Sorry that I didn't confirm my words. Right now I do not have sample.

As I remember when I go through a decision with drools. Even in "invalid" case, 
when I simply return to the edit page, flushing occurs any way .

  | 
  | buyWorkingMemory
  | 
  | #{exchOrdHome.instance}
  | #{facesMessages}
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4089325#4089325

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4089325
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Discussion: FlushModeType.NONE ?

2007-09-27 Thread denis-karpov
FlushModeType.MANUAL does not help in every case.
I have tired to struggle with flushing. The only sure way now is to evict 
objects from persistent context.

Session session = (Session) getEntityManager().getDelegate();
  | session.evict(obj);


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4089266#4089266

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4089266
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Seam2, Pageflow,

2007-08-30 Thread denis-karpov
Hmm... I use Netbeans and keep jboss-seam.jar where the doctor said :-) in the 
root of the ear.

I guess, it is incidental superfluous restriction. In this case it can be 
considered as a bug.
But it may have a deep reason.

It's interesting to see a father's comments.

Denis

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4079606#4079606

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4079606
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: JSF performance tips in Seam applications

2007-08-29 Thread denis-karpov
About double requests

I used for a long time the solution that I have proposed to Gavin
http://jira.jboss.org/jira/browse/JBSEAM-183
Gavin by some reasons did not accept it in to Seam. I did not catch exactly 
why. As I understand it concerns clustering. I do not know about clustering, 
but on single server it works reliably 100%.

Denis.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4079031#4079031

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4079031
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Seam2, Pageflow,

2007-08-28 Thread denis-karpov

  | 
  | 
  | 

If I start pageflow in this way, why am I forced to begin my pageflow from the 
 instead of ?

This code worked in Seam 1.2.1 and start complaining since Seam2.
java.lang.IllegalStateException: pageflow is not currently at a  or 
 node (note that pageflows that begin during the RENDER_RESPONSE 
phase should use  instead of )
If there is profound reason I shall surrender and accept it.

Denis.



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4078729#4078729

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4078729
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Nightly build (23.08.07) problem with samples

2007-08-24 Thread denis-karpov
Can someone help me?
I decide to try Seam 2.0 and took the nightly build (23.08.07)
And I had problems with migration.

Then I tried the famous booking sample. And it does not work for me.
I have checked, ajax4jsf-1.1.1.jar is inside 
jboss-seam-booking.jar/WEB-INF/lib. Why it can't find Java2Dresource?

Thanks,
Denis.

15:12:53,531 INFO  [EJB3Deployer] Deployed: 
file:/C:/javaprogs/new/jboss-4.2.1.GA/server/default/tmp/deploy/tmp25878jboss-seam-booking.ear-contents/jboss-seam.jar
  | 15:12:53,546 INFO  [TomcatDeployer] deploy, ctxPath=/seam-booking, 
warUrl=.../tmp/deploy/tmp25878jboss-seam-booking.ear-contents/jboss-seam-booking-exp.war/
  | 15:12:56,546 ERROR [Digester] Begin event threw error
  | java.lang.NoClassDefFoundError: 
org/ajax4jsf/framework/resource/Java2Dresource
  | at java.lang.ClassLoader.defineClass1(Native Method)
  | at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
  | at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
  | at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
  | at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
  | at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
  | at java.security.AccessController.doPrivileged(Native Method)
  | at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
  | at 
org.jboss.mx.loading.RepositoryClassLoader.findClassLocally(RepositoryClassLoader.java:675)
  | at 
org.jboss.mx.loading.RepositoryClassLoader.findClass(RepositoryClassLoader.java:655)
  | at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
  | at 
org.jboss.mx.loading.RepositoryClassLoader.loadClassLocally(RepositoryClassLoader.java:193)
  | at 
org.jboss.mx.loading.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:131)
  | at org.jboss.mx.loading.LoadMgr3.nextTask(LoadMgr3.java:399)
  | at 
org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:520)
  | at 
org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:408)
  | at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
  | at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
  | at java.lang.ClassLoader.defineClass1(Native Method)
  | at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
  | at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
  | at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
  | at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
  | at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
  | at java.security.AccessController.doPrivileged(Native Method)
  | at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
  | at 
org.jboss.mx.loading.RepositoryClassLoader.findClassLocally(RepositoryClassLoader.java:675)
  | at 
org.jboss.mx.loading.RepositoryClassLoader.findClass(RepositoryClassLoader.java:655)
  | at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
  | at 
org.jboss.mx.loading.RepositoryClassLoader.loadClassLocally(RepositoryClassLoader.java:193)
  | at 
org.jboss.mx.loading.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:131)
  | at org.jboss.mx.loading.LoadMgr3.nextTask(LoadMgr3.java:399)
  | at 
org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:520)
  | at 
org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:408)
  | at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
  | at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:580)
  | at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
  | at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1345)
  | at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
  | at 
org.apache.commons.digester.ObjectCreateRule.begin(ObjectCreateRule.java:204)
  | at org.apache.commons.digester.Rule.begin(Rule.java:152)
  | at 
org.apache.commons.digester.Digester.startElement(Digester.java:1286)
  | at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown 
Source)
  | at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown 
Source)
  | at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
 Source)
  | at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)
  | 
  | at org.apache.xerces.parsers.XML11Configuration.parse(Unknown 
Source)
  | at org.apache.xerces.parsers.XML11Configuration.parse(Unknown 
Source)
  | at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
  | at org.apache.xerc

[jboss-user] [JBoss Seam] - Re: Passing data between nested conversations

2007-08-09 Thread denis-karpov
anonymous wrote : the question is how to add this object to the parent scope?
It is the bad practice, to try to do this. Even if you hack this, Gavin will 
probably close this door in the next release ;-)

Why not to make a special container that hold the shared state?
And put this container to the parent context. Then you can change the state of 
this container from any nested conversation. Is it not enough?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4072393#4072393

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4072393
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Passing data between nested conversations

2007-08-09 Thread denis-karpov
>From the nested conversation you have access to the parent conversation scope. 
>You can't add or remove from the parent scope, but you can get a reference to 
>an any object and you can change the state of this object.

Next thing you can do. You can pass parameters when you start nested 
conversation.

For instance, to choose link object I use nested conversation (old one, because 
I use 1.2.1 version)

In this way I start nested conversation

  | 
  | 
  | 
  | 
  | 
  | 

In this way I return from nested to parent
public String select() {
  | if (binding==null){
  | throw new RuntimeException("Binding in reference can't be null");
  | }
  | Query r = getRef();
  | if ( r==null ){
  | throw new RuntimeException("Reference query can't be null");
  | }
  | Object o = r.getDataModel().getRowData();
  | 
  | // End conversation and redirect to parent
  | Conversation.instance().endAndRedirect(true);
  | // Returning selected value
  | 
Expressions.instance().createValueBinding("#{"+binding+"}").setValue(o);
  | return null;
  | }
  | 
  | public String cancel() {
  | Conversation.instance().endAndRedirect(true);
  | return null;
  | }
  | 

Actually, with composite pageflows everything has to be much simpler.
Denis.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4072354#4072354

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4072354
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: How bad is unused conversations?

2007-07-25 Thread denis-karpov
Yes it is very important question.

now we have:
begin - marks current not long running conversation to be long running.
end - marks current long running conversation to be not long running.
join - join existing conversation (now it fails if there is no long running 
conversation, as I remember. Gavin promised to fix it ;-)
nest - begins nested conversation
none - leave the current long running conversation

But what if I want to start a new conversation no matter where I am now? Either 
I am in long running conversation or in not long running.
Like in this situation with menu bar. When I click menu item I want to start 
clean new long running conversation. In more strict words, to leave current 
conversation, to start new one (before render) and to mark a new one as long 
running.

(I am not sure is it possible now to leave one and start another new 
conversation inside one request?)

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4067379#4067379

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4067379
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: s:validate in custom facelets tag

2007-07-24 Thread denis-karpov
I have seen in JIRA http://jira.jboss.org/jira/browse/JBSEAM-313 that this 
issue was closed.
But last comment is:
anonymous wrote : Gavin King [18/Sep/06 07:29 PM]
  | AFAIK, there is nothing I can do in Seam to fix this. It is a limit of 
facelets. 
Was it issue fixed or just given up?
If it works, it is real break-through.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066959#4066959

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4066959
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: conversations join/nest

2007-07-13 Thread denis-karpov
Seam 1.2.1.GA
public class Conversation implements Serializable 
  | ..
  |public void beginNested()
  |{
  |   if ( Manager.instance().isLongRunningConversation() )
  |   {
  |  Manager.instance().beginNestedConversation( 
Seam.getComponentName(Conversation.class) );
  |   }
  |   else
  |   {
  |  throw new IllegalStateException("beginNested() called with no 
long-running conversation");
  |   }
  |}
  | 

And I think you do not need nested conversations for this scenario. Do it in 
one conversation. Just throw away lower level selections when you make 
selection on some level.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4063941#4063941

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4063941
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: EntityHome usage recommended?

2007-07-11 Thread denis-karpov
What ever you do, you will need some functionality in your application that is 
already in EntityHome. At least, I suggest you to examine sources of it and 
catch the ideas and approaches . Then you can try to reuse it.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4062917#4062917

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4062917
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: UnitTesting and jBPM pageflow

2007-06-25 Thread denis-karpov
I think there is bug in testing(mock) environment (propagation of conversations 
with pageflow does not work)

http://jira.jboss.org/jira/browse/JBSEAM-1000

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057265#4057265

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057265
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Transaction Demarcation

2007-04-28 Thread denis-karpov
What do you need is user transactions.

  | import javax.ejb.TransactionManagement;
  | import javax.ejb.TransactionManagementType;
  | 
  | 
  | @TransactionManagement(TransactionManagementType.BEAN)
  | public class Q...
  | @In
  | private EntityManager entityManager;
  | @Resource
  | public UserTransaction utx;
  | 
  | ..
  | utx.begin();
  | utx.commit();
  | utx.rollback();
  | ..
  | }
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4041617#4041617

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4041617
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Navigation conceptual question

2007-04-27 Thread denis-karpov
Yes, I agree. It is very common situation.

I also use nested conversations for this. You should end your nested 
conversation by java code.

//@End
  | public String cancel() {
  | Conversation.instance().endAndRedirect(true);
  | return null;
  | }
  | 
or
//@End
  | public String cancel() {
  | Conversation.instance().end();
  | Conversation.instance().redirectToParent();
  | return null;
  | }
  | 

I am not sure for 100% for correctness of this code, but it works for me.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4041279#4041279

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4041279
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: xhtml and ©

2007-04-24 Thread denis-karpov
http://www.w3schools.com/tags/ref_entities.asp

& nbsp ;
& #160 ;

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4040105#4040105

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4040105
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: 2 questions about Seam

2007-03-30 Thread denis-karpov
Second question

@Out @In works with contexts.

@Out
private String hotel; 
The @Out annotation declares that an attribute value is outjected to a context 
variable after method invocations. In this case, the context variable named 
hotel will be set to the value of the hotel instance variable after every 
action listener invocation completes.   (C)Seam Reference.

The key point for understanding, that injection and outjection occurs on each 
invocation of an any method of this bean, that was made as action listener 
invocation. If you just call method from java code there will be no 
in/outjection.

And also be aware with what contexts you are working.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4033049#4033049

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4033049
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - How to disable Auto Flushing ?

2007-03-20 Thread denis-karpov
Is there a consistent way to control FlushMode?

I have tried this, but it does not do what i expected.
persistence.xml
...  ... 

Yes. There is the annotation attribute @Begin(flushMode=MANUAL), but not always 
you can use an annotations. For instance, if you start a conversation through 
 there is no such option.

It is this code that partially works for me:
PersistenceContexts.instance().changeFlushMode(FlushModeType.MANUAL);
If i call this code somewhere in my home object it works. BUT when i use DROOLS 
node in my pageflow, flushing occur anyway.

Can someone illumine me?
How to disable auto flushing in seam?

Thanks for your time.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4029707#4029707

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4029707
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Overriding EntityHome.persist problems

2007-03-14 Thread denis-karpov
Why not to use pageflows for this. It is convenient and works smoothly for me.

Pageflow
.
  | 
  | qqq
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | buyWorkingMemory
  | 
  | #{exchOrdHome.instance}
  | #{facesMessages}
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | ..
  | 
Drools

  | rule MandatorySum
  | when
  | $facesMessages : FacesMessages()
  | Sum(asFloat<=0)
  | then 
  | $facesMessages.add(new FacesMessage("Sum has to be more than 
zero."));
  | decision.setOutcome("invalid");
  | end
  | .


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4027847#4027847

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4027847
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Testing Pageflow with SeamTest

2007-03-01 Thread denis-karpov
I think there is bug in testing environment (propagation of conversations with 
pageflow does not work)

In this test there is 2 requests.
In the first I start conversation and pageflow
In the second conversation is lost.

If I do not start pageflow then conversation propagates.

public class TOrdTest extends SeamTest{
  | private static final Log log = LogFactory.getLog( TOrdTest.class );
  | 
  | @Test
  | public void Test1() throws Exception
  | {
  | String id = new FacesRequest(){
  | @Override
  | protected void invokeApplication() throws Exception {
  | Conversation.instance().begin();
  | Pageflow.instance().begin("val_buy");
  | setOutcome("browse");
  | log.info("# 1 Conversation_ID "+ 
Conversation.instance().getId());
  | assert isLongRunningConversation();
  | }
  | @Override
  | protected void renderResponse() throws Exception {
  | }
  | }.run();
  | 
  | id = new FacesRequest("/exchange/buy_readonly.xhtml",id){
  | @Override
  | protected void beforeRequest()
  | {
  | log.info("#beforeRequest Conversation_ID "+ 
getConversationId());
  | }
  | @Override
  | protected void applyRequestValues() throws Exception {
  | log.info("# 2 Conversation_ID "+ 
Conversation.instance().getId()+"  "+getConversationId());
  | }
  | @Override
  | protected void invokeApplication() throws Exception {
  | //Conversation.instance().beginNested();
  | log.info("# 3 Conversation_ID "+ 
Conversation.instance().getId()+"  "+getConversationId());
  | assert isLongRunningConversation();
  | }
  | }.run();
  | }
  | }
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4024377#4024377

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4024377
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Testing Pageflow with SeamTest

2007-02-27 Thread denis-karpov
Is it possible to test Pageflow conversations with the "mock" environment ?
Is there a special technique or a sample how to do this?

P.S. I have found that Seam's testing environment is an extremely useful and 
elegant. It increases productivity in many times. Now i stuck in testing 
pageflows, but i already can't live without testing  ;-)

Thanks.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4023187#4023187

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4023187
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: TestNg problem with my seam application

2007-02-16 Thread denis-karpov
SeamTest has a lot of special helper methods. Because it is "mock" environment.

Try getInstance instead of Component.getInstance

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4017500#4017500

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4017500
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: MockApplication in SeamTest not easily overridable

2007-02-16 Thread denis-karpov
Seam uses facelets to work with JSF. There is no JSP at all. Facelets now 
controls creation and manipulation of JSF component tree. And as I understand 
you cannot control the JSF component tree the way that was suggested in the 
article, if you work with facelets.

But do not worry. Facelets has a very nice template and dynamic capabilities. 
Just look at facelets docs you will love it.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4017495#4017495

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4017495
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Seam & Maven2

2006-12-20 Thread denis-karpov
I am extremely happy to see a serious interest in the maven2 integration.
I am also confident that Gavin will love this ;-)


I am not sure that it is something new for you people. May be it will be 
helpful.
This is the POM I have used for building SEAM 1.1.1.BETA2

POM.XML

  | http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  |   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
  |   4.0.0
  |   org.jboss.seam
  |   jboss-seam
  |   jar
  |   1.1.0.BETA2
  |   qqq
  |   
  | 
  | 
  |   org.hibernate
  |   hibernate
  |   3.2.0.ga
  | 
  | 
  |   org.hibernate
  |   hibernate-annotations
  |   3.2.0.ga
  | 
  | 
  |   org.hibernate
  |   hibernate-entitymanager
  |   3.2.0.ga
  | 
  | 
  |   org.jboss.ejb3
  |   jboss-ejb3-all
  |   SEAM.1.1.0.BETA2
  | 
  | 
  |   org.jboss.jbpm
  |   jbpm
  |   3.1.2
  | 
  | 
  |   org.jboss.drools
  |   drools-core
  |   3.0.1
  | 
  | 
  |   org.jboss.drools
  |   drools-compiler
  |   3.0.1
  | 
  | 
  |   org.jboss.cache
  |   jboss-cache
  |   SEAM.1.1.0.BETA2
  | 
  | 
  |   javax.portlet
  |   portlet-api
  |   1.0
  | 
  | 
  |   org.testng
  |   testng
  |   jdk15
  |   5.1
  | 
  | 
  |   log4j
  |   log4j
  |   1.2.13
  | 
  | 
  |   commons-logging
  |   commons-logging
  |   1.1
  | 
  | 
  |   commons-collections
  |   commons-collections
  |   3.2
  | 
  | 
  |   org.apache.myfaces.core
  |   myfaces-api
  |   1.1.4
  | 
  | 
  |   javax.el
  |   el-api
  |   1.2
  | 
  | 
  |   javax.el
  |   el-ri
  |   1.2
  | 
  | 
  |   javax.servlet
  |   jstl
  |   1.1.2
  | 
  | 
  |   javax.servlet
  |   servlet-api
  |   2.5
  | 
  |   
  |   
  | 
  | 
  | org.apache.maven.plugins
  | maven-compiler-plugin
  | 2.0
  | 
  | 1.5
  | 1.5
  | 
  | 
  | 
  | target/jboss-seam.jar
  |   
  | 


And this is files that I have to put in my local repository.

mvn install:install-file 
-Dfile=c:\javaprogs\new\jboss-seam-1.1.0.BETA2\lib\jboss-ejb3-all.jar 
-DgroupId=org.jboss.ejb3 -DartifactId=jboss-ejb3-all -Dversion=SEAM.1.1.0.BETA2 
-Dpackaging=jar 
  | 
  | mvn install:install-file 
-Dfile=c:\javaprogs\new\jboss-seam-1.1.0.BETA2\lib\jbpm-3.1.2.jar 
-DgroupId=org.jboss.jbpm -DartifactId=jbpm -Dversion=3.1.2 -Dpackaging=jar
  | 
  | mvn install:install-file 
-Dfile=c:\javaprogs\new\jboss-seam-1.1.0.BETA2\drools\lib\drools-core-3.0.3.jar 
-DgroupId=org.jboss.drools -DartifactId=drools-core -Dversion=3.0.3 
-Dpackaging=jar
  | 
  | mvn install:install-file 
-Dfile=c:\javaprogs\new\jboss-seam-1.1.0.BETA2\drools\lib\drools-compiler-3.0.3.jar
 -DgroupId=org.jboss.drools -DartifactId=drools-compiler -Dversion=3.0.3 
-Dpackaging=jar
  | 
  | mvn install:install-file
  |   -Dfile=c:\javaprogs\new\jboss-seam-1.1.0.BETA2\lib\jboss-cache-jdk50.jar 
  |   -DgroupId=org.jboss.cache -DartifactId=jboss-cache 
  |   -Dversion=SEAM.1.1.0.BETA2 -Dpackaging=jar
  | 
  | mvn install:install-file -Dfile=c:\javaprogs\new\hibernate-3.2\lib\jta.jar 
  |   -DgroupId=javax.transaction -DartifactId=jta -Dversion=1.0.1B 
  |   -Dpackaging=jar
  | 
  | mvn install:install-file 
  |   -Dfile=c:\javaprogs\new\jboss-seam-1.1.0.BETA2\lib\el-api.jar 
  |   -DgroupId=javax.el -DartifactId=el-api -Dversion=1.2 -Dpackaging=jar
  | 
  | mvn install:install-file
  |   -Dfile=c:\javaprogs\new\jboss-seam-1.1.0.BETA2\lib\el-ri.jar 
  |   -DgroupId=javax.el -DartifactId=el-ri -Dversion=1.2 
  |   -Dpackaging=jar



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995313#3995313

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995313
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: What do you guys think of this idea?

2006-11-17 Thread denis-karpov
I think it is good idea to hold the meta information in the file with view.
Because there is no need in a separation. All information in page.xml now 
concerns a particular views.

It is matter of grouping by type or by subject. In this case I should prefer 
grouping by subject.

Yes, I usually also like to keep different things in different places, but let 
us be wise with this.

Denis Karpov

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3986779#3986779

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3986779
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - hibernate-ALL.jar

2006-11-08 Thread denis-karpov
Hello Gavin.

Is it principle to keep Hibernate dependences in one file? Why not to split it 
in standard Hibernate jars with versions?

There is several inconveniences with Hibernate-ALL
1. In debugging, when you want to link sources to hibernate, you have to merge 
sources from three hibernate projects. (Also there is no information about 
versions)

2. Integration with Maven2.

(... May be someone can add something ...)

Would you at least give information about versions of Hibernate jars. (in 
1.0.1.GA  and current CVS)

With respect, Denis Karpov.


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3984131#3984131

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3984131
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Binding Dropdown To Database Table Using Seam..

2006-10-17 Thread denis-karpov
Look at http://wiki.jboss.org/wiki/Wiki.jsp?page=SelectItems
I use this pattern. It is quite plain and it correctly works with empty 
elements.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3978980#3978980

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3978980
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Javascript + Java

2006-10-17 Thread denis-karpov
Try rendered attribute instead of c:if

Some explanation:
http://wiki.java.net/bin/view/Projects/FaceletsFAQ#Why_doesn_t_my_c_if_ui_repeat_ui

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3978832#3978832

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3978832
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: one method ending conversation or not

2006-10-13 Thread denis-karpov
There are two approaches.

First, if you use Page Flows, then you can make decision node where you decide 
what is next.

.
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | .
Second, you can end your conversation explicitly from the code.

Conversation.instance().end();


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977924#3977924

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3977924
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Problems using JSF Converters in Seam app

2006-10-04 Thread denis-karpov
As I see, it has to be like this:
public class AppUser implements Serializable {
  | ...
  |private FullName name;
  |public FullName getName()
  |{
  |   return name;
  |}
  |public void setName(FullName name)
  |{
  |   this.name = name;
  |}
  | ...
  | 
then your code should work.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975976#3975976

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975976
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Problem with conversation stack(nested Pageflows blocker)

2006-10-03 Thread denis-karpov
public class Pageflow implements Serializable {
  | ...
  |public static Pageflow instance()
  |{
  | ...
  |   return (Pageflow) Component.getInstance(Pageflow.class, 
ScopeType.CONVERSATION, true);
  |}
  | ...
  | 
public class Component {
  | ...
  |public static Object getInstance(String name, ScopeType scope, boolean 
create)
  |{
  |   Object result = scope.getContext().get(name);
  |   result = getInstance(name, create, result);
  |   return result;
  |}
  | ...
  | 

public class ServerConversationContext implements Context {
  | ...
  |public Object get(String name) {
  | ...
  |   LinkedList stack = getIdStack();
  | ...
  |  for ( String id: stack )
  |  {
  | result = session.getAttribute( getKey(name, id) );
  | if (result!=null) return result;
  |  }
  |  return null;
  | ...
  | }
  | 

Using this pattern we can have only one such Component (in this case Pageflow) 
per Conversation stack. When we ask for a new instance we will get an old one 
from some parent Conversation.

This is the main thing that prevents using nested Pageflows.

May be it is reasonable to add another option in Component.getInstance() to 
lookup only in one current Conversation.


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975694#3975694

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975694
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Drop Down Menu Using Seam and Facelets

2006-09-25 Thread denis-karpov
Do not call fillMaps(); in a getter. I think it will solve all of your problems.
Good place to call it in the factory method or like that.

Then, I think you misunderstand this line
model.put("(Empty)","-1"); // Add EMPTY element if needed
It is EMPTY element. It is needed to choose null value. If you do not need null 
values just remove this line.


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973907#3973907

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973907
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: JSTL tags ignored

2006-09-22 Thread denis-karpov
It is hot topic on faselets forum. Specially  almost always you should use rendered attribute.

.
Why doesn't my c:if / ui:repeat / ui:include work properly? 
You're probably using a bad combination of build-time and render-time tags. For 
example, c:if is a build-time tag, so any EL expressions are only evaluated 
once (when the tree is built), even if you put it inside a ui:repeat or 
h:dataTable. Conversly, since ui:repeat is a 'render-time tag' (i.e. a 
UIComponent), you can't use it to iterate over build-time tags such as 
f:selectItem. 

Build-time (facelet) tags: 
·   all JSTL tags (e.g. c:if, c:forEach, c:choose) 
·   all ui tags except ui:repeat (e.g. ui:include, ui:decorate, 
ui:composition) 
·   all core faces tags except f:verbatim (e.g. f:validator, 
f:convertNumber, f:selectItem) 

Render-time tags (UIComponents): 
·   all UIComponent tags (e.g. ui:repeat, h:inputText, t:saveState)
http://wiki.java.net/bin/view/Projects/FaceletsFAQ#Why_doesn_t_my_c_if_ui_repeat_ui

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973581#3973581

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973581

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Drop Down Menu Using Seam and Facelets

2006-09-22 Thread denis-karpov
I guess you forgot to declare getter getModel()
in your CompanySearch interface.

public abstract Map getModel();

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973567#3973567

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973567
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Multiple roles and accessing the DataModel

2006-09-15 Thread denis-karpov
In this case you can use:

yourBean.getYourModel.getRowData();
  | yourBean.getYourModel.getRowIndex();
  | 

But you should not create DataModel each time in a getter.
I use it something like this:
private DataModel dm = null;
  | 
  | public DataModel getDetails() {
  | if (dm==null){
  | dm = new ListDataModel();
  | }
  | return dm;
  | }
  | 
  | private void syncDetails() {
  | Client o = getObject();
  | if (o!=null){
  | getDetails().setWrappedData(o.getDocuments());
  | }
  | }
  | 
  | private IdentityCard getSelectedDocument() {
  | return (IdentityCard)getDetails().getRowData();
  | }
  | 
Frankly, I do not like
@DataModel
@DataModelSelection
@DataModelSelectionIndex


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971862#3971862

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971862
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Multiple roles and accessing the DataModel

2006-09-14 Thread denis-karpov
You should use it like this #{list}, because when you use @DataModel Seam 
outjected wrapper into the current context with name of the property (list  in 
your case)

Another way you should wrap it by yourself, only then you can use it the way 
#{YourBean.YourModel}


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971484#3971484

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971484
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Hibernate Validation issue

2006-09-13 Thread denis-karpov
Yes. I mean exactly this. But this situation can arise not only in the ?source 
tag case?.

anonymous wrote : I work around it by specifying the entity.property as a 
string as well as a value binding for my source tags 
Hmm. Interesting. Is it works??? I have tried your way, but no success. What 
does it mean FOR="entity.property"?

Have you created your own s:valivate that processes for attribute?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971256#3971256

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971256
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Hibernate Validation issue

2006-09-13 Thread denis-karpov
Unfortunaly we can not use hibernate validation, because it raises exception, 
as you already experienced.

s:validate or s:validateAll  works, BUT with restriction. It does not work with 
facelets templating. For me facelets templating is very important to sacrifice.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971209#3971209

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971209
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Drop Down Menu Using Seam and Facelets

2006-09-12 Thread denis-karpov
http://wiki.jboss.org/wiki/Wiki.jsp?page=SelectItems
Just added. This one is interesting that it is direct usage without custom 
annotations.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3970921#3970921

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3970921
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Problem: Custom validate methods in EJBs crash

2006-09-08 Thread denis-karpov
1. For simple validation (just value) we can still use JSF validation.

2. For complex validation I use drools (jBoss Rules).
It nicely integrated with Seam Page Flow (see seam samples).

You can express your validation in rule set. IMHO it looks like quite 
elegantly. You can define as complex rules as you want. And validation logic is 
separated.

And most important, it works steadily. I have not experienced any problems yet.

Denis.


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3970396#3970396

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3970396
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Tomahawk datascroller loose conversationId

2006-08-30 Thread denis-karpov
It is from Tomahawk samples.

  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3968299#3968299

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3968299
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Resume Pageflow after Conversation Timeout

2006-08-10 Thread denis-karpov
anonymous wrote : However, shouldn't the data from previous steps be saved in 
the database
I think if you need to persist state into database you should consider to use 
jBPM. Although page flows use the same engine, page flows save its state only 
in conversation context.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964265#3964265

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964265
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Keeping App in a healthy state (exception handling)

2006-07-28 Thread denis-karpov
I am wondering about exception processing in seam/jsf..
I am totally lost. I can not find a way how to correctly process exceptions 
that occur in the code that I do not control (like interceptors). Because after 
such exceptions application is found in a bad state, almost unrecoverable. Only 
killing session helps sometimes.

What is the pattern? How to catch, and display errors that occurs somewhere in 
interceptors? And most important, how to keep application in a healthy state?

Thanks.


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961522#3961522

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3961522
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Hibernate Validation / Page Scope --> allways new entity

2006-07-25 Thread denis-karpov
Ops. I did not notice that was said already.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3960655#3960655

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3960655
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Hibernate Validation / Page Scope --> allways new entity

2006-07-25 Thread denis-karpov
Remove @Valid annotation.  does not require this. Pure hibernate 
@Valid throws exception on invalid cases, that is not caught by the Seam. That 
is why you will always get an exception page on invalid data.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3960654#3960654

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3960654
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Avoiding the DRY Principle with beans

2006-07-25 Thread denis-karpov
Thanks for your efforts in developing best practices. I think it is important 
to polish it.

1.  (small one)  In cancel action you should specify immediate="true". If 
not you will not be able to cancel without posting data back. For instance, you 
do not need validation if you want to cancel ;-)



2.  Page flows are extremely convenient and easy to use. It removes all 
"flow logic" from beans and from views also. You bean methods can be void 
(return nothing). And you page actions do not need method binding. Thus one 
view can be reused in different scenarios (page flows). By clicking SAVE, it 
just signals "save" and in different scenarios can be executed different 
methods.


  | 
  | 
  | 
You page flow logic can be visualized by the eclipse plug in. And changed 
separately from a bean and view.
More over, you can change a page flows without restarting app and server :-)
Somewhere on your debug page, just put such an action.

public void reloadJBPM() {
  | Contexts.removeFromAllContexts("org.jboss.seam.core.jbpm");
  | Component.newInstance("org.jboss.seam.core.jbpm");
  | }
  | 

3.  For all conditional logic like a context validation, decision making, 
changing something in some cases, I suggest to consider to use the Drools 
(jBoss Rules). It fits perfectly to jBpm (thanks to Gavin). See Seam sample 
?drools?. After including Drools, in my bean code there is no more "if" 
sentences :-) almost.

4.  Look at facelets template capabilities, specially user defined tags 
(Tag Source Files). With this you can create a building bricks for views.
Imaging that you have Person entity.
public class Person implements Serializable {
  | private String fio;
  | private PassportType passType;
  | private String passNumber;
  | .
  | }
  | 

Tag file:

  | http://www.w3.org/1999/xhtml";
  | xmlns:f="http://java.sun.com/jsf/core";
  | xmlns:h="http://java.sun.com/jsf/html";>
  | 
  | 
  | FIO
  | 
  | 
  | 
  | 
  | 
  | 
  | Document
  | 
  | 
  | 
  |   
  | 
  | 
  | 
  | 
  | Document number
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 

page code (*.xhtml)

  | 
  | 
  | .
  | 


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3960624#3960624

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3960624
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Seam Application Deployment

2006-07-24 Thread denis-karpov
And also, when you bind properties, it has to be @stateful.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3960249#3960249

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3960249
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Inject EL Results

2006-07-21 Thread denis-karpov
anonymous wrote : The backing bean is part of the view
No it is not. View connected to the beans by binding expressions. View does not 
hold references to the beans. In render time, when it is needed to put value in 
html output it just evaluates binding expression. And then in post time, it 
evaluates binding expression in another direction to put posted value back to 
the bean property. There is also method binding for the buttons and links, but 
it works by the same principles.

Facelets do the great thing. It gives a lot of template capabilities, and it 
get rid of JSP heritage.


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959812#3959812

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959812
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Inject EL Results

2006-07-20 Thread denis-karpov
You are digging in the wrong direction. Try to design your application in 
different way. You are trying to couple presentation and business. I assure you 
that you do not really need this.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959507#3959507

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959507
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: how to stop unknown user from seeing a page

2006-07-20 Thread denis-karpov
anonymous wrote : there's the @LoggedIn interceptor, but that seems to me to 
just stop the submission of a page if the user isn't logged in

No. @LoggedIn prevents execution of any method on your bean through JSF and 
redirects you to login page, if you are not logged in.

Just clean up your forceLogin() method. For instance, make it empty.



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959498#3959498

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959498
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: @IfInvalid throws unhandled exception

2006-07-20 Thread denis-karpov
Yes. It is great idea to perform validation before actual assignment. I have 
examined sources. But I still can not catch one thing.

-Look. Simple case. I have two inputs for two numbers and I want that one be 
greater than another.
-Or if one value greater than 18 then another value must be not null.

May be in this cases I should think about JBoss Rules?

Thanks.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959486#3959486

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959486
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Eclipse - Dynamic Web Project

2006-07-19 Thread denis-karpov
When you change your java code and save it. Eclipse will copy *.class to the 
directory that is observed by jBoss server. And server tries to catch your new 
*.class. Of course, if you change method signature or class definition server 
fails to deploy new one. And continue to work with the old copy until restart. 
And even in this case you do not need to redeploy. Just restart server.

But if you change only the body of a method your code starts to work 
immediately.


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959090#3959090

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959090
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Eclipse - Dynamic Web Project

2006-07-19 Thread denis-karpov
I just want to add some ideas about running and debugging seam application (any 
jBoss application) in Eclipse environment without tedious constant redeployment.
http://wiki.jboss.org/wiki/Wiki.jsp?page=EclipseSeamAutoDeploy

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959073#3959073

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959073
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Concurrent access to stateful beans

2006-07-19 Thread denis-karpov
I use this solution:
http://jira.jboss.com/jira/browse/JBSEAM-183

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959053#3959053

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959053
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: @IfInvalid throws unhandled exception

2006-07-19 Thread denis-karpov
In many cases validation depends not only from a value of a single control. It 
depends from context. From other properties of the bean. And as I understand, 
JSF like validation does not support this cases.

I tried to use Validator for a bean and ( @IfInvalid/@Valid ).  I got the 
problem that was described in the this topic. When I traced it. I discovered 
that validation was made twice. First by Seam (it was correct. Seam put error 
message into FacesMessages). Second by Hibernate. And Hibernate raised 
exception when validation fails.

Is there any way now to perform such validation?

Denis.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959047#3959047

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959047
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Debugging Seam application in Eclipse without tedious redepl

2006-07-18 Thread denis-karpov
Some notes about running and debugging seam application (any jBoss application) 
in Eclipse environment without tedious constant redeployment.

http://wiki.jboss.org/wiki/Wiki.jsp?page=EclipseSeamAutoDeploy

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958873#3958873

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958873
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Accessing methods inside the view

2006-07-17 Thread denis-karpov
Just make getter:

getAsString();
and use it
#{backingBean.asString}

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958396#3958396

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958396
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: remove beans from seam contexts

2006-07-12 Thread denis-karpov
I think the better do like this:
Contexts.removeFromAllContexts(name);
or
Contexts.getSessionContext().remove(name);

because "set" does not remove variable.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957255#3957255

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957255
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user