[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1631) add @PageAction annotation to method
by Dan Allen (JIRA)
add @PageAction annotation to method
------------------------------------
Key: JBSEAM-1631
URL: http://jira.jboss.com/jira/browse/JBSEAM-1631
Project: JBoss Seam
Issue Type: Feature Request
Components: Tools
Affects Versions: 2.0.0.BETA1
Reporter: Dan Allen
I cannot help but to conclude that a page action ought to be able to be declared as an annotation on a method. Why not? It is very similar to a @WebRemote method in a sense. It would also eliminate the need for the XML file if you prefer to return view ids directly in the action handler methods. Think about the love Seam would get by removing the dependency on the XML for this feature. No XMLHell, remember?
The way it would work is that when Seam spots the annotation during initialization time, it just registers that method with the Page framework just as if it had found it in the XML file.
I wouldn't be broken-hearted if this is rejected, but it seems consistent with the goals of Seam.
--
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
18 years, 5 months
[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
18 years, 5 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
18 years, 5 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1930) Improve documentation for @DataModelSelection and @DataModelSelectionIndex
by Jacob Orshalick (JIRA)
Improve documentation for @DataModelSelection and @DataModelSelectionIndex
--------------------------------------------------------------------------
Key: JBSEAM-1930
URL: http://jira.jboss.com/jira/browse/JBSEAM-1930
Project: JBoss Seam
Issue Type: Feature Request
Affects Versions: 2.0.0.BETA1
Reporter: Jacob Orshalick
The existing documentation for @DataModelSelection and @DataModelSelectionIndex seems to indicate to developers that you are naming the @DataModelSelection or @DataModelSelectionIndex context variable by specifying the value. I have heard this same question from every new member of my team when they try to use 2 DataModels in one component.
The following patch (or something along these lines) is recommended for both @DataModelSelection and @DataModelSelectionIndex:
@DataModelSelection
Injects the selected value from the JSF DataModel (this is the element of the underlying collection, or the map value) that the DataModelSelection is associated with. If only one @DataModel attribute is defined for a component, the selected value from that DataModel will be injected. Otherwise, the component name of each @DataModel must be specified in the value attribute for each @DataModelSelection.
@DataModel(value="list1")
private List<String> list2;
@DataModelSelection(value="list1")
private String focusList1;
@DataModel(value="list2")
private List<String> list2;
@DataModelSelection(value="list2")
private String focusList2;
Specifies that the attribute focusList1 is to be injected with the DataModelSelection for the component list1, and similarly focusList2 is injected with the DataModelSelection for list2. Note: @DataModelSelection is like @In. If you want to outject a DataModelSelection, you will have to do so explicitly through by annotating the attribute with @Out.
* value - name of the @DataModel conversation context variable this @DataModelSelection is associated with. Not needed if there is exactly one @DataModel in the component.
--
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
18 years, 5 months