[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1989) No pages context exists during a remoting request
by Shane Bryzak (JIRA)
No pages context exists during a remoting request
-------------------------------------------------
Key: JBSEAM-1989
URL: http://jira.jboss.com/jira/browse/JBSEAM-1989
Project: JBoss Seam
Issue Type: Bug
Components: Remoting
Affects Versions: 2.0.0.CR1
Reporter: Shane Bryzak
Assigned To: Shane Bryzak
Fix For: 2.0.0.CR2
This was brought to my attention by Christian - page-scoped components such as the following cannot be invoked with remoting as the page context no longer exists during a remoting request. Upon further investigation it seems that PageContext uses FacesContext (which isn't available for a non-JSF remoting request) so it's not just a trivial matter of creating a new PageContext for the request. The fix for this could potentially be tied in with JBSEAM-280.
@Name("wikiTextEditor")
@Scope(ScopeType.PAGE)
public class WikiTextEditor
{
private String textAreaSize;
@WebRemote
public void setTextAreaSize(String textAreaSize)
{
this.textAreaSize = textAreaSize;
}
public String getTextAreaSize()
{
return textAreaSize;
}
}
Javascript code to invoke the above component:
<script type="text/javascript" src="#{wikiPreferences.baseUrl}/seam/resource/remoting/interface.js?wikiTextEditor"></script>
<script type="text/javascript">
/* Set text area resize on backing bean */
Seam.Remoting.displayLoadingMessage = function() {};
Seam.Remoting.hideLoadingMessage = function() {};
var wikiTextEditor = Seam.Component.getInstance("wikiTextEditor");
function storeTextAreaSize(size) {
wikiTextEditor.setTextAreaSize(size, noopCallback);
}
function noopCallback() {}
</script>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 2 months
[jbossseam-issues] [JBoss JIRA] Updated: (JBSEAM-280) Integrate the page context with Seam Remoting
by Shane Bryzak (JIRA)
[ http://jira.jboss.com/jira/browse/JBSEAM-280?page=all ]
Shane Bryzak updated JBSEAM-280:
--------------------------------
Fix Version/s: 2.0.x
(was: 2.0.0.GA)
Affects: [Documentation (Ref Guide, User Guide, etc.), Interactive Demo/Tutorial] (was: [Interactive Demo/Tutorial, Documentation (Ref Guide, User Guide, etc.)])
Bumping this issue, I don't have a solid design for it yet and it is not important for the 2.0.0 release.
> Integrate the page context with Seam Remoting
> ---------------------------------------------
>
> Key: JBSEAM-280
> URL: http://jira.jboss.com/jira/browse/JBSEAM-280
> Project: JBoss Seam
> Issue Type: Feature Request
> Components: Remoting
> Reporter: Shane Bryzak
> Assigned To: Shane Bryzak
> Fix For: 2.0.x
>
> Original Estimate: 2 days
> Remaining Estimate: 2 days
>
> Support the propogation of Seam's Page Context between remoting requests.
> Functional Requirements:
> * The page context should be stored client-side in the global js variable Seam.pageContext.
> * The page context should be included in any Seam Remoting requests in the packet header, i.e.:
> <page-context><variable name="foo"><ref id="0"/></variable>...</page-context>
> * The page context should be returned by all remoting requests and replace the local copy
> * The client web page should be able to manipulate the page context, changing values, adding new values, etc via Seam.pageContext, e.g. Seam.pageContext.foo = bar;
> Non functional requirements:
> * Add a server-side convenience method to convert an object to serialized XML
> * Add a client-side convenience method to deserialize XML into an object
> * Create a <pageContext/> JSF tag that will embed a <script> block into the web page that initializes the page context when the page is first loaded
> * Modify the client-side remoting framework to support the dynamic discovery of object types. Use the __type field (or something similar) to identify the object type. This will mean that type stubs will not need to be explicitly imported.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 2 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1822) BaseSeamTest does not properly emulateJsfLifecycle does not handle phase listeners per the jsf 1.2 spec.
by Chris Rudd (JIRA)
BaseSeamTest does not properly emulateJsfLifecycle does not handle phase listeners per the jsf 1.2 spec.
--------------------------------------------------------------------------------------------------------
Key: JBSEAM-1822
URL: http://jira.jboss.com/jira/browse/JBSEAM-1822
Project: JBoss Seam
Issue Type: Bug
Components: Test Harness
Affects Versions: 2.0.0.BETA1
Reporter: Chris Rudd
Under the 1.2 JSF spec, all phase listeners are called with the after phase events reguarless of if an exception was thrown during the phase processing.
The resulting issue is that when Init.isTransactionMangementEnabled is true, and and an exception (or an AssertionError) is thrown from within the phase method, the SeamPhase listner does not get a chance to handle the condition and rollback the transaction. This leaves the transaction open, and all further tests run for that class are now "tainted" as there is a transaction running that will never be completed.
Wrapping code in the phase methods (restoreViewPhase,applyRequestValuesPhase,processValidationsPhase,updateModelValuesPhase,invokeApplicationsPhase, renderResponsePhase) like this will resolve the issue :
private void renderResponsePhase() throws Exception
{
phases.beforePhase(new PhaseEvent(facesContext, PhaseId.RENDER_RESPONSE,
MockLifecycle.INSTANCE));
+ try
+ {
updateConversationId();
renderResponseBegun = true;
renderResponse();
renderResponseComplete = true;
facesContext.getApplication().getStateManager().saveView(facesContext);
updateConversationId();
+ }
+ finally
+ {
phases.afterPhase(new PhaseEvent(facesContext, PhaseId.RENDER_RESPONSE,
MockLifecycle.INSTANCE));
+ }
}
it may be cleaner to refactor the phase methods into PhaseExection classes. (remove firing of phase events from the phase methods )
public class PhaseExecution {
private PhaseId phaseId;
public PhaseExecution(PhaseId phaseId)
{
this.phaseId = phaseId;
}
protected abstract void execute() throws Exception
public void run() throws Exception {
fireBefore();
try
{
execute();
}
finally
{
afterPhase();
}
}
protected void fireBefore()
{
phases.beforePhase(new PhaseEvent(facesContext, phaseId,
MockLifecycle.INSTANCE));
}
protected void fireAfter()
{
phases.afterPhase(new PhaseEvent(facesContext, phaseId,
MockLifecycle.INSTANCE));
}
}
final private PhaseExcecution RESTORE_VIEW_PHASE= new PhaseExecution(PhaseId.RESTORE_VIEW) {
protected void execute() throws Exception {
restoreViewPhase();
}
};
final private PhaseExcecution RENDER_RESPONSE_PHASE= new PhaseExecution(PhaseId.RENDER_RESPONSE) {
protected void execute() throws Exception {
renderResponsePhase();
}
};
...
/**
* @return true if a response was rendered
*/
private boolean emulateJsfLifecycle() throws Exception
{
RESTORE_VIEW_PHASE.run();
if ( !isGetRequest() && !skipToRender() )
{
APPLY_REQUEST_VALUES_PHASE.run();
if (!skipToRender())
{
PROCESS_VALIDATIONS_PHASE.run();
if ( !skipToRender() )
{
UPDATE_MODEL_VALUES_PHASE.run();
if ( !skipToRender() )
{
INVOKE_APPLICATION_PHASE.run();
}
}
}
}
if ( skipRender() )
{
// we really should look at redirect parameters here!
return false;
}
else
{
RENDER_RESPONSE_PHASE.run();
return true;
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 2 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2074) Postgres Dialect Bug--PostgressMetaDialect.java
by nathan dennis (JIRA)
Postgres Dialect Bug--PostgressMetaDialect.java
-----------------------------------------------
Key: JBSEAM-2074
URL: http://jira.jboss.com/jira/browse/JBSEAM-2074
Project: JBoss Seam
Issue Type: Bug
Components: Tools
Affects Versions: 2.0.0.CR2
Environment: Seam 2.0.0-CR2, Jboss 4.2.1, Postgres 8.1, postgresql.jar JDBC 3
Reporter: nathan dennis
Fix For: 2.0.0.GA
Error Generating Entities with Seam-gen. dealing with the need for a PostgressMetaDialect.java that appeared in CVS after CR2
[hibernate] An exception occurred while running exporter #2:hbm2java (Generates a set of .java files
)
[hibernate] To get the full stack trace run ant with -verbose
[hibernate] org.hibernate.cfg.JDBCBinderException: Could not load MetaDataDialect: org.hibernate.cfg
.reveng.dialect.PostgressMetaDataDialect
[hibernate] java.lang.ClassNotFoundException: org.hibernate.cfg.reveng.dialect.PostgressMetaDataDial
ect
[hibernate] A class were not found in the classpath of the Ant task.
[hibernate] Ensure that the classpath contains the classes needed for Hibernate and your code are in
the classpath.
BUILD FAILED
/usr/local/seamcvs/seam100507/jboss-seam/seam-gen/build.xml:986: org.hibernate.cfg.JDBCBinderExcepti
on: Could not load MetaDataDialect: org.hibernate.cfg.reveng.dialect.PostgressMetaDataDialect
PostgressMetaDataDialect.class appears in
../seam/examples/wiki/lib/hibernate-tools.jar
678 Thu Nov 09 12:47:22 PST 2006 org/hibernate/cfg/reveng/dialect/PostgressMetaDataDialect.class
but overwriting :seam-gen/lib/hibernate-tools.jar with examples/wiki/lib/hibernate-tools.jar:
gives error,,
stack trace
java.lang.NullPointerException
at org.hibernate.cfg.reveng.dialect.PostgressMetaDataDialect.needQuote(PostgressMetaDataDial
ect.java:7)
at org.hibernate.cfg.reveng.dialect.AbstractMetaDataDialect.caseForSearch(AbstractMetaDataDi
alect.java:151)
at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getTables(JDBCMetaDataDialect.java:2
2)
at org.hibernate.cfg.reveng.JDBCReader.processTables(JDBCReader.java:453)
at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:74)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 2 months